diff options
Diffstat (limited to 'tomato.lua')
-rw-r--r-- | tomato.lua | 14 |
1 files changed, 9 insertions, 5 deletions
@@ -19,6 +19,7 @@ minetest.register_node("crops:tomato_seed", { wield_image = "crops_tomato_seed.png", tiles = { "crops_tomato_plant_1.png" }, drawtype = "plantlike", + paramtype2 = "meshoptions", waving = 1, sunlight_propagates = true, use_texture_alpha = true, @@ -34,7 +35,7 @@ minetest.register_node("crops:tomato_seed", { if minetest.get_item_group(under.name, "soil") <= 1 then return end - crops.plant(pointed_thing.above, {name="crops:tomato_plant_1"}) + crops.plant(pointed_thing.above, {name="crops:tomato_plant_1", param2 = 1}) if not minetest.setting_getbool("creative_mode") then itemstack:take_item() end @@ -47,6 +48,7 @@ minetest.register_node("crops:tomato_plant_" .. stage , { description = S("Tomato plant"), tiles = { "crops_tomato_plant_" .. stage .. ".png" }, drawtype = "plantlike", + paramtype2 = "meshoptions", waving = 1, sunlight_propagates = true, use_texture_alpha = true, @@ -66,6 +68,7 @@ minetest.register_node("crops:tomato_plant_5" , { description = S("Tomato plant"), tiles = { "crops_tomato_plant_5.png" }, drawtype = "plantlike", + paramtype2 = "meshoptions", waving = 1, sunlight_propagates = true, use_texture_alpha = true, @@ -88,7 +91,7 @@ minetest.register_node("crops:tomato_plant_5" , { local meta = minetest.get_meta(pos) local ttl = meta:get_int("crops_tomato_ttl") if ttl > 1 then - minetest.swap_node(pos, { name = "crops:tomato_plant_4"}) + minetest.swap_node(pos, { name = "crops:tomato_plant_4", param2 = 1}) meta:set_int("crops_tomato_ttl", ttl - 1) else crops.die(pos) @@ -100,6 +103,7 @@ minetest.register_node("crops:tomato_plant_6", { description = S("Tomato plant"), tiles = { "crops_tomato_plant_6.png" }, drawtype = "plantlike", + paramtype2 = "meshoptions", waving = 1, sunlight_propagates = true, use_texture_alpha = true, @@ -142,7 +146,7 @@ minetest.register_abm({ n = string.gsub(n, "3", "4") n = string.gsub(n, "2", "3") n = string.gsub(n, "1", "2") - minetest.swap_node(pos, { name = n }) + minetest.swap_node(pos, { name = n, param2 = 1 }) end }) @@ -168,7 +172,7 @@ minetest.register_abm({ ttl = math.random(4 - (4 * (damage / 100)), 6 - (5 * (damage / 100))) end if ttl > 1 then - minetest.swap_node(pos, { name = "crops:tomato_plant_5" }) + minetest.swap_node(pos, { name = "crops:tomato_plant_5", param2 = 1 }) meta:set_int("crops_tomato_ttl", ttl) else crops.die(pos) @@ -177,7 +181,7 @@ minetest.register_abm({ }) crops.tomato_die = function(pos) - minetest.set_node(pos, { name = "crops:tomato_plant_6" }) + minetest.set_node(pos, { name = "crops:tomato_plant_6", param2 = 1 }) end local properties = { |