generated from your-land/yl_template
Adds another attempt at example
This commit is contained in:
parent
3e220129b1
commit
626997268f
@ -1,39 +1,69 @@
|
||||
local overwrite = false
|
||||
|
||||
local modname = "canned_food"
|
||||
local itemname = "melon_jam"
|
||||
local stages = {}
|
||||
|
||||
stages["1"] = {
|
||||
next_stage = "2",
|
||||
duration = 5,
|
||||
next_stage_chance = {["2"] = 55, ["3"] = 99, ["4"] = 7},
|
||||
table.insert(stages, {
|
||||
--stage related
|
||||
stage_name = "yl_canned_food:melon_jam_1",
|
||||
duration = 10,
|
||||
next_stages = "yl_canned_food:melon_jam_2", --same as next_stage = { {"yl_canned_food:melon_jam_2", 1} }
|
||||
--node definition
|
||||
tiles = {"yl_canned_food_melon_jam_1.png"},
|
||||
description = "Awesome melon jam",
|
||||
node_definition = yl_canned_food.get_node_definition()
|
||||
}
|
||||
stages["2"] = {
|
||||
next_stage = "3",
|
||||
})
|
||||
|
||||
table.insert(stages, {
|
||||
--stage related
|
||||
stage_name = "yl_canned_food:melon_jam_2",
|
||||
--[[
|
||||
duration = {10, 20},
|
||||
duration = {20, 10},
|
||||
duration = {10},
|
||||
duration = {10, 10},
|
||||
]]--
|
||||
duration = 10,
|
||||
next_stage_chance = {["3"] = 99, ["4"] = 7},
|
||||
--duration = "10",
|
||||
next_stages = {
|
||||
{ "yl_canned_food:melon_jam_3", 50 },
|
||||
{ "yl_canned_food:melon_jam_4", 50 },
|
||||
{ "default:cobble", 50 }
|
||||
},
|
||||
--node definition
|
||||
tiles = {"yl_canned_food_melon_jam_2.png"},
|
||||
description = "Awesome melon jam Stage 2",
|
||||
node_definition = yl_canned_food.get_node_definition()
|
||||
}
|
||||
stages["3"] = {
|
||||
next_stage = "4",
|
||||
duration = 15,
|
||||
})
|
||||
|
||||
table.insert(stages, {
|
||||
--stage related
|
||||
stage_name = "yl_canned_food:melon_jam_3",
|
||||
--duration = nil,
|
||||
--next_stages = nil,
|
||||
--node definition
|
||||
tiles = {"yl_canned_food_melon_jam_3.png"},
|
||||
description = "Awesome melon jam Stage 3",
|
||||
node_definition = yl_canned_food.get_node_definition()
|
||||
}
|
||||
stages["4"] = {
|
||||
next_stage = "",
|
||||
duration = 0,
|
||||
next_stage_chance = {},
|
||||
tiles = {"yl_canned_food_melon_jam_4.png"},
|
||||
})
|
||||
|
||||
--[[
|
||||
table.insert(stages, {
|
||||
--stage related
|
||||
stage_name = "yl_canned_food:melon_jam_4",
|
||||
-- duration = {10, 20},
|
||||
-- duration = {20, 10},
|
||||
-- duration = {10},
|
||||
-- duration = {10, 10},
|
||||
duration = 10,
|
||||
duration = "10",
|
||||
next_stages = {
|
||||
{ "yl_canned_food:melon_jam_1", 50 },
|
||||
{ "yl_canned_food:melon_jam_2", 50 }
|
||||
},
|
||||
--node definition
|
||||
tiles = {"yl_canned_food_melon_jam_2.png"},
|
||||
description = "Awesome melon jam Stage 4",
|
||||
node_definition = yl_canned_food.get_node_definition()
|
||||
}
|
||||
})
|
||||
]]--
|
||||
|
||||
assert(yl_api_food.register_stages(modname, itemname, stages, overwrite))
|
||||
assert(yl_api_food.register_stages(stages, overwrite))
|
||||
|
Loading…
Reference in New Issue
Block a user