1
0
mirror of https://github.com/mt-mods/homedecor_modpack.git synced 2024-11-18 16:10:39 +01:00

punch the large speaker to take its cover off or put it on

This commit is contained in:
Vanessa Ezekowitz 2015-03-28 00:03:38 -04:00
parent e64f69ec8c
commit ad74a7257e

View File

@ -11,6 +11,9 @@ homedecor.register("speaker", {
}, },
groups = { snappy = 3 }, groups = { snappy = 3 },
sounds = default.node_sound_leaves_defaults(), sounds = default.node_sound_leaves_defaults(),
on_punch = function(pos, node, puncher, pointed_thing)
minetest.set_node(pos, {name = "homedecor:speaker_open", param2 = node.param2})
end
}) })
homedecor.register("speaker_open", { homedecor.register("speaker_open", {
@ -23,6 +26,9 @@ homedecor.register("speaker_open", {
}, },
groups = { snappy = 3 }, groups = { snappy = 3 },
sounds = default.node_sound_leaves_defaults(), sounds = default.node_sound_leaves_defaults(),
on_punch = function(pos, node, puncher, pointed_thing)
minetest.set_node(pos, {name = "homedecor:speaker", param2 = node.param2})
end
}) })
local spk_cbox = { local spk_cbox = {