From ff3c34cb2f380e78c51cc81098d552f07cbada54 Mon Sep 17 00:00:00 2001 From: Auke Kok Date: Tue, 18 Oct 2016 14:09:34 -0700 Subject: Convert to meshoptions plantlike. - remove custom model for corn! - corn model stays the same shape, param2 = 3 - tomato now is + shaped, not x, param2 = 1 --- potato.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'potato.lua') diff --git a/potato.lua b/potato.lua index 1c7b9e7..fbc529f 100644 --- a/potato.lua +++ b/potato.lua @@ -19,6 +19,7 @@ minetest.register_node("crops:potato_eyes", { wield_image = "crops_potato_eyes.png", tiles = { "crops_potato_plant_1.png" }, drawtype = "plantlike", + paramtype2 = "meshoptions", waving = 1, sunlight_propagates = false, use_texture_alpha = true, @@ -36,7 +37,7 @@ minetest.register_node("crops:potato_eyes", { if minetest.get_item_group(under.name, "soil") <= 1 then return end - crops.plant(pointed_thing.above, {name="crops:potato_plant_1"}) + crops.plant(pointed_thing.above, {name="crops:potato_plant_1", param2 = 3}) if not minetest.setting_getbool("creative_mode") then itemstack:take_item() end @@ -49,6 +50,7 @@ minetest.register_node("crops:potato_plant_" .. stage , { description = S("Potato plant"), tiles = { "crops_potato_plant_" .. stage .. ".png" }, drawtype = "plantlike", + paramtype2 = "meshoptions", waving = 1, sunlight_propagates = true, use_texture_alpha = true, @@ -139,7 +141,7 @@ minetest.register_abm({ local n = string.gsub(node.name, "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 = 3 }) end }) @@ -168,7 +170,7 @@ minetest.register_abm({ }) crops.potato_die = function(pos) - minetest.set_node(pos, { name = "crops:potato_plant_5" }) + minetest.set_node(pos, { name = "crops:potato_plant_5", param2 = 3 }) local below = { x = pos.x, y = pos.y - 1, z = pos.z } local node = minetest.get_node(below) if node.name == "crops:soil_with_potatoes" then -- cgit v1.2.3