1
0
Fork 0

Use “#” shape for carrot, beetroot, nether wart

This commit is contained in:
Wuzzy 2017-03-14 21:45:21 +01:00
parent c826af9b44
commit 79f5c7dc5a
4 changed files with 35 additions and 7 deletions

View File

@ -153,17 +153,17 @@ mcl_dye.apply_bone_meal = function(pointed_thing)
elseif string.find(n.name, "mcl_farming:beetroot_") ~= nil then
stage = tonumber(string.sub(n.name, -1))
if stage == 1 then
minetest.add_node(pos, {name="mcl_farming:beetroot_"..math.random(stage,2)})
minetest.add_node(pos, {name="mcl_farming:beetroot_"..math.random(stage,2), param = n.param, param2 = n.param2})
else
minetest.add_node(pos, {name="mcl_farming:beetroot"})
minetest.add_node(pos, {name="mcl_farming:beetroot", param = n.param, param2 = n.param2})
end
return true
elseif string.find(n.name, "mcl_farming:carrot_") ~= nil then
stage = tonumber(string.sub(n.name, -1))
if stage == 1 then
minetest.add_node(pos, {name="mcl_farming:carrot_"..math.random(stage,2)})
minetest.add_node(pos, {name="mcl_farming:carrot_"..math.random(stage,2), param = n.param, param2 = n.param2})
else
minetest.add_node(pos, {name="mcl_farming:carrot"})
minetest.add_node(pos, {name="mcl_farming:carrot", param = n.param, param2 = n.param2})
end
return true
elseif string.find(n.name, "mcl_farming:pumpkin_") ~= nil then

View File

@ -15,6 +15,8 @@ minetest.register_node("mcl_farming:beetroot_0", {
_doc_items_longdesc = "Beetroot plants are plants which grow on farmland under sunlight in 4 stages. On hydrated farmland, they grow a bit faster. They can be harvested at any time but will only yield a profit when mature.",
_doc_items_entry_name = "Premature Beetroot Plant",
paramtype = "light",
paramtype2 = "meshoptions",
place_param2 = 3,
walkable = false,
drawtype = "plantlike",
drop = "mcl_farming:beetroot_seeds",
@ -34,6 +36,8 @@ minetest.register_node("mcl_farming:beetroot_1", {
description = "Premature Beetroot Plant (Second Stage)",
_doc_items_create_entry = false,
paramtype = "light",
paramtype2 = "meshoptions",
place_param2 = 3,
walkable = false,
drawtype = "plantlike",
drop = "mcl_farming:beetroot_seeds",
@ -53,6 +57,8 @@ minetest.register_node("mcl_farming:beetroot_2", {
description = "Premature Beetroot Plant (Third Stage)",
_doc_items_create_entry = false,
paramtype = "light",
paramtype2 = "meshoptions",
place_param2 = 3,
walkable = false,
drawtype = "plantlike",
drop = "mcl_farming:beetroot_seeds",
@ -73,6 +79,8 @@ minetest.register_node("mcl_farming:beetroot", {
_doc_items_longdesc = "A mature beetroot plant is a farming plant which is ready to be harvested for a beetroot and some beetroot seeds. It won't grow any further.",
_doc_items_create_entry = true,
paramtype = "light",
paramtype2 = "meshoptions",
place_param2 = 3,
walkable = false,
drawtype = "plantlike",
drop = {

View File

@ -3,6 +3,8 @@ minetest.register_node("mcl_farming:carrot_1", {
_doc_items_entry_name = "Premature Carrot Plant",
_doc_items_longdesc = "Carrot plants are plants which grow on farmland under sunlight in 4 stages. On hydrated farmland, they grow a bit faster. They can be harvested at any time but will only yield a profit when mature.",
paramtype = "light",
paramtype2 = "meshoptions",
place_param2 = 3,
walkable = false,
drawtype = "plantlike",
drop = "mcl_farming:carrot_item",
@ -24,6 +26,8 @@ minetest.register_node("mcl_farming:carrot_2", {
paramtype = "light",
walkable = false,
drawtype = "plantlike",
paramtype2 = "meshoptions",
place_param2 = 3,
drop = "mcl_farming:carrot_item",
tiles = {"farming_carrot_2.png"},
selection_box = {
@ -41,6 +45,8 @@ minetest.register_node("mcl_farming:carrot_3", {
description = "Premature Carrot Plant (Third Stage)",
_doc_items_create_entry = false,
paramtype = "light",
paramtype2 = "meshoptions",
place_param2 = 3,
walkable = false,
drawtype = "plantlike",
drop = "mcl_farming:carrot_item",
@ -60,6 +66,8 @@ minetest.register_node("mcl_farming:carrot", {
description = "Mature Carrot Plant",
_doc_items_longdesc = "Mature carrot plants are ready to be harvested for carrots. They won't grow any further.",
paramtype = "light",
paramtype2 = "meshoptions",
place_param2 = 3,
walkable = false,
drawtype = "plantlike",
tiles = {"farming_carrot_4.png"},

View File

@ -2,6 +2,8 @@ minetest.register_node("mcl_nether:nether_wart_0", {
description = "Premature Nether Wart",
_doc_items_longdesc = "A premature nether wart has just recently been planted on soul sand. Nether wart slowly grows on soul sand in 4 stages. Although nether wart is home to the Nether, it grows in any dimension.",
paramtype = "light",
paramtype2 = "meshoptions",
place_param2 = 3,
walkable = false,
buildable_to = true,
drawtype = "plantlike",
@ -18,7 +20,11 @@ minetest.register_node("mcl_nether:nether_wart_0", {
})
minetest.register_node("mcl_nether:nether_wart_1", {
description = "Premature Nether Wart (Stage 2)",
_doc_items_create_entry = false,
paramtype = "light",
paramtype2 = "meshoptions",
place_param2 = 3,
walkable = false,
buildable_to = true,
drawtype = "plantlike",
@ -35,9 +41,11 @@ minetest.register_node("mcl_nether:nether_wart_1", {
})
minetest.register_node("mcl_nether:nether_wart_2", {
description = "Premature Nether Wart (Stage 2)",
description = "Premature Nether Wart (Stage 3)",
_doc_items_create_entry = false,
paramtype = "light",
paramtype2 = "meshoptions",
place_param2 = 3,
walkable = false,
buildable_to = true,
drawtype = "plantlike",
@ -57,6 +65,8 @@ minetest.register_node("mcl_nether:nether_wart", {
description = "Mature Nether Wart",
_doc_items_longdesc = "The mature nether wart is a plant from the Nether and reached its full size and won't grow any further. It is ready to be harvested for its items.",
paramtype = "light",
paramtype2 = "meshoptions",
place_param2 = 3,
walkable = false,
buildable_to = true,
drawtype = "plantlike",
@ -109,7 +119,7 @@ minetest.register_craftitem("mcl_nether:nether_wart_item", {
if minetest.registered_items[minetest.get_node(placepos).name].buildable_to then
-- Place nether wart
minetest.sound_play({name="default_place_node", gain=1.0}, {pos=placepos})
minetest.set_node(placepos, {name="mcl_nether:nether_wart_0"})
minetest.set_node(placepos, {name="mcl_nether:nether_wart_0", param2 = 3})
if not minetest.setting_getbool("creative_mode") then
itemstack:take_item()
@ -148,7 +158,9 @@ minetest.register_abm({
if new_node.name == nil then
new_node.name = "mcl_nether:nether_wart"
end
minetest.swap_node(pos, new_node)
new_node.param = node.param
new_node.param2 = node.param2
minetest.set_node(pos, new_node)
end
})