From a4064969b99de220540f1a086209bfcfadc717f8 Mon Sep 17 00:00:00 2001 From: Luan Santos Date: Fri, 29 Dec 2023 11:07:05 -0800 Subject: [PATCH] mv: moveable -> movable --- data-canary/lib/core/constants.lua | 2 +- data-canary/lib/core/storages.lua | 2 +- data-canary/scripts/runes/chameleon.lua | 2 +- data-otservbr-global/lib/compat/compat.lua | 8 +- data-otservbr-global/lib/core/storages.lua | 2 +- .../lib/quests/svargrond_arena.lua | 2 +- data-otservbr-global/npc/inigo.lua | 2 +- .../ferumbras_ascendant/habitat_corrupted.lua | 2 +- .../ferumbras_ascendant/habitat_desert.lua | 2 +- .../ferumbras_ascendant/habitat_dimension.lua | 2 +- .../ferumbras_ascendant/habitat_grass.lua | 2 +- .../ferumbras_ascendant/habitat_ice.lua | 2 +- .../ferumbras_ascendant/habitat_mushroom.lua | 2 +- .../ferumbras_ascendant/habitat_roshamuul.lua | 2 +- .../ferumbras_ascendant/habitat_venom.lua | 2 +- .../scripts/globalevents/others/startup.lua | 4 +- .../scripts/spells/runes/chameleon.lua | 2 +- data-otservbr-global/startup/README.md | 144 +++++++++--------- ...item_unmoveable.lua => item_unmovable.lua} | 2 +- data-otservbr-global/startup/tables/load.lua | 2 +- data/events/scripts/player.lua | 2 +- data/items/items.xml | 10 +- data/libs/core/global_storage.lua | 2 +- data/libs/functions/player.lua | 10 +- data/modules/scripts/gamestore/init.lua | 18 +-- data/npclib/npc_system/custom_modules.lua | 2 +- src/creatures/monsters/monster.cpp | 2 +- src/creatures/players/player.cpp | 4 +- src/game/game.cpp | 10 +- src/io/iomap.cpp | 8 +- src/io/iomapserialize.cpp | 6 +- src/items/bed.cpp | 2 +- src/items/containers/container.cpp | 8 +- src/items/functions/item/item_parse.cpp | 8 +- src/items/functions/item/item_parse.hpp | 6 +- src/items/item.cpp | 10 +- src/items/item.hpp | 6 +- src/items/items.cpp | 2 +- src/items/items.hpp | 2 +- src/items/items_definitions.hpp | 10 +- src/items/tile.cpp | 34 ++--- src/items/tile.hpp | 2 +- src/items/trashholder.cpp | 2 +- src/lua/creature/raids.cpp | 2 +- .../functions/core/game/global_functions.cpp | 4 +- .../functions/core/game/global_functions.hpp | 4 +- src/lua/functions/core/game/lua_enums.cpp | 6 +- src/lua/functions/events/action_functions.cpp | 4 +- src/lua/functions/items/item_functions.cpp | 2 +- .../functions/items/item_type_functions.cpp | 2 +- src/map/house/housetile.cpp | 2 +- src/utils/tools.cpp | 2 +- 52 files changed, 192 insertions(+), 192 deletions(-) rename data-otservbr-global/startup/tables/{item_unmoveable.lua => item_unmovable.lua} (89%) diff --git a/data-canary/lib/core/constants.lua b/data-canary/lib/core/constants.lua index b42d731564d..7b99b309913 100644 --- a/data-canary/lib/core/constants.lua +++ b/data-canary/lib/core/constants.lua @@ -6,7 +6,7 @@ STACKPOS_FOURTH_ITEM_ABOVE_GROUNDTILE = 4 STACKPOS_FIFTH_ITEM_ABOVE_GROUNDTILE = 5 STACKPOS_TOP_CREATURE = 253 STACKPOS_TOP_FIELD = 254 -STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE = 255 +STACKPOS_TOP_MOVABLE_ITEM_OR_CREATURE = 255 THING_TYPE_PLAYER = CREATURETYPE_PLAYER + 1 THING_TYPE_MONSTER = CREATURETYPE_MONSTER + 1 diff --git a/data-canary/lib/core/storages.lua b/data-canary/lib/core/storages.lua index 43e47ef867f..7646a8cc51e 100644 --- a/data-canary/lib/core/storages.lua +++ b/data-canary/lib/core/storages.lua @@ -8,7 +8,7 @@ Reserved player action storage key ranges (const.hpp) [2001 - 2011] Others reserved player action/storages - [100] = unmoveable/untrade/unusable items + [100] = unmovable/untrade/unusable items [101] = use pick floor [102] = well down action [103-120] = others keys action diff --git a/data-canary/scripts/runes/chameleon.lua b/data-canary/scripts/runes/chameleon.lua index 858757b1725..92168645e20 100644 --- a/data-canary/scripts/runes/chameleon.lua +++ b/data-canary/scripts/runes/chameleon.lua @@ -16,7 +16,7 @@ function rune.onCastSpell(creature, variant, isHotkey) item = Tile(position):getTopDownItem() end - if not item or item.itemid == 0 or not isMoveable(item.uid) then + if not item or item.itemid == 0 or not isMovable(item.uid) then creature:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE) creature:getPosition():sendMagicEffect(CONST_ME_POFF) return false diff --git a/data-otservbr-global/lib/compat/compat.lua b/data-otservbr-global/lib/compat/compat.lua index f62945e6b26..cd9b8146763 100644 --- a/data-otservbr-global/lib/compat/compat.lua +++ b/data-otservbr-global/lib/compat/compat.lua @@ -35,7 +35,7 @@ STACKPOS_FOURTH_ITEM_ABOVE_GROUNDTILE = 4 STACKPOS_FIFTH_ITEM_ABOVE_GROUNDTILE = 5 STACKPOS_TOP_CREATURE = 253 STACKPOS_TOP_FIELD = 254 -STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE = 255 +STACKPOS_TOP_MOVABLE_ITEM_OR_CREATURE = 255 THING_TYPE_PLAYER = CREATURETYPE_PLAYER + 1 THING_TYPE_MONSTER = CREATURETYPE_MONSTER + 1 @@ -1094,8 +1094,8 @@ function isCorpse(uid) return i ~= nil and ItemType(i:getId()):isCorpse() or false end -isItemMoveable = isItemMovable -isMoveable = isMovable +isItemMovable = isItemMovable +isMovable = isMovable function getItemName(itemId) return ItemType(itemId):getName() @@ -1380,7 +1380,7 @@ function getThingfromPos(pos) local thing local stackpos = pos.stackpos or 0 - if stackpos == STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE then + if stackpos == STACKPOS_TOP_MOVABLE_ITEM_OR_CREATURE then thing = tile:getTopCreature() if thing == nil then local item = tile:getTopDownItem() diff --git a/data-otservbr-global/lib/core/storages.lua b/data-otservbr-global/lib/core/storages.lua index 10e5e305f63..888da1b113f 100644 --- a/data-otservbr-global/lib/core/storages.lua +++ b/data-otservbr-global/lib/core/storages.lua @@ -8,7 +8,7 @@ Reserved player action storage key ranges (const.h) [2001 - 2011] Others reserved player action/storages - [100] = unmoveable/untrade/unusable items + [100] = unmovable/untrade/unusable items [101] = use pick floor [102] = well down action [103-120] = others keys action diff --git a/data-otservbr-global/lib/quests/svargrond_arena.lua b/data-otservbr-global/lib/quests/svargrond_arena.lua index a32fc0df6b6..660426cb64b 100644 --- a/data-otservbr-global/lib/quests/svargrond_arena.lua +++ b/data-otservbr-global/lib/quests/svargrond_arena.lua @@ -218,7 +218,7 @@ function SvargrondArena.resetPit(pitId) if movableItem and movableItem:isItem() then local itemType = ItemType(movableItem:getId()) if itemType and itemType:isMovable() and not table.contains(SvargrondArena.itemsNotErasable, movableItem:getId()) then - moveableItem:remove() + movableItem:remove() end end diff --git a/data-otservbr-global/npc/inigo.lua b/data-otservbr-global/npc/inigo.lua index e712582ea5e..6a16d1c8158 100644 --- a/data-otservbr-global/npc/inigo.lua +++ b/data-otservbr-global/npc/inigo.lua @@ -40,7 +40,7 @@ local hints = { [8] = "Always eat as much {food} as possible. \z This way, you'll regenerate health points for a longer period of time.", [9] = "After you have killed a monster, you have 10 seconds in which the corpse \z - is not moveable and no one else but you can loot it.", + is not movable and no one else but you can loot it.", [10] = "Be careful when you approach three or more {monsters} because you only can block the attacks of two! \z In such a situation, even a few salamanders can do severe damage or even kill you.", [11] = "There are many ways to gather {food}. Many creatures drop food but you can also pick blueberries or \z diff --git a/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/habitat_corrupted.lua b/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/habitat_corrupted.lua index 674b23a1476..74a93dbf5a9 100644 --- a/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/habitat_corrupted.lua +++ b/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/habitat_corrupted.lua @@ -378,7 +378,7 @@ local ferumbrasAscendantHabitatCorrupted = Action() function ferumbrasAscendantHabitatCorrupted.onUse(player, item, fromPosition, target, toPosition, isHotkey) if item.itemid == 9125 then if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.Corrupted) >= 1 then - player:say("The lever are stuck, need some time to it can be moveable again.", TALKTYPE_MONSTER_SAY) + player:say("The lever are stuck, need some time to it can be movable again.", TALKTYPE_MONSTER_SAY) return true end Game.createMonster("lovely yielothax", Position(33619, 32722, 12), true, true) diff --git a/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/habitat_desert.lua b/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/habitat_desert.lua index 9d0e73b65e9..e5b8e22f150 100644 --- a/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/habitat_desert.lua +++ b/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/habitat_desert.lua @@ -358,7 +358,7 @@ local ferumbrasAscendantHabitatDesert = Action() function ferumbrasAscendantHabitatDesert.onUse(player, item, fromPosition, target, toPosition, isHotkey) if item.itemid == 9125 then if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.Desert) >= 1 then - player:say("The lever are stuck, need some time to it can be moveable again.", TALKTYPE_MONSTER_SAY) + player:say("The lever are stuck, need some time to it can be movable again.", TALKTYPE_MONSTER_SAY) return true end Game.createMonster("lovely rotworm", Position(33641, 32684, 12), true, true) diff --git a/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/habitat_dimension.lua b/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/habitat_dimension.lua index 1b9bbadb1eb..1fc14c6646f 100644 --- a/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/habitat_dimension.lua +++ b/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/habitat_dimension.lua @@ -394,7 +394,7 @@ local ferumbrasAscendantHabitatDimension = Action() function ferumbrasAscendantHabitatDimension.onUse(player, item, fromPosition, target, toPosition, isHotkey) if item.itemid == 9125 then if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.Dimension) >= 1 then - player:say("The lever are stuck, need some time to it can be moveable again.", TALKTYPE_MONSTER_SAY) + player:say("The lever are stuck, need some time to it can be movable again.", TALKTYPE_MONSTER_SAY) return true end Game.createMonster("lovely souleater", Position(33642, 32722, 12), true, true) diff --git a/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/habitat_grass.lua b/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/habitat_grass.lua index 0c6c998e4e1..293e65844cc 100644 --- a/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/habitat_grass.lua +++ b/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/habitat_grass.lua @@ -426,7 +426,7 @@ local ferumbrasAscendantHabitatGlass = Action() function ferumbrasAscendantHabitatGlass.onUse(player, item, fromPosition, target, toPosition, isHotkey) if item.itemid == 9125 then if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.Grass) >= 1 then - player:say("The lever are stuck, need some time to it can be moveable again.", TALKTYPE_MONSTER_SAY) + player:say("The lever are stuck, need some time to it can be movable again.", TALKTYPE_MONSTER_SAY) return true end Game.createMonster("lovely frazzlemaw", Position(33642, 32666, 12), true, true) diff --git a/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/habitat_ice.lua b/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/habitat_ice.lua index 2dd56c8abd0..b46a984a00e 100644 --- a/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/habitat_ice.lua +++ b/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/habitat_ice.lua @@ -441,7 +441,7 @@ local ferumbrasAscendantHabitatIce = Action() function ferumbrasAscendantHabitatIce.onUse(player, item, fromPosition, target, toPosition, isHotkey) if item.itemid == 9125 then if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.Ice) >= 1 then - player:say("The lever are stuck, need some time to it can be moveable again.", TALKTYPE_MONSTER_SAY) + player:say("The lever are stuck, need some time to it can be movable again.", TALKTYPE_MONSTER_SAY) return true end Game.createMonster("lovely snake", Position(33642, 32702, 12), true, true) diff --git a/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/habitat_mushroom.lua b/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/habitat_mushroom.lua index 77e288f5e5b..52b0c9b7ac7 100644 --- a/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/habitat_mushroom.lua +++ b/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/habitat_mushroom.lua @@ -394,7 +394,7 @@ local ferumbrasAscendantHabitatMushroom = Action() function ferumbrasAscendantHabitatMushroom.onUse(player, item, fromPosition, target, toPosition, isHotkey) if item.itemid == 9125 then if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.Mushroom) >= 1 then - player:say("The lever are stuck, need some time to it can be moveable again.", TALKTYPE_MONSTER_SAY) + player:say("The lever are stuck, need some time to it can be movable again.", TALKTYPE_MONSTER_SAY) return true end Game.createMonster("lovely scorpion", Position(33617, 32684, 12), true, true) diff --git a/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/habitat_roshamuul.lua b/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/habitat_roshamuul.lua index 1718b1106b8..42da59f0e93 100644 --- a/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/habitat_roshamuul.lua +++ b/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/habitat_roshamuul.lua @@ -467,7 +467,7 @@ local ferumbrasAscendantHabitatRoshamuul = Action() function ferumbrasAscendantHabitatRoshamuul.onUse(player, item, fromPosition, target, toPosition, isHotkey) if item.itemid == 9125 then if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.Roshamuul) >= 1 then - player:say("The lever are stuck, need some time to it can be moveable again.", TALKTYPE_MONSTER_SAY) + player:say("The lever are stuck, need some time to it can be movable again.", TALKTYPE_MONSTER_SAY) return true end Game.createMonster("lovely deer", Position(33619, 32666, 12), true, true) diff --git a/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/habitat_venom.lua b/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/habitat_venom.lua index 2883193b394..2649da5694e 100644 --- a/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/habitat_venom.lua +++ b/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/habitat_venom.lua @@ -449,7 +449,7 @@ local ferumbrasAscendantHabitatVenom = Action() function ferumbrasAscendantHabitatVenom.onUse(player, item, fromPosition, target, toPosition, isHotkey) if item.itemid == 9125 then if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.Venom) >= 1 then - player:say("The lever are stuck, need some time to it can be moveable again.", TALKTYPE_MONSTER_SAY) + player:say("The lever are stuck, need some time to it can be movable again.", TALKTYPE_MONSTER_SAY) return true end Game.createMonster("lovely polar bear", Position(33617, 32702, 12), true, true) diff --git a/data-otservbr-global/scripts/globalevents/others/startup.lua b/data-otservbr-global/scripts/globalevents/others/startup.lua index 22af76e94c2..603e50a3ba1 100644 --- a/data-otservbr-global/scripts/globalevents/others/startup.lua +++ b/data-otservbr-global/scripts/globalevents/others/startup.lua @@ -28,8 +28,8 @@ function serverstartup.onStartup() loadLuaMapUnique(ItemUnique) -- Item daily reward table -- This is temporary disabled > loadLuaMapAction(DailyRewardAction) - -- Item unmoveable table - loadLuaMapAction(ItemUnmoveableAction) + -- Item unmovable table + loadLuaMapAction(ItemUnmovableAction) -- Lever table loadLuaMapAction(LeverAction) loadLuaMapUnique(LeverUnique) diff --git a/data-otservbr-global/scripts/spells/runes/chameleon.lua b/data-otservbr-global/scripts/spells/runes/chameleon.lua index 858757b1725..92168645e20 100644 --- a/data-otservbr-global/scripts/spells/runes/chameleon.lua +++ b/data-otservbr-global/scripts/spells/runes/chameleon.lua @@ -16,7 +16,7 @@ function rune.onCastSpell(creature, variant, isHotkey) item = Tile(position):getTopDownItem() end - if not item or item.itemid == 0 or not isMoveable(item.uid) then + if not item or item.itemid == 0 or not isMovable(item.uid) then creature:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE) creature:getPosition():sendMagicEffect(CONST_ME_POFF) return false diff --git a/data-otservbr-global/startup/README.md b/data-otservbr-global/startup/README.md index cfc992c635d..e66c0c1b51a 100644 --- a/data-otservbr-global/startup/README.md +++ b/data-otservbr-global/startup/README.md @@ -39,77 +39,77 @@ Item (unique) = 40001/42000 This folder was created exclusively for tables and functions that are loaded at startup or that cannot be reloaded, thus maintaining greater organization in the files. Action IDS - Use actionID only if you need to create a function that is called multiple times in different locations. - The action is also used as storage, "x" storage is added in the player, - and the same action number gives access to a door, for example. +Use actionID only if you need to create a function that is called multiple times in different locations. +The action is also used as storage, "x" storage is added in the player, +and the same action number gives access to a door, for example. - Reserved player action storage key ranges (const.h at the source) - [10000000 - 20000000] - [1000 - 1500] - [2001 - 2011] + Reserved player action storage key ranges (const.h at the source) + [10000000 - 20000000] + [1000 - 1500] + [2001 - 2011] - Others reserved player action/storages - [100] = unmoveable/untrade/unusable items - [101] = use pick floor - [102] = down floor action - [103] = key 0010 - [103-120] = keys action - [104] = Parchment of the parchment room quest - [303] = key 0303 - [1000] = level door. Here 1 must be used followed by the level. Example: 1010 = level 10, 1100 = level 100] - [3001-3008] = key 3001/3008 - [3012] = key 3012 - [3033] = key 3033 - [3100] = key 3100 - [3142] = key 3142 - [3200] = key 3200 - [3301] = key 3301 - [3302] = key 3302 - [3303] = key 3303 - [3304] = key 3304 - [3350] = key 3350 - [3520] = key 3520 - [3600] = key 3600 - [3610] = key 3610 - [3620] = key 3620 - [3650] = key 3650 - [3666] = key 3666 - [3667] = key 3667 - [3700] = key 3700 - [3701/3703] = key 3701/3703 - [3800/3802] = key 3800/3802 - [3899] = key 3899 - [3900] = key 3900 - [3909/3917] = key 3909/3917 - [3923] = key 3923 - [3925] = key 3925 - [3930] = key 3930 - [3932] = key 3932 - [3934] = key 3934 - [3935] = key 3935 - [3936] = key 3936 - [3938] = key 3938 - [3940] = key 3940 - [3950] = key 3950 - [3960] = key 3960 - [3980] = key 3980 - [3988] = key 3988 - [4001] = key 4001 - [4009] = key 4009 - [4022] = key 4022 - [4023] = key 4023 - [4033] = key 4033 - [4037] = key 4037 - [4055] = key 4055 - [4210] = key 4210 - [4501] = key 4501 - [4502] = key 4502 - [4503] = key 4503 - [4600] = key 4600 - [4601] = key 4601 - [4603] = key 4603 - [5000] = key 5000 - [5002] = key 5002 - [5010] = key 5010 - [5050] = key 5050 - [6010] = key 6010 + Others reserved player action/storages + [100] = unmovable/untrade/unusable items + [101] = use pick floor + [102] = down floor action + [103] = key 0010 + [103-120] = keys action + [104] = Parchment of the parchment room quest + [303] = key 0303 + [1000] = level door. Here 1 must be used followed by the level. Example: 1010 = level 10, 1100 = level 100] + [3001-3008] = key 3001/3008 + [3012] = key 3012 + [3033] = key 3033 + [3100] = key 3100 + [3142] = key 3142 + [3200] = key 3200 + [3301] = key 3301 + [3302] = key 3302 + [3303] = key 3303 + [3304] = key 3304 + [3350] = key 3350 + [3520] = key 3520 + [3600] = key 3600 + [3610] = key 3610 + [3620] = key 3620 + [3650] = key 3650 + [3666] = key 3666 + [3667] = key 3667 + [3700] = key 3700 + [3701/3703] = key 3701/3703 + [3800/3802] = key 3800/3802 + [3899] = key 3899 + [3900] = key 3900 + [3909/3917] = key 3909/3917 + [3923] = key 3923 + [3925] = key 3925 + [3930] = key 3930 + [3932] = key 3932 + [3934] = key 3934 + [3935] = key 3935 + [3936] = key 3936 + [3938] = key 3938 + [3940] = key 3940 + [3950] = key 3950 + [3960] = key 3960 + [3980] = key 3980 + [3988] = key 3988 + [4001] = key 4001 + [4009] = key 4009 + [4022] = key 4022 + [4023] = key 4023 + [4033] = key 4033 + [4037] = key 4037 + [4055] = key 4055 + [4210] = key 4210 + [4501] = key 4501 + [4502] = key 4502 + [4503] = key 4503 + [4600] = key 4600 + [4601] = key 4601 + [4603] = key 4603 + [5000] = key 5000 + [5002] = key 5002 + [5010] = key 5010 + [5050] = key 5050 + [6010] = key 6010 diff --git a/data-otservbr-global/startup/tables/item_unmoveable.lua b/data-otservbr-global/startup/tables/item_unmovable.lua similarity index 89% rename from data-otservbr-global/startup/tables/item_unmoveable.lua rename to data-otservbr-global/startup/tables/item_unmovable.lua index ed7128ad6ad..cd7aa195742 100644 --- a/data-otservbr-global/startup/tables/item_unmoveable.lua +++ b/data-otservbr-global/startup/tables/item_unmovable.lua @@ -1,6 +1,6 @@ -- Look README.md for see the reserved action/unique numbers -ItemUnmoveableAction = { +ItemUnmovableAction = { -- Unmovable action, add new position and it create in-game [100] = { itemId = false, diff --git a/data-otservbr-global/startup/tables/load.lua b/data-otservbr-global/startup/tables/load.lua index fe3b5bbde5e..901dd2fe940 100644 --- a/data-otservbr-global/startup/tables/load.lua +++ b/data-otservbr-global/startup/tables/load.lua @@ -6,7 +6,7 @@ dofile(DATA_DIRECTORY .. "/startup/tables/door_level.lua") dofile(DATA_DIRECTORY .. "/startup/tables/door_quest.lua") dofile(DATA_DIRECTORY .. "/startup/tables/item.lua") dofile(DATA_DIRECTORY .. "/startup/tables/item_daily_reward.lua") -dofile(DATA_DIRECTORY .. "/startup/tables/item_unmoveable.lua") +dofile(DATA_DIRECTORY .. "/startup/tables/item_unmovable.lua") dofile(DATA_DIRECTORY .. "/startup/tables/lever.lua") dofile(DATA_DIRECTORY .. "/startup/tables/teleport.lua") dofile(DATA_DIRECTORY .. "/startup/tables/teleport_item.lua") diff --git a/data/events/scripts/player.lua b/data/events/scripts/player.lua index 0a719401ed0..c134e784993 100644 --- a/data/events/scripts/player.lua +++ b/data/events/scripts/player.lua @@ -1,6 +1,6 @@ local storeItemID = { -- registered item ids here are not tradable with players - -- these items can be set to moveable at items.xml + -- these items can be set to movable at items.xml -- 500 charges exercise weapons 28552, -- exercise sword 28553, -- exercise axe diff --git a/data/items/items.xml b/data/items/items.xml index bce4281b538..abbe27c060c 100644 --- a/data/items/items.xml +++ b/data/items/items.xml @@ -11607,7 +11607,7 @@ - + @@ -35642,7 +35642,7 @@ - + @@ -35742,7 +35742,7 @@ - + @@ -42625,7 +42625,7 @@ - + @@ -50372,7 +50372,7 @@ - + diff --git a/data/libs/core/global_storage.lua b/data/libs/core/global_storage.lua index 4119be5ebb6..63d17166332 100644 --- a/data/libs/core/global_storage.lua +++ b/data/libs/core/global_storage.lua @@ -8,7 +8,7 @@ Reserved player action storage key ranges (const.hpp) [2001 - 2011] Others reserved player action/storages - [100] = unmoveable/untrade/unusable items + [100] = unmovable/untrade/unusable items [101] = use pick floor [102] = well down action [103-120] = others keys action diff --git a/data/libs/functions/player.lua b/data/libs/functions/player.lua index d494f35edd3..8bb420a5669 100644 --- a/data/libs/functions/player.lua +++ b/data/libs/functions/player.lua @@ -555,9 +555,9 @@ function Player.updateHazard(self) return true end -function Player:addItemStoreInboxEx(item, moveable, setOwner) +function Player:addItemStoreInboxEx(item, movable, setOwner) local inbox = self:getSlotItem(CONST_SLOT_STORE_INBOX) - if not moveable then + if not movable then item:setOwner(self) item:setAttribute(ITEM_ATTRIBUTE_STORE, systemTime()) elseif setOwner then @@ -567,14 +567,14 @@ function Player:addItemStoreInboxEx(item, moveable, setOwner) return item end -function Player:addItemStoreInbox(itemId, amount, moveable, setOwner) +function Player:addItemStoreInbox(itemId, amount, movable, setOwner) local iType = ItemType(itemId) if not iType then return nil end if iType:isStackable() then while amount > iType:getStackSize() do - self:addItemStoreInboxEx(Game.createItem(itemId, iType:getStackSize()), moveable, setOwner) + self:addItemStoreInboxEx(Game.createItem(itemId, iType:getStackSize()), movable, setOwner) amount = amount - iType:getStackSize() end end @@ -582,7 +582,7 @@ function Player:addItemStoreInbox(itemId, amount, moveable, setOwner) if not item then return nil end - return self:addItemStoreInboxEx(item, moveable, setOwner) + return self:addItemStoreInboxEx(item, movable, setOwner) end ---@param monster Monster diff --git a/data/modules/scripts/gamestore/init.lua b/data/modules/scripts/gamestore/init.lua index d33485c7091..f3959c3a1e9 100644 --- a/data/modules/scripts/gamestore/init.lua +++ b/data/modules/scripts/gamestore/init.lua @@ -443,9 +443,9 @@ function parseBuyStoreOffer(playerId, msg) -- Handled errors have a code index and unhandled errors do not local pcallOk, pcallError = pcall(function() if offer.type == GameStore.OfferTypes.OFFER_TYPE_ITEM then - GameStore.processItemPurchase(player, offer.itemtype, offer.count, offer.moveable, offer.setOwner) + GameStore.processItemPurchase(player, offer.itemtype, offer.count, offer.movable, offer.setOwner) elseif offer.type == GameStore.OfferTypes.OFFER_TYPE_ITEM_UNIQUE then - GameStore.processItemPurchase(player, offer.itemtype, offer.count, offer.moveable, offer.setOwner) + GameStore.processItemPurchase(player, offer.itemtype, offer.count, offer.movable, offer.setOwner) elseif offer.type == GameStore.OfferTypes.OFFER_TYPE_POUCH then GameStore.processItemPurchase(player, offer.itemtype, offer.count) elseif offer.type == GameStore.OfferTypes.OFFER_TYPE_INSTANT_REWARD_ACCESS then @@ -459,7 +459,7 @@ function parseBuyStoreOffer(playerId, msg) elseif offer.type == GameStore.OfferTypes.OFFER_TYPE_PREMIUM then GameStore.processPremiumPurchase(player, offer.id) elseif offer.type == GameStore.OfferTypes.OFFER_TYPE_STACKABLE then - GameStore.processStackablePurchase(player, offer.itemtype, offer.count, offer.name, offer.moveable, offer.setOwner) + GameStore.processStackablePurchase(player, offer.itemtype, offer.count, offer.name, offer.movable, offer.setOwner) elseif offer.type == GameStore.OfferTypes.OFFER_TYPE_HOUSE then GameStore.processHouseRelatedPurchase(player, offer) elseif offer.type == GameStore.OfferTypes.OFFER_TYPE_OUTFIT then @@ -482,7 +482,7 @@ function parseBuyStoreOffer(playerId, msg) elseif offer.type == GameStore.OfferTypes.OFFER_TYPE_TEMPLE then GameStore.processTempleTeleportPurchase(player) elseif offer.type == GameStore.OfferTypes.OFFER_TYPE_CHARGES then - GameStore.processChargesPurchase(player, offer.itemtype, offer.name, offer.charges, offer.moveable, offer.setOwner) + GameStore.processChargesPurchase(player, offer.itemtype, offer.name, offer.charges, offer.movable, offer.setOwner) elseif offer.type == GameStore.OfferTypes.OFFER_TYPE_HIRELING then local hirelingName = msg:getString() local sex = msg:getByte() @@ -1507,21 +1507,21 @@ end -- take a table {code = ..., message = ...} if the error is handled. When no code -- index is present the error is assumed to be unhandled. -function GameStore.processItemPurchase(player, offerId, offerCount, moveable, setOwner) +function GameStore.processItemPurchase(player, offerId, offerCount, movable, setOwner) if player:getFreeCapacity() < ItemType(offerId):getWeight(offerCount) then return error({ code = 0, message = "Please make sure you have free capacity to hold this item." }) end for t = 1, offerCount do - player:addItemStoreInbox(offerId, offerCount or 1, moveable, setOwner) + player:addItemStoreInbox(offerId, offerCount or 1, movable, setOwner) end end -function GameStore.processChargesPurchase(player, itemtype, name, charges, moveable, setOwner) +function GameStore.processChargesPurchase(player, itemtype, name, charges, movable, setOwner) if player:getFreeCapacity() < ItemType(itemtype):getWeight(1) then return error({ code = 0, message = "Please make sure you have free capacity to hold this item." }) end - player:addItemStoreInbox(itemtype, charges, moveable, setOwner) + player:addItemStoreInbox(itemtype, charges, movable, setOwner) end function GameStore.processSingleBlessingPurchase(player, blessId, count) @@ -1557,7 +1557,7 @@ function GameStore.processPremiumPurchase(player, offerId) end end -function GameStore.processStackablePurchase(player, offerId, offerCount, offerName, moveable, setOwner) +function GameStore.processStackablePurchase(player, offerId, offerCount, offerName, movable, setOwner) local function isKegItem(itemId) return itemId >= ITEM_KEG_START and itemId <= ITEM_KEG_END end diff --git a/data/npclib/npc_system/custom_modules.lua b/data/npclib/npc_system/custom_modules.lua index 10e16b956bd..f1438d39d64 100644 --- a/data/npclib/npc_system/custom_modules.lua +++ b/data/npclib/npc_system/custom_modules.lua @@ -137,7 +137,7 @@ local hints = { health points anymore, eat something.", [6] = "Always eat as much food as possible. This way, you'll regenerate health points for a longer period of time.", [7] = "After you have killed a monster, you have 10 seconds in which the corpse \z - is not moveable and no one else but you can loot it.", + is not movable and no one else but you can loot it.", [8] = "Be careful when you approach three or more monsters because you only can block the attacks of two. \z In such a situation even a few rats can do severe damage or even kill you.", [9] = "There are many ways to gather food. Many creatures drop food but you can also pick blueberries or bake \z diff --git a/src/creatures/monsters/monster.cpp b/src/creatures/monsters/monster.cpp index 35365a609dc..c0b09216f8a 100644 --- a/src/creatures/monsters/monster.cpp +++ b/src/creatures/monsters/monster.cpp @@ -1088,7 +1088,7 @@ void Monster::pushItems(std::shared_ptr tile, const Direction &nextDirecti auto it = items->begin(); while (it != items->end()) { std::shared_ptr item = *it; - if (item && item->hasProperty(CONST_PROP_MOVEABLE) && (item->hasProperty(CONST_PROP_BLOCKPATH) || item->hasProperty(CONST_PROP_BLOCKSOLID)) && item->canBeMoved()) { + if (item && item->hasProperty(CONST_PROP_MOVABLE) && (item->hasProperty(CONST_PROP_BLOCKPATH) || item->hasProperty(CONST_PROP_BLOCKSOLID)) && item->canBeMoved()) { if (moveCount < 20 && pushItem(item, nextDirection)) { ++moveCount; } else if (!item->isCorpse() && g_game().internalRemoveItem(item) == RETURNVALUE_NOERROR) { diff --git a/src/creatures/players/player.cpp b/src/creatures/players/player.cpp index 867b32dbefb..452d200f611 100644 --- a/src/creatures/players/player.cpp +++ b/src/creatures/players/player.cpp @@ -3378,8 +3378,8 @@ ReturnValue Player::queryRemove(const std::shared_ptr &thing, uint32_t co return RETURNVALUE_NOTPOSSIBLE; } - if (!item->isMoveable() && !hasBitSet(FLAG_IGNORENOTMOVEABLE, flags)) { - return RETURNVALUE_NOTMOVEABLE; + if (!item->isMovable() && !hasBitSet(FLAG_IGNORENOTMOVABLE, flags)) { + return RETURNVALUE_NOTMOVABLE; } return RETURNVALUE_NOERROR; diff --git a/src/game/game.cpp b/src/game/game.cpp index 9d8d89315ce..1cca6b5f388 100644 --- a/src/game/game.cpp +++ b/src/game/game.cpp @@ -503,7 +503,7 @@ std::shared_ptr Game::internalGetThing(std::shared_ptr player, co case STACKPOS_MOVE: { std::shared_ptr item = tile->getTopDownItem(); - if (item && item->isMoveable()) { + if (item && item->isMovable()) { thing = item; } else { thing = tile->getTopVisibleCreature(player); @@ -1185,7 +1185,7 @@ void Game::playerMoveCreature(std::shared_ptr player, std::shared_ptrisPushable() && !player->hasFlag(PlayerFlags_t::CanPushAllCreatures)) || (movingCreature->isInGhostMode() && !player->isAccessPlayer()))) { - player->sendCancelMessage(RETURNVALUE_NOTMOVEABLE); + player->sendCancelMessage(RETURNVALUE_NOTMOVABLE); return; } @@ -1447,7 +1447,7 @@ void Game::playerMoveItem(std::shared_ptr player, const Position &fromPo } if (!item->isPushable() || item->hasAttribute(ItemAttribute_t::UNIQUEID)) { - player->sendCancelMessage(RETURNVALUE_NOTMOVEABLE); + player->sendCancelMessage(RETURNVALUE_NOTMOVABLE); return; } @@ -2055,7 +2055,7 @@ ReturnValue Game::internalRemoveItem(std::shared_ptr item, int32_t count / if (count == -1) { count = item->getItemCount(); } - ReturnValue ret = cylinder->queryRemove(item, count, flags | FLAG_IGNORENOTMOVEABLE); + ReturnValue ret = cylinder->queryRemove(item, count, flags | FLAG_IGNORENOTMOVABLE); if (!force && ret != RETURNVALUE_NOERROR) { g_logger().debug("{} - Failed to execute query remove", __FUNCTION__); return ret; @@ -4425,7 +4425,7 @@ void Game::playerRequestTrade(uint32_t playerId, const Position &pos, uint8_t st if (std::shared_ptr houseTile = std::dynamic_pointer_cast(tradeItem->getTile())) { const auto &house = houseTile->getHouse(); if (house && tradeItem->getRealParent() != player && (!house->isInvited(player) || house->getHouseAccessLevel(player) == HOUSE_GUEST)) { - player->sendCancelMessage(RETURNVALUE_NOTMOVEABLE); + player->sendCancelMessage(RETURNVALUE_NOTMOVABLE); return; } } diff --git a/src/io/iomap.cpp b/src/io/iomap.cpp index f11e33204ce..457f3eed6bf 100644 --- a/src/io/iomap.cpp +++ b/src/io/iomap.cpp @@ -173,9 +173,9 @@ void IOMap::parseTileArea(FileStream &stream, Map &map, const Position &pos) { const auto item = std::make_shared(); item->id = id; - if (tile->isHouse() && iType.moveable) { + if (tile->isHouse() && iType.movable) { g_logger().warn("[IOMap::loadMap] - " - "Moveable item with ID: {}, in house: {}, " + "Movable item with ID: {}, in house: {}, " "at position: x {}, y {}, z {}", id, tile->houseId, x, y, z); } else if (iType.isGroundTile()) { @@ -207,9 +207,9 @@ void IOMap::parseTileArea(FileStream &stream, Map &map, const Position &pos) { if (tile->isHouse() && iType.isBed()) { // nothing - } else if (tile->isHouse() && iType.moveable) { + } else if (tile->isHouse() && iType.movable) { g_logger().warn("[IOMap::loadMap] - " - "Moveable item with ID: {}, in house: {}, " + "Movable item with ID: {}, in house: {}, " "at position: x {}, y {}, z {}", id, tile->houseId, x, y, z); } else if (iType.isGroundTile()) { diff --git a/src/io/iomapserialize.cpp b/src/io/iomapserialize.cpp index 7f351d2b617..ad1a59e67f6 100644 --- a/src/io/iomapserialize.cpp +++ b/src/io/iomapserialize.cpp @@ -138,14 +138,14 @@ bool IOMapSerialize::loadItem(PropStream &propStream, std::shared_ptr } const ItemType &iType = Item::items[id]; - if (iType.isBed() || iType.moveable || !tile || iType.isCarpet()) { + if (iType.isBed() || iType.movable || !tile || iType.isCarpet()) { // create a new item auto item = Item::CreateItem(id); if (item) { if (item->unserializeAttr(propStream)) { - // Remove only not moveable and not sleeper bed + // Remove only not movable and not sleeper bed auto bed = item->getBed(); - if (isHouseItem && iType.isBed() && bed && bed->getSleeper() == 0 && !iType.moveable) { + if (isHouseItem && iType.isBed() && bed && bed->getSleeper() == 0 && !iType.movable) { return false; } std::shared_ptr container = item->getContainer(); diff --git a/src/items/bed.cpp b/src/items/bed.cpp index 1b1a3a7266a..a1af00b2334 100644 --- a/src/items/bed.cpp +++ b/src/items/bed.cpp @@ -99,7 +99,7 @@ bool BedItem::canUse(std::shared_ptr player) { auto firstPart = keepFirstWordOnly(partName); auto nextPartOf = keepFirstWordOnly(nextPartname); g_logger().debug("First bed part name {}, second part name {}", firstPart, nextPartOf); - if (!isMoveable() || !nextBedItem->isMoveable() || firstPart != nextPartOf) { + if (!isMovable() || !nextBedItem->isMovable() || firstPart != nextPartOf) { return false; } diff --git a/src/items/containers/container.cpp b/src/items/containers/container.cpp index f5ad4cfab60..d4d55ba6cf1 100644 --- a/src/items/containers/container.cpp +++ b/src/items/containers/container.cpp @@ -44,7 +44,7 @@ std::shared_ptr Container::create(std::shared_ptr tile) { TileItemVector* itemVector = tile->getItemList(); if (itemVector) { for (auto &item : *itemVector) { - if (((item->getContainer() || item->hasProperty(CONST_PROP_MOVEABLE)) || (item->isWrapable() && !item->hasProperty(CONST_PROP_MOVEABLE) && !item->hasProperty(CONST_PROP_BLOCKPATH))) && !item->hasAttribute(ItemAttribute_t::UNIQUEID)) { + if (((item->getContainer() || item->hasProperty(CONST_PROP_MOVABLE)) || (item->isWrapable() && !item->hasProperty(CONST_PROP_MOVABLE) && !item->hasProperty(CONST_PROP_BLOCKPATH))) && !item->hasAttribute(ItemAttribute_t::UNIQUEID)) { container->itemlist.push_front(item); item->setParent(container); } @@ -583,9 +583,9 @@ ReturnValue Container::queryRemove(const std::shared_ptr &thing, uint32_t return RETURNVALUE_NOTPOSSIBLE; } - if (!item->isMoveable() && !hasBitSet(FLAG_IGNORENOTMOVEABLE, flags)) { - g_logger().debug("{} - Item is not moveable", __FUNCTION__); - return RETURNVALUE_NOTMOVEABLE; + if (!item->isMovable() && !hasBitSet(FLAG_IGNORENOTMOVABLE, flags)) { + g_logger().debug("{} - Item is not movable", __FUNCTION__); + return RETURNVALUE_NOTMOVABLE; } std::shared_ptr houseTile = std::dynamic_pointer_cast(getTopParent()); if (houseTile) { diff --git a/src/items/functions/item/item_parse.cpp b/src/items/functions/item/item_parse.cpp index 415aa5acb99..db0c73bdc36 100644 --- a/src/items/functions/item/item_parse.cpp +++ b/src/items/functions/item/item_parse.cpp @@ -26,7 +26,7 @@ void ItemParse::initParse(const std::string &tmpStrValue, pugi::xml_node attribu ItemParse::parseRotateTo(tmpStrValue, valueAttribute, itemType); ItemParse::parseWrapContainer(tmpStrValue, valueAttribute, itemType); ItemParse::parseWrapableTo(tmpStrValue, valueAttribute, itemType); - ItemParse::parseMoveable(tmpStrValue, valueAttribute, itemType); + ItemParse::parseMovable(tmpStrValue, valueAttribute, itemType); ItemParse::parseBlockProjectTile(tmpStrValue, valueAttribute, itemType); ItemParse::parsePickupable(tmpStrValue, valueAttribute, itemType); ItemParse::parseFloorChange(tmpStrValue, valueAttribute, itemType); @@ -196,10 +196,10 @@ void ItemParse::parseWrapableTo(const std::string &tmpStrValue, pugi::xml_attrib } } -void ItemParse::parseMoveable(const std::string &tmpStrValue, pugi::xml_attribute valueAttribute, ItemType &itemType) { +void ItemParse::parseMovable(const std::string &tmpStrValue, pugi::xml_attribute valueAttribute, ItemType &itemType) { std::string stringValue = tmpStrValue; - if (stringValue == "moveable") { - itemType.moveable = valueAttribute.as_bool(); + if (stringValue == "movable") { + itemType.movable = valueAttribute.as_bool(); } } diff --git a/src/items/functions/item/item_parse.hpp b/src/items/functions/item/item_parse.hpp index 2ebffc94266..f60277ad5d7 100644 --- a/src/items/functions/item/item_parse.hpp +++ b/src/items/functions/item/item_parse.hpp @@ -30,8 +30,8 @@ const phmap::flat_hash_map ItemParseAttribut { "wrapcontainer", ITEM_PARSE_WRAPCONTAINER }, { "wrapableto", ITEM_PARSE_WRAPABLETO }, { "unwrapableto", ITEM_PARSE_WRAPABLETO }, - { "moveable", ITEM_PARSE_MOVEABLE }, - { "movable", ITEM_PARSE_MOVEABLE }, + { "movable", ITEM_PARSE_MOVABLE }, + { "movable", ITEM_PARSE_MOVABLE }, { "blockprojectile", ITEM_PARSE_BLOCKPROJECTILE }, { "allowpickupable", ITEM_PARSE_PICKUPABLE }, { "pickupable", ITEM_PARSE_PICKUPABLE }, @@ -264,7 +264,7 @@ class ItemParse : public Items { static void parseRotateTo(const std::string &tmpStrValue, pugi::xml_attribute valueAttribute, ItemType &itemType); static void parseWrapContainer(const std::string &tmpStrValue, pugi::xml_attribute valueAttribute, ItemType &itemType); static void parseWrapableTo(const std::string &tmpStrValue, pugi::xml_attribute valueAttribute, ItemType &itemType); - static void parseMoveable(const std::string &tmpStrValue, pugi::xml_attribute valueAttribute, ItemType &itemType); + static void parseMovable(const std::string &tmpStrValue, pugi::xml_attribute valueAttribute, ItemType &itemType); static void parseBlockProjectTile(const std::string &tmpStrValue, pugi::xml_attribute valueAttribute, ItemType &itemType); static void parsePickupable(const std::string &tmpStrValue, pugi::xml_attribute valueAttribute, ItemType &itemType); static void parseFloorChange(const std::string &tmpStrValue, pugi::xml_attribute valueAttribute, ItemType &itemType); diff --git a/src/items/item.cpp b/src/items/item.cpp index 87a3abd7d63..0418fa6da3e 100644 --- a/src/items/item.cpp +++ b/src/items/item.cpp @@ -131,7 +131,7 @@ std::shared_ptr Item::CreateItemAsContainer(const uint16_t type, uint it.id == 0 || it.stackable || it.multiUse - || it.moveable + || it.movable || it.pickupable || it.isDepot() || it.isSplash() @@ -850,7 +850,7 @@ void Item::serializeAttr(PropWriteStream &propWriteStream) const { propWriteStream.write(charges); } - if (it.moveable) { + if (it.movable) { if (auto actionId = getAttribute(ItemAttribute_t::ACTIONID)) { propWriteStream.write(ATTR_ACTION_ID); propWriteStream.write(actionId); @@ -1044,7 +1044,7 @@ bool Item::hasProperty(ItemProperty prop) const { switch (prop) { case CONST_PROP_BLOCKSOLID: return it.blockSolid; - case CONST_PROP_MOVEABLE: + case CONST_PROP_MOVABLE: return canBeMoved(); case CONST_PROP_HASHEIGHT: return it.hasHeight; @@ -1081,7 +1081,7 @@ bool Item::canBeMoved() const { if (hasAttribute(ItemAttribute_t::ACTIONID) && immovableActionIds.contains(static_cast(getAttribute(ItemAttribute_t::ACTIONID)))) { return false; } - return isMoveable(); + return isMovable(); } void Item::checkDecayMapItemOnMove() { @@ -1904,7 +1904,7 @@ std::string Item::parseImbuementDescription(std::shared_ptr item) { bool Item::isSavedToHouses() { const auto &it = items[id]; - return it.moveable || it.isWrappable() || it.isCarpet() || getDoor() || (getContainer() && !getContainer()->empty()) || it.canWriteText || getBed() || it.m_transformOnUse; + return it.movable || it.isWrappable() || it.isCarpet() || getDoor() || (getContainer() && !getContainer()->empty()) || it.canWriteText || getBed() || it.m_transformOnUse; } SoundEffect_t Item::getMovementSound(std::shared_ptr toCylinder) const { diff --git a/src/items/item.hpp b/src/items/item.hpp index 956adad61cf..cc9ce2830fa 100644 --- a/src/items/item.hpp +++ b/src/items/item.hpp @@ -314,7 +314,7 @@ class Item : virtual public Thing, public ItemProperties, public SharedObject { virtual void serializeAttr(PropWriteStream &propWriteStream) const; bool isPushable() override final { - return isMoveable(); + return isMovable(); } int32_t getThrowRange() const override final { return (isPickupable() ? 15 : 2); @@ -447,8 +447,8 @@ class Item : virtual public Thing, public ItemProperties, public SharedObject { bool isWrapContainer() const { return items[id].wrapContainer; } - bool isMoveable() const { - return items[id].moveable; + bool isMovable() const { + return items[id].movable; } bool isCorpse() const { return items[id].isCorpse; diff --git a/src/items/items.cpp b/src/items/items.cpp index 5b4a7419ee5..6c517c8a1ed 100644 --- a/src/items/items.cpp +++ b/src/items/items.cpp @@ -166,7 +166,7 @@ void Items::loadFromProtobuf() { iType.wrapable = true; } iType.multiUse = object.flags().multiuse(); - iType.moveable = object.flags().unmove() == false; + iType.movable = object.flags().unmove() == false; iType.canReadText = (object.flags().has_lenshelp() && object.flags().lenshelp().id() == 1112) || (object.flags().has_write() && object.flags().write().max_text_length() != 0) || (object.flags().has_write_once() && object.flags().write_once().max_text_length_once() != 0); iType.canReadText = object.flags().has_write() || object.flags().has_write_once(); iType.isVertical = object.flags().has_hook() && object.flags().hook().direction() == HOOK_TYPE_SOUTH; diff --git a/src/items/items.hpp b/src/items/items.hpp index 5320ec86ab5..b04e128fd7f 100644 --- a/src/items/items.hpp +++ b/src/items/items.hpp @@ -326,7 +326,7 @@ class ItemType { bool wrapable = false; bool wrapContainer = false; bool multiUse = false; - bool moveable = false; + bool movable = false; bool canReadText = false; bool canWriteText = false; bool isVertical = false; diff --git a/src/items/items_definitions.hpp b/src/items/items_definitions.hpp index 4e8fffd3a37..bd5c152d378 100644 --- a/src/items/items_definitions.hpp +++ b/src/items/items_definitions.hpp @@ -19,7 +19,7 @@ enum ItemProperty { CONST_PROP_BLOCKPATH, CONST_PROP_ISVERTICAL, CONST_PROP_ISHORIZONTAL, - CONST_PROP_MOVEABLE, + CONST_PROP_MOVABLE, CONST_PROP_IMMOVABLEBLOCKSOLID, CONST_PROP_IMMOVABLEBLOCKPATH, CONST_PROP_IMMOVABLENOFIELDBLOCKPATH, @@ -43,7 +43,7 @@ enum ReturnValue { RETURNVALUE_THEREISNOWAY, RETURNVALUE_DESTINATIONOUTOFREACH, RETURNVALUE_CREATUREBLOCK, - RETURNVALUE_NOTMOVEABLE, + RETURNVALUE_NOTMOVABLE, RETURNVALUE_DROPTWOHANDEDITEM, RETURNVALUE_BOTHHANDSNEEDTOBEFREE, RETURNVALUE_CANONLYUSEONEWEAPON, @@ -434,7 +434,7 @@ enum TileFlags_t : uint32_t { TILESTATE_IMMOVABLENOFIELDBLOCKPATH = 1 << 21, TILESTATE_NOFIELDBLOCKPATH = 1 << 22, TILESTATE_SUPPORTS_HANGABLE = 1 << 23, - TILESTATE_MOVEABLE = 1 << 24, + TILESTATE_MOVABLE = 1 << 24, TILESTATE_ISHORIZONTAL = 1 << 25, TILESTATE_ISVERTICAL = 1 << 26, TILESTATE_BLOCKPROJECTILE = 1 << 27, @@ -458,7 +458,7 @@ enum CylinderFlags_t { FLAG_CHILDISOWNER = 1 << 3, // Used by containers to query capacity of the carrier (player) FLAG_PATHFINDING = 1 << 4, // An additional check is done for floor changing/teleport items FLAG_IGNOREFIELDDAMAGE = 1 << 5, // Bypass field damage checks - FLAG_IGNORENOTMOVEABLE = 1 << 6, // Bypass check for mobility + FLAG_IGNORENOTMOVABLE = 1 << 6, // Bypass check for mobility FLAG_IGNOREAUTOSTACK = 1 << 7, // queryDestination will not try to stack items together }; @@ -483,7 +483,7 @@ enum ItemParseAttributes_t { ITEM_PARSE_WRAPCONTAINER, ITEM_PARSE_IMBUEMENT, ITEM_PARSE_WRAPABLETO, - ITEM_PARSE_MOVEABLE, + ITEM_PARSE_MOVABLE, ITEM_PARSE_BLOCKPROJECTILE, ITEM_PARSE_PICKUPABLE, ITEM_PARSE_FLOORCHANGE, diff --git a/src/items/tile.cpp b/src/items/tile.cpp index cc9d1160211..35264469171 100644 --- a/src/items/tile.cpp +++ b/src/items/tile.cpp @@ -39,8 +39,8 @@ bool Tile::hasProperty(ItemProperty prop) const { return hasFlag(TILESTATE_ISVERTICAL); case CONST_PROP_ISHORIZONTAL: return hasFlag(TILESTATE_ISHORIZONTAL); - case CONST_PROP_MOVEABLE: - return hasFlag(TILESTATE_MOVEABLE); + case CONST_PROP_MOVABLE: + return hasFlag(TILESTATE_MOVABLE); case CONST_PROP_IMMOVABLEBLOCKSOLID: return hasFlag(TILESTATE_IMMOVABLEBLOCKSOLID); case CONST_PROP_IMMOVABLEBLOCKPATH: @@ -357,7 +357,7 @@ std::shared_ptr Tile::getTopVisibleThing(std::shared_ptr creatu } void Tile::onAddTileItem(std::shared_ptr item) { - if ((item->hasProperty(CONST_PROP_MOVEABLE) || item->getContainer()) || (item->isWrapable() && !item->hasProperty(CONST_PROP_MOVEABLE) && !item->hasProperty(CONST_PROP_BLOCKPATH))) { + if ((item->hasProperty(CONST_PROP_MOVABLE) || item->getContainer()) || (item->isWrapable() && !item->hasProperty(CONST_PROP_MOVABLE) && !item->hasProperty(CONST_PROP_BLOCKPATH))) { auto it = g_game().browseFields.find(static_self_cast()); if (it != g_game().browseFields.end()) { auto lockedCylinder = it->second.lock(); @@ -393,7 +393,7 @@ void Tile::onAddTileItem(std::shared_ptr item) { } } - if (item->isCarpet() && !item->isMoveable()) { + if (item->isCarpet() && !item->isMovable()) { if (getTopTopItem() && getTopTopItem()->canReceiveAutoCarpet()) { return; } @@ -430,7 +430,7 @@ void Tile::onAddTileItem(std::shared_ptr item) { } void Tile::onUpdateTileItem(std::shared_ptr oldItem, const ItemType &oldType, std::shared_ptr newItem, const ItemType &newType) { - if ((newItem->hasProperty(CONST_PROP_MOVEABLE) || newItem->getContainer()) || (newItem->isWrapable() && newItem->hasProperty(CONST_PROP_MOVEABLE) && !oldItem->hasProperty(CONST_PROP_BLOCKPATH))) { + if ((newItem->hasProperty(CONST_PROP_MOVABLE) || newItem->getContainer()) || (newItem->isWrapable() && newItem->hasProperty(CONST_PROP_MOVABLE) && !oldItem->hasProperty(CONST_PROP_BLOCKPATH))) { auto it = g_game().browseFields.find(getTile()); if (it != g_game().browseFields.end()) { auto lockedCylinder = it->second.lock(); @@ -442,7 +442,7 @@ void Tile::onUpdateTileItem(std::shared_ptr oldItem, const ItemType &oldTy } } } - } else if ((oldItem->hasProperty(CONST_PROP_MOVEABLE) || oldItem->getContainer()) || (oldItem->isWrapable() && !oldItem->hasProperty(CONST_PROP_MOVEABLE) && !oldItem->hasProperty(CONST_PROP_BLOCKPATH))) { + } else if ((oldItem->hasProperty(CONST_PROP_MOVABLE) || oldItem->getContainer()) || (oldItem->isWrapable() && !oldItem->hasProperty(CONST_PROP_MOVABLE) && !oldItem->hasProperty(CONST_PROP_BLOCKPATH))) { auto it = g_game().browseFields.find(getTile()); if (it != g_game().browseFields.end()) { auto lockedCylinder = it->second.lock(); @@ -472,7 +472,7 @@ void Tile::onUpdateTileItem(std::shared_ptr oldItem, const ItemType &oldTy } void Tile::onRemoveTileItem(const CreatureVector &spectators, const std::vector &oldStackPosVector, std::shared_ptr item) { - if ((item->hasProperty(CONST_PROP_MOVEABLE) || item->getContainer()) || (item->isWrapable() && !item->hasProperty(CONST_PROP_MOVEABLE) && !item->hasProperty(CONST_PROP_BLOCKPATH))) { + if ((item->hasProperty(CONST_PROP_MOVABLE) || item->getContainer()) || (item->isWrapable() && !item->hasProperty(CONST_PROP_MOVABLE) && !item->hasProperty(CONST_PROP_BLOCKPATH))) { auto it = g_game().browseFields.find(getTile()); if (it != g_game().browseFields.end()) { auto lockedCylinder = it->second.lock(); @@ -523,7 +523,7 @@ void Tile::onRemoveTileItem(const CreatureVector &spectators, const std::vector< } } - if (item->isCarpet() && !item->isMoveable()) { + if (item->isCarpet() && !item->isMovable()) { if (getTopTopItem() && getTopTopItem()->canReceiveAutoCarpet()) { return; } @@ -739,7 +739,7 @@ ReturnValue Tile::queryAdd(int32_t, const std::shared_ptr &thing, uint32_ // FLAG_IGNOREBLOCKITEM is set if (ground) { const ItemType &iiType = Item::items[ground->getID()]; - if (iiType.blockSolid && (!iiType.moveable || ground->hasAttribute(ItemAttribute_t::UNIQUEID))) { + if (iiType.blockSolid && (!iiType.movable || ground->hasAttribute(ItemAttribute_t::UNIQUEID))) { return RETURNVALUE_NOTPOSSIBLE; } } @@ -747,7 +747,7 @@ ReturnValue Tile::queryAdd(int32_t, const std::shared_ptr &thing, uint32_ if (const auto items = getItemList()) { for (auto &item : *items) { const ItemType &iiType = Item::items[item->getID()]; - if (iiType.blockSolid && (!iiType.moveable || item->hasAttribute(ItemAttribute_t::UNIQUEID))) { + if (iiType.blockSolid && (!iiType.movable || item->hasAttribute(ItemAttribute_t::UNIQUEID))) { return RETURNVALUE_NOTPOSSIBLE; } } @@ -854,8 +854,8 @@ ReturnValue Tile::queryRemove(const std::shared_ptr &thing, uint32_t coun return RETURNVALUE_NOTPOSSIBLE; } - if (!item->isMoveable() && !hasBitSet(FLAG_IGNORENOTMOVEABLE, tileFlags)) { - return RETURNVALUE_NOTMOVEABLE; + if (!item->isMovable() && !hasBitSet(FLAG_IGNORENOTMOVABLE, tileFlags)) { + return RETURNVALUE_NOTMOVABLE; } return RETURNVALUE_NOERROR; @@ -1684,8 +1684,8 @@ void Tile::setTileFlags(const std::shared_ptr &item) { setFlag(TILESTATE_IMMOVABLEBLOCKPATH); } - if (item->hasProperty(CONST_PROP_MOVEABLE)) { - setFlag(TILESTATE_MOVEABLE); + if (item->hasProperty(CONST_PROP_MOVABLE)) { + setFlag(TILESTATE_MOVABLE); } if (item->hasProperty(CONST_PROP_ISHORIZONTAL)) { @@ -1745,8 +1745,8 @@ void Tile::resetTileFlags(const std::shared_ptr &item) { resetFlag(TILESTATE_IMMOVABLENOFIELDBLOCKPATH); } - if (item->hasProperty(CONST_PROP_MOVEABLE) && !hasProperty(item, CONST_PROP_MOVEABLE)) { - resetFlag(TILESTATE_MOVEABLE); + if (item->hasProperty(CONST_PROP_MOVABLE) && !hasProperty(item, CONST_PROP_MOVABLE)) { + resetFlag(TILESTATE_MOVABLE); } if (item->hasProperty(CONST_PROP_ISHORIZONTAL) && !hasProperty(item, CONST_PROP_ISHORIZONTAL)) { @@ -1796,7 +1796,7 @@ void Tile::resetTileFlags(const std::shared_ptr &item) { } } -bool Tile::isMoveableBlocking() const { +bool Tile::isMovableBlocking() const { return !ground || hasFlag(TILESTATE_BLOCKSOLID); } diff --git a/src/items/tile.hpp b/src/items/tile.hpp index 2493974c950..749c4f089fa 100644 --- a/src/items/tile.hpp +++ b/src/items/tile.hpp @@ -149,7 +149,7 @@ class Tile : public Cylinder, public SharedObject { std::shared_ptr getBottomVisibleCreature(std::shared_ptr creature) const; std::shared_ptr getTopTopItem() const; std::shared_ptr getTopDownItem() const; - bool isMoveableBlocking() const; + bool isMovableBlocking() const; std::shared_ptr getTopVisibleThing(std::shared_ptr creature); std::shared_ptr getItemByTopOrder(int32_t topOrder); diff --git a/src/items/trashholder.cpp b/src/items/trashholder.cpp index 835558d6244..40c1f0e49b4 100644 --- a/src/items/trashholder.cpp +++ b/src/items/trashholder.cpp @@ -50,7 +50,7 @@ void TrashHolder::addThing(int32_t, std::shared_ptr thing) { return; } - if (item.get() == this || !item->hasProperty(CONST_PROP_MOVEABLE)) { + if (item.get() == this || !item->hasProperty(CONST_PROP_MOVABLE)) { return; } diff --git a/src/lua/creature/raids.cpp b/src/lua/creature/raids.cpp index 3251f744e4f..aad2fd08350 100644 --- a/src/lua/creature/raids.cpp +++ b/src/lua/creature/raids.cpp @@ -540,7 +540,7 @@ bool AreaSpawnEvent::executeEvent() { bool success = false; for (int32_t tries = 0; tries < MAXIMUM_TRIES_PER_MONSTER; tries++) { std::shared_ptr tile = g_game().map.getTile(static_cast(uniform_random(fromPos.x, toPos.x)), static_cast(uniform_random(fromPos.y, toPos.y)), static_cast(uniform_random(fromPos.z, toPos.z))); - if (tile && !tile->isMoveableBlocking() && !tile->hasFlag(TILESTATE_PROTECTIONZONE) && tile->getTopCreature() == nullptr && g_game().placeCreature(monster, tile->getPosition(), false, true)) { + if (tile && !tile->isMovableBlocking() && !tile->hasFlag(TILESTATE_PROTECTIONZONE) && tile->getTopCreature() == nullptr && g_game().placeCreature(monster, tile->getPosition(), false, true)) { success = true; monster->setForgeMonster(false); break; diff --git a/src/lua/functions/core/game/global_functions.cpp b/src/lua/functions/core/game/global_functions.cpp index e2961e26215..2bf9549ff97 100644 --- a/src/lua/functions/core/game/global_functions.cpp +++ b/src/lua/functions/core/game/global_functions.cpp @@ -124,8 +124,8 @@ int GlobalFunctions::luaIsDepot(lua_State* L) { return 1; } -int GlobalFunctions::luaIsMoveable(lua_State* L) { - // isMoveable(uid) +int GlobalFunctions::luaIsMovable(lua_State* L) { + // isMovable(uid) // isMovable(uid) std::shared_ptr thing = getScriptEnv()->getThingByUID(getNumber(L, -1)); pushBoolean(L, thing && thing->isPushable()); diff --git a/src/lua/functions/core/game/global_functions.hpp b/src/lua/functions/core/game/global_functions.hpp index 3d83e03aa14..6ccb6c45d9d 100644 --- a/src/lua/functions/core/game/global_functions.hpp +++ b/src/lua/functions/core/game/global_functions.hpp @@ -37,7 +37,7 @@ class GlobalFunctions final : LuaScriptInterface { lua_register(L, "getWorldUpTime", GlobalFunctions::luaGetWorldUpTime); lua_register(L, "isDepot", GlobalFunctions::luaIsDepot); lua_register(L, "isInWar", GlobalFunctions::luaIsInWar); - lua_register(L, "isMovable", GlobalFunctions::luaIsMoveable); + lua_register(L, "isMovable", GlobalFunctions::luaIsMovable); lua_register(L, "isValidUID", GlobalFunctions::luaIsValidUID); lua_register(L, "saveServer", GlobalFunctions::luaSaveServer); lua_register(L, "sendChannelMessage", GlobalFunctions::luaSendChannelMessage); @@ -78,7 +78,7 @@ class GlobalFunctions final : LuaScriptInterface { static int luaGetWorldUpTime(lua_State* L); static int luaIsDepot(lua_State* L); static int luaIsInWar(lua_State* L); - static int luaIsMoveable(lua_State* L); + static int luaIsMovable(lua_State* L); static int luaIsValidUID(lua_State* L); static int luaSaveServer(lua_State* L); static int luaSendChannelMessage(lua_State* L); diff --git a/src/lua/functions/core/game/lua_enums.cpp b/src/lua/functions/core/game/lua_enums.cpp index 306283b0b6e..fd2f26699f4 100644 --- a/src/lua/functions/core/game/lua_enums.cpp +++ b/src/lua/functions/core/game/lua_enums.cpp @@ -137,7 +137,7 @@ void LuaEnums::initOthersEnums(lua_State* L) { registerEnum(L, FLAG_CHILDISOWNER); registerEnum(L, FLAG_PATHFINDING); registerEnum(L, FLAG_IGNOREFIELDDAMAGE); - registerEnum(L, FLAG_IGNORENOTMOVEABLE); + registerEnum(L, FLAG_IGNORENOTMOVABLE); registerEnum(L, FLAG_IGNOREAUTOSTACK); // Use with house:getAccessList, house:setAccessList @@ -687,7 +687,7 @@ void LuaEnums::initConstPropEnums(lua_State* L) { registerEnum(L, CONST_PROP_BLOCKPATH); registerEnum(L, CONST_PROP_ISVERTICAL); registerEnum(L, CONST_PROP_ISHORIZONTAL); - registerEnum(L, CONST_PROP_MOVEABLE); + registerEnum(L, CONST_PROP_MOVABLE); registerEnum(L, CONST_PROP_IMMOVABLEBLOCKSOLID); registerEnum(L, CONST_PROP_IMMOVABLEBLOCKPATH); registerEnum(L, CONST_PROP_IMMOVABLENOFIELDBLOCKPATH); @@ -1130,7 +1130,7 @@ void LuaEnums::initReturnValueEnums(lua_State* L) { registerEnum(L, RETURNVALUE_THEREISNOWAY); registerEnum(L, RETURNVALUE_DESTINATIONOUTOFREACH); registerEnum(L, RETURNVALUE_CREATUREBLOCK); - registerEnum(L, RETURNVALUE_NOTMOVEABLE); + registerEnum(L, RETURNVALUE_NOTMOVABLE); registerEnum(L, RETURNVALUE_DROPTWOHANDEDITEM); registerEnum(L, RETURNVALUE_BOTHHANDSNEEDTOBEFREE); registerEnum(L, RETURNVALUE_CANONLYUSEONEWEAPON); diff --git a/src/lua/functions/events/action_functions.cpp b/src/lua/functions/events/action_functions.cpp index f31b74618e9..e0e746d4149 100644 --- a/src/lua/functions/events/action_functions.cpp +++ b/src/lua/functions/events/action_functions.cpp @@ -166,8 +166,8 @@ int ActionFunctions::luaActionPosition(lua_State* L) { // If it is an item that can be removed, then it will be set as non-movable. ItemType &itemType = Item::items.getItemType(itemId); - if (itemType.moveable == true) { - itemType.moveable = false; + if (itemType.movable == true) { + itemType.movable = false; } g_game().setCreateLuaItems(position, itemId); diff --git a/src/lua/functions/items/item_functions.cpp b/src/lua/functions/items/item_functions.cpp index c8b7f26ed75..3e9190055c4 100644 --- a/src/lua/functions/items/item_functions.cpp +++ b/src/lua/functions/items/item_functions.cpp @@ -626,7 +626,7 @@ int ItemFunctions::luaItemMoveTo(lua_State* L) { return 1; } - uint32_t flags = getNumber(L, 3, FLAG_NOLIMIT | FLAG_IGNOREBLOCKITEM | FLAG_IGNOREBLOCKCREATURE | FLAG_IGNORENOTMOVEABLE); + uint32_t flags = getNumber(L, 3, FLAG_NOLIMIT | FLAG_IGNOREBLOCKITEM | FLAG_IGNOREBLOCKCREATURE | FLAG_IGNORENOTMOVABLE); if (item->getParent() == VirtualCylinder::virtualCylinder) { pushBoolean(L, g_game().internalAddItem(toCylinder, item, INDEX_WHEREEVER, flags) == RETURNVALUE_NOERROR); diff --git a/src/lua/functions/items/item_type_functions.cpp b/src/lua/functions/items/item_type_functions.cpp index 81711978c88..4ff757b3dcd 100644 --- a/src/lua/functions/items/item_type_functions.cpp +++ b/src/lua/functions/items/item_type_functions.cpp @@ -76,7 +76,7 @@ int ItemTypeFunctions::luaItemTypeIsMovable(lua_State* L) { // itemType:isMovable() const ItemType* itemType = getUserdata(L, 1); if (itemType) { - pushBoolean(L, itemType->moveable); + pushBoolean(L, itemType->movable); } else { lua_pushnil(L); } diff --git a/src/map/house/housetile.cpp b/src/map/house/housetile.cpp index 386b06a0873..3ed661a1c12 100644 --- a/src/map/house/housetile.cpp +++ b/src/map/house/housetile.cpp @@ -125,7 +125,7 @@ ReturnValue HouseTile::queryRemove(const std::shared_ptr &thing, uint32_t if (house && !house->isInvited(actorPlayer)) { return RETURNVALUE_NOTPOSSIBLE; } else if (house && house->getHouseAccessLevel(actorPlayer) == HOUSE_GUEST) { - return RETURNVALUE_NOTMOVEABLE; + return RETURNVALUE_NOTMOVABLE; } } return Tile::queryRemove(thing, count, flags); diff --git a/src/utils/tools.cpp b/src/utils/tools.cpp index 150d1d2238c..56c76ac0418 100644 --- a/src/utils/tools.cpp +++ b/src/utils/tools.cpp @@ -1209,7 +1209,7 @@ const char* getReturnMessage(ReturnValue value) { case RETURNVALUE_DESTINATIONOUTOFREACH: return "Destination is out of reach."; - case RETURNVALUE_NOTMOVEABLE: + case RETURNVALUE_NOTMOVABLE: return "You cannot move this object."; case RETURNVALUE_DROPTWOHANDEDITEM: