Skip to content

Commit

Permalink
mv: moveable -> movable
Browse files Browse the repository at this point in the history
  • Loading branch information
luan committed Dec 29, 2023
1 parent df811d7 commit a406496
Show file tree
Hide file tree
Showing 52 changed files with 192 additions and 192 deletions.
2 changes: 1 addition & 1 deletion data-canary/lib/core/constants.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion data-canary/lib/core/storages.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion data-canary/scripts/runes/chameleon.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions data-otservbr-global/lib/compat/compat.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion data-otservbr-global/lib/core/storages.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion data-otservbr-global/lib/quests/svargrond_arena.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion data-otservbr-global/npc/inigo.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions data-otservbr-global/scripts/globalevents/others/startup.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion data-otservbr-global/scripts/spells/runes/chameleon.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
144 changes: 72 additions & 72 deletions data-otservbr-global/startup/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
2 changes: 1 addition & 1 deletion data-otservbr-global/startup/tables/load.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion data/events/scripts/player.lua
Original file line number Diff line number Diff line change
@@ -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
Expand Down
10 changes: 5 additions & 5 deletions data/items/items.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11607,7 +11607,7 @@
<attribute key="weight" value="700"/>
</item>
<item id="4285" article="a" name="pile of bones">
<attribute key="moveable" value="0"/>
<attribute key="movable" value="0"/>
<attribute key="containersize" value="5"/>
</item>
<item id="4286" article="a" name="dead dragon">
Expand Down Expand Up @@ -35642,7 +35642,7 @@
<item id="19201" article="an" name="ornate door with a keyhole"/>
<item id="19202" article="a" name="reward container">
<attribute key="primarytype" value="utilities"/>
<attribute key="moveable" value="0"/>
<attribute key="movable" value="0"/>
<attribute key="allowpickUpAble" value="0"/>
<attribute key="containersize" value="32"/>
</item>
Expand Down Expand Up @@ -35742,7 +35742,7 @@
<attribute key="primarytype" value="utilities"/>
<attribute key="type" value="rewardchest"/>
<attribute key="description" value="This chest contains your rewards earned in battles."/>
<attribute key="moveable" value="0"/>
<attribute key="movable" value="0"/>
<attribute key="allowpickUpAble" value="0"/>
<attribute key="containersize" value="32"/>
</item>
Expand Down Expand Up @@ -42625,7 +42625,7 @@
<item id="23721" article="a" name="gold pouch">
<attribute key="description" value="A infinity bag where you can hold coins."/>
<attribute key="containersize" value="20"/>
<attribute key="moveable" value="0"/>
<attribute key="movable" value="0"/>
</item>
<item id="23722" article="a" name="gold converter">
<attribute key="primarytype" value="tools"/>
Expand Down Expand Up @@ -50372,7 +50372,7 @@
<attribute key="primarytype" value="tools"/>
<attribute key="weight" value="1000"/>
<attribute key="description" value="This mysterious lamp summons your very own personal hireling."/>
<attribute key="moveable" value="0"/>
<attribute key="movable" value="0"/>
</item>
<item id="29433" article="a" name="chest">
<attribute key="primarytype" value="containers"/>
Expand Down
Loading

0 comments on commit a406496

Please sign in to comment.