generated from your-land/yl_template
Adds next attempt at example
This commit is contained in:
parent
e6bd3915b1
commit
3e220129b1
@ -18,6 +18,4 @@ local function get_node_definition()
|
|||||||
return t
|
return t
|
||||||
end
|
end
|
||||||
|
|
||||||
function yl_canned_food.get_node_definition()
|
function yl_canned_food.get_node_definition() return get_node_definition() end
|
||||||
return get_node_definition()
|
|
||||||
end
|
|
||||||
|
|||||||
@ -1,43 +1,39 @@
|
|||||||
|
local overwrite = false
|
||||||
|
|
||||||
local modname = "canned_food"
|
local modname = "canned_food"
|
||||||
local itemname = "melon_jam"
|
local itemname = "melon_jam"
|
||||||
local table_stages = {
|
local stages = {}
|
||||||
{
|
|
||||||
stage = "1",
|
stages["1"] = {
|
||||||
next_stage = "2",
|
next_stage = "2",
|
||||||
duration = 5,
|
duration = 5,
|
||||||
next_stage_chance = {["2"] = 55, ["3"] = 99, ["4"] = 7},
|
next_stage_chance = {["2"] = 55, ["3"] = 99, ["4"] = 7},
|
||||||
tiles = {"yl_canned_food_melon_jam_1.png"},
|
tiles = {"yl_canned_food_melon_jam_1.png"},
|
||||||
description = "Awesome melon jam",
|
description = "Awesome melon jam",
|
||||||
node_definition_overwrite = yl_canned_food.get_node_definition()
|
node_definition = yl_canned_food.get_node_definition()
|
||||||
},
|
}
|
||||||
{
|
stages["2"] = {
|
||||||
stage = "2",
|
next_stage = "3",
|
||||||
next_stage = "3",
|
duration = 10,
|
||||||
duration = 10,
|
next_stage_chance = {["3"] = 99, ["4"] = 7},
|
||||||
next_stage_chance = {["3"] = 99, ["4"] = 7},
|
tiles = {"yl_canned_food_melon_jam_2.png"},
|
||||||
tiles = {"yl_canned_food_melon_jam_2.png"},
|
description = "Awesome melon jam Stage 2",
|
||||||
description = "Awesome melon jam Stage 2",
|
node_definition = yl_canned_food.get_node_definition()
|
||||||
node_definition_overwrite = yl_canned_food.get_node_definition()
|
}
|
||||||
},
|
stages["3"] = {
|
||||||
{
|
next_stage = "4",
|
||||||
stage = "3",
|
duration = 15,
|
||||||
next_stage = "4",
|
tiles = {"yl_canned_food_melon_jam_3.png"},
|
||||||
duration = 15,
|
description = "Awesome melon jam Stage 3",
|
||||||
next_stage_chance = {["4"] = 7},
|
node_definition = yl_canned_food.get_node_definition()
|
||||||
tiles = {"yl_canned_food_melon_jam_3.png"},
|
}
|
||||||
description = "Awesome melon jam Stage 3",
|
stages["4"] = {
|
||||||
node_definition_overwrite = yl_canned_food.get_node_definition()
|
next_stage = "",
|
||||||
},
|
duration = 0,
|
||||||
{
|
next_stage_chance = {},
|
||||||
stage = "4",
|
tiles = {"yl_canned_food_melon_jam_4.png"},
|
||||||
next_stage = "",
|
description = "Awesome melon jam Stage 4",
|
||||||
duration = 0,
|
node_definition = yl_canned_food.get_node_definition()
|
||||||
next_stage_chance = {},
|
|
||||||
tiles = {"yl_canned_food_melon_jam_4.png"},
|
|
||||||
description = "Awesome melon jam Stage 4",
|
|
||||||
node_definition_overwrite = yl_canned_food.get_node_definition()
|
|
||||||
},
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
yl_api_food.register_food(modname, itemname, table_stages)
|
assert(yl_api_food.register_stages(modname, itemname, stages, overwrite))
|
||||||
Loading…
Reference in New Issue
Block a user