canary/data/scripts/actions/items/roasted_meat.lua
Marco f34cb83845
enhance and refactor: multiple scripts for better functionality (#3007)
1. Fixes a minor issue where, when emptying the balloons, they were
transformed into 255 instead of being reset to 1.
2. Adjusts the usage of the "bathtub" in datapacks, in addition to the
RLMap, ensuring better compatibility.
3. Makes minor aesthetic changes to enhance the code's readability.

Resolves #2923
2024-11-13 00:38:54 -03:00

12 lines
315 B
Lua

local roastedMeat = Action()
function roastedMeat.onUse(player, item, fromPosition, target, toPosition, isHotkey)
if target.itemid == 1998 then -- campfire
item:transform(22187) -- roasted meat
toPosition:sendMagicEffect(CONST_ME_HITBYFIRE)
end
return true
end
roastedMeat:id(22186)
roastedMeat:register()