From beb0dac59fb1dfadfe91557be22cb8728cad5541 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Tue, 10 Jan 2017 04:56:02 +0100 Subject: [PATCH] Fix pumpkin sounds --- mods/farming/pumpkin.lua | 4 +- mods/farming/pumpkin.old | 125 --------------------------------------- 2 files changed, 3 insertions(+), 126 deletions(-) delete mode 100644 mods/farming/pumpkin.old diff --git a/mods/farming/pumpkin.lua b/mods/farming/pumpkin.lua index e6fc3142f..dafa7a731 100644 --- a/mods/farming/pumpkin.lua +++ b/mods/farming/pumpkin.lua @@ -76,7 +76,8 @@ minetest.register_node("farming:pumpkin_face", { end end end - end + end, + sounds = default.node_sound_wood_defaults(), }) minetest.register_node("farming:pumpkintige_unconnect", { @@ -277,6 +278,7 @@ minetest.register_node("farming:pumpkin_face_light", { light_source = 14, tiles = {"farming_pumpkin_top.png", "farming_pumpkin_top.png", "farming_pumpkin_side.png", "farming_pumpkin_side.png", "farming_pumpkin_side.png", "farming_pumpkin_face_light.png"}, groups = {choppy=2, oddly_breakable_by_hand=2, flammable=2}, + sounds = default.node_sound_wood_defaults(), }) minetest.register_craft({ diff --git a/mods/farming/pumpkin.old b/mods/farming/pumpkin.old deleted file mode 100644 index c04c59ad7..000000000 --- a/mods/farming/pumpkin.old +++ /dev/null @@ -1,125 +0,0 @@ -LIGHT_MAX = 15 - -minetest.register_craftitem("farming:pumpkin_seed", { - description = "Pumpkin Seed", - stack_max = 64, - inventory_image = "farming_pumpkin_seed.png", - on_place = function(itemstack, placer, pointed_thing) - local above = minetest.env:get_node(pointed_thing.above) - if above.name == "air" then - above.name = "farming:pumpkin_1" - minetest.env:set_node(pointed_thing.above, above) - itemstack:take_item(1) - return itemstack - end - end -}) - -minetest.register_node("farming:pumpkin_1", { - paramtype = "light", - sunlight_propagates = true, - drawtype = "nodebox", - drop = "", - tiles = {"farming_pumpkin_top.png", "farming_pumpkin_top.png", "farming_pumpkin_side.png", "farming_pumpkin_side.png", "farming_pumpkin_side.png", "farming_pumpkin_side.png"}, - node_box = { - type = "fixed", - fixed = { - {-0.2, -0.5, -0.2, 0.2, -0.1, 0.2} - }, - }, - selection_box = { - type = "fixed", - fixed = { - {-0.2, -0.5, -0.2, 0.2, -0.1, 0.2} - }, - }, - groups = {choppy=2, oddly_breakable_by_hand=2, flammable=2, not_in_creative_inventory=1}, -}) - -minetest.register_node("farming:pumpkin_2", { - paramtype = "light", - sunlight_propagates = true, - drawtype = "nodebox", - drop = "", - tiles = {"farming_pumpkin_top.png", "farming_pumpkin_top.png", "farming_pumpkin_side.png", "farming_pumpkin_side.png", "farming_pumpkin_side.png", "farming_pumpkin_side.png"}, - node_box = { - type = "fixed", - fixed = { - {-0.35, -0.5, -0.35, 0.35, 0.2, 0.35} - }, - }, - selection_box = { - type = "fixed", - fixed = { - {-0.35, -0.5, -0.35, 0.35, 0.2, 0.35} - }, - }, - groups = {choppy=2, oddly_breakable_by_hand=2, flammable=2, not_in_creative_inventory=1}, -}) - -minetest.register_node("farming:pumpkin", { - description = "Pumpkin", - paramtype2 = "facedir", - tiles = {"farming_pumpkin_top.png", "farming_pumpkin_top.png", "farming_pumpkin_side.png", "farming_pumpkin_side.png", "farming_pumpkin_side.png", "farming_pumpkin_side.png"}, - groups = {choppy=2, oddly_breakable_by_hand=2}, - stack_max = 64, - on_punch = function(pos, node, puncher) - node.name = "farming:pumpkin_face" - minetest.env:set_node(pos, node) - puncher:get_inventory():add_item("main", ItemStack("farming:pumpkin_seed")) - if math.random(1, 5) == 1 then - puncher:get_inventory():add_item("main", ItemStack("farming:pumpkin_seed")) - end - end -}) - -farming:add_plant("farming:pumpkin", {"farming:pumpkin_1", "farming:pumpkin_2"}, 80, 20) - -minetest.register_node("farming:pumpkin_face", { - description = "Pumpkin Face", - stack_max = 64, - paramtype2 = "facedir", - tiles = {"farming_pumpkin_top.png", "farming_pumpkin_top.png", "farming_pumpkin_side.png", "farming_pumpkin_side.png", "farming_pumpkin_side.png", "farming_pumpkin_face.png"}, - groups = {choppy=2, oddly_breakable_by_hand=2, flammable=2}, -}) - -minetest.register_node("farming:pumpkin_face_light", { - description = "Jack O' Lantern", - stack_max = 64, - paramtype2 = "facedir", - light_source = LIGHT_MAX, - tiles = {"farming_pumpkin_top.png", "farming_pumpkin_top.png", "farming_pumpkin_side.png", "farming_pumpkin_side.png", "farming_pumpkin_side.png", "farming_pumpkin_face_light.png"}, - groups = {choppy=2, oddly_breakable_by_hand=2, flammable=2}, -}) - -minetest.register_craft({ - type = "shapeless", - output = "farming:pumpkin_face_light", - recipe = {"farming:pumpkin_face", "default:torch"} -}) - - --- ========= FUEL ========= -minetest.register_craft({ - type = "fuel", - recipe = "farming:pumpkin_seed", - burntime = 1 -}) - -minetest.register_craft({ - type = "fuel", - recipe = "farming:pumpkin", - burntime = 5 -}) - -minetest.register_craft({ - type = "fuel", - recipe = "farming:pumpkin_face", - burntime = 5 -}) - -minetest.register_craft({ - type = "fuel", - recipe = "farming:pumpkin_face_light", - burntime = 7 -})