diff options
author | Auke Kok <auke-jan.h.kok@intel.com> | 2016-10-18 14:09:34 -0700 |
---|---|---|
committer | Auke Kok <auke-jan.h.kok@intel.com> | 2016-10-18 14:09:34 -0700 |
commit | ff3c34cb2f380e78c51cc81098d552f07cbada54 (patch) | |
tree | 1208e4756b472df00be9a40aa76eed8d6e618a0d /potato.lua | |
parent | 3b6c0e5e782b0dc9935e9c9c363475c733bde92a (diff) |
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
Diffstat (limited to 'potato.lua')
-rw-r--r-- | potato.lua | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -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 |