generated from your-land/yl_template
Adds example
This commit is contained in:
parent
4c1822fc4d
commit
e6bd3915b1
@ -19,4 +19,7 @@ read_globals = {
|
||||
|
||||
-- MTG
|
||||
"default", "sfinv", "creative",
|
||||
|
||||
-- depency
|
||||
"yl_api_food"
|
||||
}
|
||||
|
||||
2
init.lua
2
init.lua
@ -17,7 +17,7 @@ yl_canned_food.worldpath = minetest.get_worldpath() .. DIR_DELIM
|
||||
dofile(yl_canned_food.modpath .. "texts.lua")
|
||||
dofile(yl_canned_food.modpath .. "information.lua")
|
||||
dofile(yl_canned_food.modpath .. "config.lua")
|
||||
--dofile(yl_canned_food.modpath .. "internal.lua")
|
||||
dofile(yl_canned_food.modpath .. "internal.lua")
|
||||
--dofile(yl_canned_food.modpath .. "initialize.lua")
|
||||
dofile(yl_canned_food.modpath .. "items.lua")
|
||||
|
||||
|
||||
23
internal.lua
Normal file
23
internal.lua
Normal file
@ -0,0 +1,23 @@
|
||||
local function get_node_definition()
|
||||
local t = {
|
||||
drawtype = "plantlike",
|
||||
paramtype = "light",
|
||||
is_ground_content = false,
|
||||
walkable = false,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.25, -0.5, -0.25, 0.25, 0.3, 0.25}
|
||||
},
|
||||
groups = {
|
||||
attached_node = 1,
|
||||
dig_immediate = 3,
|
||||
canned_food = 1,
|
||||
vessel = 1
|
||||
}
|
||||
}
|
||||
return t
|
||||
end
|
||||
|
||||
function yl_canned_food.get_node_definition()
|
||||
return get_node_definition()
|
||||
end
|
||||
@ -0,0 +1,43 @@
|
||||
local modname = "canned_food"
|
||||
local itemname = "melon_jam"
|
||||
local table_stages = {
|
||||
{
|
||||
stage = "1",
|
||||
next_stage = "2",
|
||||
duration = 5,
|
||||
next_stage_chance = {["2"] = 55, ["3"] = 99, ["4"] = 7},
|
||||
tiles = {"yl_canned_food_melon_jam_1.png"},
|
||||
description = "Awesome melon jam",
|
||||
node_definition_overwrite = yl_canned_food.get_node_definition()
|
||||
},
|
||||
{
|
||||
stage = "2",
|
||||
next_stage = "3",
|
||||
duration = 10,
|
||||
next_stage_chance = {["3"] = 99, ["4"] = 7},
|
||||
tiles = {"yl_canned_food_melon_jam_2.png"},
|
||||
description = "Awesome melon jam Stage 2",
|
||||
node_definition_overwrite = yl_canned_food.get_node_definition()
|
||||
},
|
||||
{
|
||||
stage = "3",
|
||||
next_stage = "4",
|
||||
duration = 15,
|
||||
next_stage_chance = {["4"] = 7},
|
||||
tiles = {"yl_canned_food_melon_jam_3.png"},
|
||||
description = "Awesome melon jam Stage 3",
|
||||
node_definition_overwrite = yl_canned_food.get_node_definition()
|
||||
},
|
||||
{
|
||||
stage = "4",
|
||||
next_stage = "",
|
||||
duration = 0,
|
||||
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)
|
||||
7
mod.conf
7
mod.conf
@ -1,6 +1,5 @@
|
||||
name = yl_canned_food
|
||||
description = A template with best practices
|
||||
depends = default
|
||||
optional_depends = moreblocks
|
||||
description = Adds canned food
|
||||
depends = yl_api_food
|
||||
author = AliasAlreadyTaken
|
||||
title = Template
|
||||
title = Canned Food
|
||||
BIN
textures/yl_canned_food_melon_jam_1.png
Normal file
BIN
textures/yl_canned_food_melon_jam_1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1010 B |
BIN
textures/yl_canned_food_melon_jam_2.png
Normal file
BIN
textures/yl_canned_food_melon_jam_2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.0 KiB |
BIN
textures/yl_canned_food_melon_jam_3.png
Normal file
BIN
textures/yl_canned_food_melon_jam_3.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
BIN
textures/yl_canned_food_melon_jam_4.png
Normal file
BIN
textures/yl_canned_food_melon_jam_4.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
Loading…
Reference in New Issue
Block a user