8 stages of wheat

This commit is contained in:
Wuzzy 2017-04-01 04:41:59 +02:00
parent 2025505b64
commit 5bb5516706
12 changed files with 48 additions and 80 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 229 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 625 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 748 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 345 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 424 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 644 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 833 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 975 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 941 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 958 B

View File

Before

Width:  |  Height:  |  Size: 842 B

After

Width:  |  Height:  |  Size: 842 B

View File

@ -10,78 +10,52 @@ minetest.register_craftitem("mcl_farming:wheat_seeds", {
end
})
minetest.register_node("mcl_farming:wheat_1", {
description = "Premature Wheat Plant (First Stage)",
_doc_items_entry_name = "Premature Wheat Plant",
_doc_items_longdesc = "Premature wheat plants grow on farmland under sunlight in 4 stages. On hydrated farmland, they grow faster. They can be harvested at any time but will only yield a profit when mature.",
paramtype = "light",
paramtype2 = "meshoptions",
place_param2 = 3,
sunlight_propagates = true,
walkable = false,
drawtype = "plantlike",
drop = "mcl_farming:wheat_seeds",
tiles = {"farming_wheat_1.png"},
inventory_image = "farming_wheat_1.png",
wield_image = "farming_wheat_1.png",
selection_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, -0.125, 0.5}
},
},
groups = {dig_immediate=3, not_in_creative_inventory=1, dig_by_water=1, dig_by_piston=1},
sounds = mcl_sounds.node_sound_leaves_defaults(),
_mcl_blast_resistance = 0,
})
local sel_heights = {
-5/16,
-2/16,
0,
3/16,
5/16,
6/16,
7/16,
}
minetest.register_node("mcl_farming:wheat_2", {
description = "Premature Wheat Plant (Second Stage)",
_doc_items_create_entry = false,
sunlight_propagates = true,
paramtype = "light",
paramtype2 = "meshoptions",
place_param2 = 3,
walkable = false,
drawtype = "plantlike",
drop = "mcl_farming:wheat_seeds",
tiles = {"farming_wheat_2.png"},
inventory_image = "farming_wheat_2.png",
wield_image = "farming_wheat_2.png",
selection_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, -0.25, 0.5}
},
},
groups = {dig_immediate=3, not_in_creative_inventory=1, dig_by_water=1, dig_by_piston=1},
sounds = mcl_sounds.node_sound_leaves_defaults(),
_mcl_blast_resistance = 0,
})
for i=1,7 do
local create, name, longdesc
if i == 1 then
create = true
name = "Premature Wheat Plant"
longdesc = "Premature wheat plants grow on farmland under sunlight in 8 stages. On hydrated farmland, they grow faster. They can be harvested at any time but will only yield a profit when mature."
else
create = false
end
minetest.register_node("mcl_farming:wheat_3", {
description = "Premature Wheat Plant (Third Stage)",
_doc_items_create_entry = false,
sunlight_propagates = true,
paramtype = "light",
paramtype2 = "meshoptions",
place_param2 = 3,
walkable = false,
drawtype = "plantlike",
drop = "mcl_farming:wheat_seeds",
tiles = {"farming_wheat_3.png"},
inventory_image = "farming_wheat_3.png",
wield_image = "farming_wheat_3.png",
selection_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, 0.25, 0.5}
minetest.register_node("mcl_farming:wheat_"..i, {
description = string.format("Premature Wheat Plant (Stage %d)", i),
_doc_items_create_entry = create,
_doc_items_entry_name = name,
_doc_items_longdesc = longdesc,
paramtype = "light",
paramtype2 = "meshoptions",
place_param2 = 3,
sunlight_propagates = true,
walkable = false,
drawtype = "plantlike",
drop = "mcl_farming:wheat_seeds",
tiles = {"mcl_farming_wheat_stage_"..(i-1)..".png"},
inventory_image = "mcl_farming_wheat_stage_"..(i-1)..".png",
wield_image = "mcl_farming_wheat_stage_"..(i-1)..".png",
selection_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, sel_heights[i], 0.5}
},
},
},
groups = {dig_immediate=3, not_in_creative_inventory=1, dig_by_water=1, dig_by_piston=1},
sounds = mcl_sounds.node_sound_leaves_defaults(),
_mcl_blast_resistance = 0,
})
groups = {dig_immediate=3, not_in_creative_inventory=1, dig_by_water=1, dig_by_piston=1},
sounds = mcl_sounds.node_sound_leaves_defaults(),
_mcl_blast_resistance = 0,
})
end
minetest.register_node("mcl_farming:wheat", {
description = "Mature Wheat Plant",
@ -92,9 +66,9 @@ minetest.register_node("mcl_farming:wheat", {
place_param2 = 3,
walkable = false,
drawtype = "plantlike",
tiles = {"farming_wheat.png"},
inventory_image = "farming_wheat.png",
wield_image = "farming_wheat.png",
tiles = {"mcl_farming_wheat_stage_7.png"},
inventory_image = "mcl_farming_wheat_stage_7.png",
wield_image = "mcl_farming_wheat_stage_7.png",
drop = {
max_items = 4,
items = {
@ -104,18 +78,12 @@ minetest.register_node("mcl_farming:wheat", {
{ items = {'mcl_farming:wheat_item'} }
}
},
selection_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, 0.35, 0.5}
},
},
groups = {dig_immediate=3, not_in_creative_inventory=1, dig_by_water=1, dig_by_piston=1},
sounds = mcl_sounds.node_sound_leaves_defaults(),
_mcl_blast_resistance = 0,
})
mcl_farming:add_plant("plant_wheat", "mcl_farming:wheat", {"mcl_farming:wheat_1", "mcl_farming:wheat_2", "mcl_farming:wheat_3"}, 50, 20)
mcl_farming:add_plant("plant_wheat", "mcl_farming:wheat", {"mcl_farming:wheat_1", "mcl_farming:wheat_2", "mcl_farming:wheat_3", "mcl_farming:wheat_4", "mcl_farming:wheat_5", "mcl_farming:wheat_6", "mcl_farming:wheat_7"}, 50, 20)
minetest.register_craftitem("mcl_farming:wheat_item", {
description = "Wheat",
@ -190,7 +158,7 @@ minetest.register_craft({
})
if minetest.get_modpath("doc") then
for i=2,3 do
for i=2,7 do
doc.add_entry_alias("nodes", "mcl_farming:wheat_1", "nodes", "mcl_farming:wheat_"..i)
end
end