Skip to content
Snippets Groups Projects
Commit 2b17673b authored by Jean-Patrick Guerrero's avatar Jean-Patrick Guerrero
Browse files

Change sounds of pressure plates

parent 7ef1083a
No related branches found
No related tags found
No related merge requests found
......@@ -38,13 +38,17 @@ function plate.timer(pos)
end
for _, m in pairs({"wooden", "stone"}) do
local sound = default.node_sound_wood_defaults()
if m == "stone" then
sound = default.node_sound_stone_defaults()
end
xdecor.register("pressure_"..m.."_off", {
description = m:gsub("^%l", string.upper).." Pressure Plate",
tiles = {"xdecor_pressure_"..m..".png"},
drawtype = "nodebox",
node_box = xdecor.pixelbox(16, {{1, 0, 1, 14, 1, 14}}),
groups = {snappy=3},
sounds = default.node_sound_wood_defaults(),
sounds = sound,
sunlight_propagates = true,
on_rotate = screwdriver.rotate_simple,
on_construct = plate.construct,
......@@ -56,7 +60,7 @@ for _, m in pairs({"wooden", "stone"}) do
drawtype = "nodebox",
node_box = xdecor.pixelbox(16, {{1, 0, 1, 14, 0.4, 14}}),
groups = {snappy=3, not_in_creative_inventory=1},
sounds = default.node_sound_wood_defaults(),
sounds = sound,
drop = "xdecor:pressure_"..m.."_off",
sunlight_propagates = true,
on_rotate = screwdriver.rotate_simple
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment