yl_canned_food/item_apple.lua
2024-07-11 01:49:29 +02:00

38 lines
1.2 KiB
Lua

local itemstring = {"apple_jam", "apple_jam_plus"}
local itemdesc = {"Apple Jam", "Old Apple Jam"}
-- Everything below here needs to be copy-able
local stages = {}
table.insert(stages, {
stage_name = "canned_food:" .. itemstring[1],
next_stages = "canned_food:" .. itemstring[2],
duration = 600,
tiles = {"yl_canned_food_" .. itemstring[1] .. ".png"},
description = itemdesc[1],
node_definition = yl_canned_food.get_node_definition(),
overwrite = false,
restart = true
})
table.insert(stages, {
stage_name = "canned_food:" .. itemstring[2],
tiles = {"yl_canned_food_" .. itemstring[2] .. ".png"},
description = itemdesc[2],
node_definition = yl_canned_food.get_node_definition()
})
local success, good, bad, total, reasons =
yl_api_nodestages.register_stages(stages)
if (success == false) then
yl_api_nodestages.log("action", "success = " .. dump(success))
yl_api_nodestages.log("action", "good = " .. dump(good))
yl_api_nodestages.log("action", "bad = " .. dump(bad))
yl_api_nodestages.log("action", "total = " .. dump(total))
yl_api_nodestages.log("action", "reasons = " .. dump(reasons))
end
assert(success)