mirror of
https://github.com/minetest-mods/mesecons.git
synced 2024-12-25 01:40:18 +01:00
Digging and footstep sounds for everything that needs them! Plus, pushing buttons, punching switches, and flipping levers all make sounds.
This commit is contained in:
parent
84d5546df1
commit
3792b692aa
@ -9,6 +9,7 @@ minetest.register_node("mesecons_blinkyplant:blinky_plant_off", {
|
|||||||
walkable = false,
|
walkable = false,
|
||||||
groups = {dig_immediate=3, mesecon = 2},
|
groups = {dig_immediate=3, mesecon = 2},
|
||||||
description="Blinky Plant",
|
description="Blinky Plant",
|
||||||
|
sounds = default.node_sound_leaves_defaults(),
|
||||||
selection_box = {
|
selection_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {-0.1, -0.5, -0.1, 0.1, -0.5+0.6, 0.1},
|
fixed = {-0.1, -0.5, -0.1, 0.1, -0.5+0.6, 0.1},
|
||||||
@ -29,6 +30,7 @@ minetest.register_node("mesecons_blinkyplant:blinky_plant_on", {
|
|||||||
drop='"mesecons_blinkyplant:blinky_plant_off" 1',
|
drop='"mesecons_blinkyplant:blinky_plant_off" 1',
|
||||||
light_source = LIGHT_MAX-7,
|
light_source = LIGHT_MAX-7,
|
||||||
description = "Blinky Plant",
|
description = "Blinky Plant",
|
||||||
|
sounds = default.node_sound_leaves_defaults(),
|
||||||
selection_box = {
|
selection_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {-0.1, -0.5, -0.1, 0.1, -0.5+0.6, 0.1},
|
fixed = {-0.1, -0.5, -0.1, 0.1, -0.5+0.6, 0.1},
|
||||||
|
@ -6,6 +6,7 @@ mesecon.button_turnoff = function (pos)
|
|||||||
local node = minetest.env:get_node(pos)
|
local node = minetest.env:get_node(pos)
|
||||||
if node.name=="mesecons_button:button_on" then --has not been dug
|
if node.name=="mesecons_button:button_on" then --has not been dug
|
||||||
mesecon:swap_node(pos, "mesecons_button:button_off")
|
mesecon:swap_node(pos, "mesecons_button:button_off")
|
||||||
|
minetest.sound_play("mesecons_button_pop", {pos=pos})
|
||||||
local rules = mesecon.rules.buttonlike_get(node)
|
local rules = mesecon.rules.buttonlike_get(node)
|
||||||
mesecon:receptor_off(pos, rules)
|
mesecon:receptor_off(pos, rules)
|
||||||
end
|
end
|
||||||
@ -42,8 +43,10 @@ minetest.register_node("mesecons_button:button_off", {
|
|||||||
on_punch = function (pos, node)
|
on_punch = function (pos, node)
|
||||||
mesecon:swap_node(pos, "mesecons_button:button_on")
|
mesecon:swap_node(pos, "mesecons_button:button_on")
|
||||||
mesecon:receptor_on(pos, mesecon.rules.buttonlike_get(node))
|
mesecon:receptor_on(pos, mesecon.rules.buttonlike_get(node))
|
||||||
|
minetest.sound_play("mesecons_button_push", {pos=pos})
|
||||||
minetest.after(1, mesecon.button_turnoff, pos)
|
minetest.after(1, mesecon.button_turnoff, pos)
|
||||||
end,
|
end,
|
||||||
|
sounds = default.node_sound_stone_defaults(),
|
||||||
mesecons = {receptor = {
|
mesecons = {receptor = {
|
||||||
state = mesecon.state.off,
|
state = mesecon.state.off,
|
||||||
rules = mesecon.rules.buttonlike_get
|
rules = mesecon.rules.buttonlike_get
|
||||||
@ -80,6 +83,7 @@ minetest.register_node("mesecons_button:button_on", {
|
|||||||
groups = {dig_immediate=2, not_in_creative_inventory=1, mesecon_needs_receiver = 1},
|
groups = {dig_immediate=2, not_in_creative_inventory=1, mesecon_needs_receiver = 1},
|
||||||
drop = 'mesecons_button:button_off',
|
drop = 'mesecons_button:button_off',
|
||||||
description = "Button",
|
description = "Button",
|
||||||
|
sounds = default.node_sound_stone_defaults(),
|
||||||
mesecons = {receptor = {
|
mesecons = {receptor = {
|
||||||
state = mesecon.state.on,
|
state = mesecon.state.on,
|
||||||
rules = mesecon.rules.buttonlike_get
|
rules = mesecon.rules.buttonlike_get
|
||||||
|
BIN
mesecons_button/sounds/mesecons_button_pop.ogg
Normal file
BIN
mesecons_button/sounds/mesecons_button_pop.ogg
Normal file
Binary file not shown.
BIN
mesecons_button/sounds/mesecons_button_push.ogg
Normal file
BIN
mesecons_button/sounds/mesecons_button_push.ogg
Normal file
Binary file not shown.
@ -152,6 +152,7 @@ minetest.register_node("mesecons_commandblock:commandblock_off", {
|
|||||||
local owner = minetest.env:get_meta(pos):get_string("owner")
|
local owner = minetest.env:get_meta(pos):get_string("owner")
|
||||||
return owner == "" or owner == player:get_player_name()
|
return owner == "" or owner == player:get_player_name()
|
||||||
end,
|
end,
|
||||||
|
sounds = default.node_sound_stone_defaults(),
|
||||||
mesecons = {effector = {
|
mesecons = {effector = {
|
||||||
action_on = commandblock_action_on
|
action_on = commandblock_action_on
|
||||||
}}
|
}}
|
||||||
@ -169,6 +170,7 @@ minetest.register_node("mesecons_commandblock:commandblock_on", {
|
|||||||
local owner = minetest.env:get_meta(pos):get_string("owner")
|
local owner = minetest.env:get_meta(pos):get_string("owner")
|
||||||
return owner == "" or owner == player:get_player_name()
|
return owner == "" or owner == player:get_player_name()
|
||||||
end,
|
end,
|
||||||
|
sounds = default.node_sound_stone_defaults(),
|
||||||
mesecons = {effector = {
|
mesecons = {effector = {
|
||||||
action_off = commandblock_action_off
|
action_off = commandblock_action_off
|
||||||
}}
|
}}
|
||||||
|
@ -153,6 +153,7 @@ doors:register_door("doors:door_wood", {
|
|||||||
groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=2,door=1},
|
groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=2,door=1},
|
||||||
tiles_bottom = {"door_wood_b.png", "door_brown.png"},
|
tiles_bottom = {"door_wood_b.png", "door_brown.png"},
|
||||||
tiles_top = {"door_wood_a.png", "door_brown.png"},
|
tiles_top = {"door_wood_a.png", "door_brown.png"},
|
||||||
|
sounds = default.node_sound_wood_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
doors:register_door("doors:door_steel", {
|
doors:register_door("doors:door_steel", {
|
||||||
@ -162,4 +163,5 @@ doors:register_door("doors:door_steel", {
|
|||||||
tiles_bottom = {"door_steel_b.png", "door_grey.png"},
|
tiles_bottom = {"door_steel_b.png", "door_grey.png"},
|
||||||
tiles_top = {"door_steel_a.png", "door_grey.png"},
|
tiles_top = {"door_steel_a.png", "door_grey.png"},
|
||||||
only_placer_can_open = true,
|
only_placer_can_open = true,
|
||||||
|
sounds = default.node_sound_stone_defaults(),
|
||||||
})
|
})
|
||||||
|
@ -110,6 +110,7 @@ minetest.register_node("mesecons_delayer:delayer_off_"..tostring(i), {
|
|||||||
end,
|
end,
|
||||||
delayer_time = delaytime,
|
delayer_time = delaytime,
|
||||||
delayer_onstate = "mesecons_delayer:delayer_on_"..tostring(i),
|
delayer_onstate = "mesecons_delayer:delayer_on_"..tostring(i),
|
||||||
|
sounds = default.node_sound_stone_defaults(),
|
||||||
mesecons = {
|
mesecons = {
|
||||||
receptor =
|
receptor =
|
||||||
{
|
{
|
||||||
|
@ -54,6 +54,7 @@ minetest.register_node("mesecons_detector:object_detector_off", {
|
|||||||
}},
|
}},
|
||||||
on_construct = object_detector_make_formspec,
|
on_construct = object_detector_make_formspec,
|
||||||
on_receive_fields = object_detector_on_receive_fields,
|
on_receive_fields = object_detector_on_receive_fields,
|
||||||
|
sounds = default.node_sound_stone_defaults(),
|
||||||
digiline = object_detector_digiline
|
digiline = object_detector_digiline
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -68,6 +69,7 @@ minetest.register_node("mesecons_detector:object_detector_on", {
|
|||||||
}},
|
}},
|
||||||
on_construct = object_detector_make_formspec,
|
on_construct = object_detector_make_formspec,
|
||||||
on_receive_fields = object_detector_on_receive_fields,
|
on_receive_fields = object_detector_on_receive_fields,
|
||||||
|
sounds = default.node_sound_stone_defaults(),
|
||||||
digiline = object_detector_digiline
|
digiline = object_detector_digiline
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -156,6 +156,7 @@ for _, gate in ipairs(gates) do
|
|||||||
end,
|
end,
|
||||||
groups = groups,
|
groups = groups,
|
||||||
drop = drop,
|
drop = drop,
|
||||||
|
sounds = default.node_sound_stone_defaults(),
|
||||||
mesecons_gate = gate.name,
|
mesecons_gate = gate.name,
|
||||||
mesecons =
|
mesecons =
|
||||||
{
|
{
|
||||||
|
@ -23,6 +23,7 @@ minetest.register_node("mesecons_hydroturbine:hydro_turbine_off", {
|
|||||||
{-0.45, 1.15, -0.1, 0.45, 1.45, 0.1},
|
{-0.45, 1.15, -0.1, 0.45, 1.45, 0.1},
|
||||||
{-0.1, 1.15, -0.45, 0.1, 1.45, 0.45}},
|
{-0.1, 1.15, -0.45, 0.1, 1.45, 0.45}},
|
||||||
},
|
},
|
||||||
|
sounds = default.node_sound_stone_defaults(),
|
||||||
mesecons = {receptor = {
|
mesecons = {receptor = {
|
||||||
state = mesecon.state.off
|
state = mesecon.state.off
|
||||||
}}
|
}}
|
||||||
@ -49,6 +50,7 @@ minetest.register_node("mesecons_hydroturbine:hydro_turbine_on", {
|
|||||||
{-0.5, 1.15, -0.1, 0.5, 1.45, 0.1},
|
{-0.5, 1.15, -0.1, 0.5, 1.45, 0.1},
|
||||||
{-0.1, 1.15, -0.5, 0.1, 1.45, 0.5}},
|
{-0.1, 1.15, -0.5, 0.1, 1.45, 0.5}},
|
||||||
},
|
},
|
||||||
|
sounds = default.node_sound_stone_defaults(),
|
||||||
mesecons = {receptor = {
|
mesecons = {receptor = {
|
||||||
state = mesecon.state.on
|
state = mesecon.state.on
|
||||||
}}
|
}}
|
||||||
|
@ -22,6 +22,7 @@ minetest.register_node("mesecons_lamp:lamp_on", {
|
|||||||
selection_box = mesecon_lamp_box,
|
selection_box = mesecon_lamp_box,
|
||||||
groups = {dig_immediate=3,not_in_creative_inventory=1, mesecon_effector_on = 1},
|
groups = {dig_immediate=3,not_in_creative_inventory=1, mesecon_effector_on = 1},
|
||||||
drop='"mesecons_lamp:lamp_off" 1',
|
drop='"mesecons_lamp:lamp_off" 1',
|
||||||
|
sounds = default.node_sound_glass_defaults(),
|
||||||
mesecons = {effector = {
|
mesecons = {effector = {
|
||||||
action_off = function (pos, node)
|
action_off = function (pos, node)
|
||||||
mesecon:swap_node(pos, "mesecons_lamp:lamp_off")
|
mesecon:swap_node(pos, "mesecons_lamp:lamp_off")
|
||||||
@ -42,6 +43,7 @@ minetest.register_node("mesecons_lamp:lamp_off", {
|
|||||||
selection_box = mesecon_lamp_box,
|
selection_box = mesecon_lamp_box,
|
||||||
groups = {dig_immediate=3, mesecon_receptor_off = 1, mesecon_effector_off = 1},
|
groups = {dig_immediate=3, mesecon_receptor_off = 1, mesecon_effector_off = 1},
|
||||||
description="Meselamp",
|
description="Meselamp",
|
||||||
|
sounds = default.node_sound_glass_defaults(),
|
||||||
mesecons = {effector = {
|
mesecons = {effector = {
|
||||||
action_on = function (pos, node)
|
action_on = function (pos, node)
|
||||||
mesecon:swap_node(pos, "mesecons_lamp:lamp_on")
|
mesecon:swap_node(pos, "mesecons_lamp:lamp_on")
|
||||||
|
@ -4,6 +4,7 @@ function mesecon:lightstone_add(name, base_item, texture_off, texture_on)
|
|||||||
inventory_image = minetest.inventorycube(texture_off),
|
inventory_image = minetest.inventorycube(texture_off),
|
||||||
groups = {cracky=2, mesecon_effector_off = 1, mesecon = 2},
|
groups = {cracky=2, mesecon_effector_off = 1, mesecon = 2},
|
||||||
description=name.." Lightstone",
|
description=name.." Lightstone",
|
||||||
|
sounds = default.node_sound_stone_defaults(),
|
||||||
mesecons = {effector = {
|
mesecons = {effector = {
|
||||||
action_on = function (pos, node)
|
action_on = function (pos, node)
|
||||||
mesecon:swap_node(pos, "mesecons_lightstone:lightstone_" .. name .. "_on")
|
mesecon:swap_node(pos, "mesecons_lightstone:lightstone_" .. name .. "_on")
|
||||||
@ -16,6 +17,7 @@ function mesecon:lightstone_add(name, base_item, texture_off, texture_on)
|
|||||||
groups = {cracky=2,not_in_creative_inventory=1, mesecon = 2},
|
groups = {cracky=2,not_in_creative_inventory=1, mesecon = 2},
|
||||||
drop = "node mesecons_lightstone:lightstone_" .. name .. "_off 1",
|
drop = "node mesecons_lightstone:lightstone_" .. name .. "_off 1",
|
||||||
light_source = LIGHT_MAX-2,
|
light_source = LIGHT_MAX-2,
|
||||||
|
sounds = default.node_sound_stone_defaults(),
|
||||||
mesecons = {effector = {
|
mesecons = {effector = {
|
||||||
action_off = function (pos, node)
|
action_off = function (pos, node)
|
||||||
mesecon:swap_node(pos, "mesecons_lightstone:lightstone_" .. name .. "_off")
|
mesecon:swap_node(pos, "mesecons_lightstone:lightstone_" .. name .. "_off")
|
||||||
|
@ -421,6 +421,7 @@ minetest.register_node(nodename, {
|
|||||||
if err then print(err) end
|
if err then print(err) end
|
||||||
reset_meta(pos, fields.code, err)
|
reset_meta(pos, fields.code, err)
|
||||||
end,
|
end,
|
||||||
|
sounds = default.node_sound_stone_defaults(),
|
||||||
mesecons = mesecons,
|
mesecons = mesecons,
|
||||||
digiline = digiline,
|
digiline = digiline,
|
||||||
is_luacontroller = true,
|
is_luacontroller = true,
|
||||||
|
@ -128,6 +128,7 @@ minetest.register_node(nodename, {
|
|||||||
yc_reset (pos)
|
yc_reset (pos)
|
||||||
update_yc(pos)
|
update_yc(pos)
|
||||||
end,
|
end,
|
||||||
|
sounds = default.node_sound_stone_defaults(),
|
||||||
mesecons = mesecons,
|
mesecons = mesecons,
|
||||||
after_dig_node = function (pos, node)
|
after_dig_node = function (pos, node)
|
||||||
rules = mesecon:get_rules(node.name)
|
rules = mesecon:get_rules(node.name)
|
||||||
|
@ -61,6 +61,7 @@ minetest.register_node("mesecons_movestones:movestone", {
|
|||||||
legacy_facedir_simple = true,
|
legacy_facedir_simple = true,
|
||||||
groups = {cracky=3},
|
groups = {cracky=3},
|
||||||
description="Movestone",
|
description="Movestone",
|
||||||
|
sounds = default.node_sound_stone_defaults(),
|
||||||
mesecons = {effector = {
|
mesecons = {effector = {
|
||||||
action_on = function (pos, node)
|
action_on = function (pos, node)
|
||||||
local direction=mesecon:get_movestone_direction(pos)
|
local direction=mesecon:get_movestone_direction(pos)
|
||||||
@ -131,6 +132,7 @@ minetest.register_node("mesecons_movestones:sticky_movestone", {
|
|||||||
legacy_facedir_simple = true,
|
legacy_facedir_simple = true,
|
||||||
groups = {cracky=3},
|
groups = {cracky=3},
|
||||||
description="Sticky Movestone",
|
description="Sticky Movestone",
|
||||||
|
sounds = default.node_sound_stone_defaults(),
|
||||||
mesecons = {effector = {
|
mesecons = {effector = {
|
||||||
action_on = function (pos, node)
|
action_on = function (pos, node)
|
||||||
local direction=mesecon:get_movestone_direction(pos)
|
local direction=mesecon:get_movestone_direction(pos)
|
||||||
|
@ -14,6 +14,7 @@ minetest.register_node("mesecons_noteblock:noteblock", {
|
|||||||
minetest.env:add_node(pos, {name = node.name, param2 = param2})
|
minetest.env:add_node(pos, {name = node.name, param2 = param2})
|
||||||
mesecon.noteblock_play(pos, param2)
|
mesecon.noteblock_play(pos, param2)
|
||||||
end,
|
end,
|
||||||
|
sounds = default.node_sound_wood_defaults(),
|
||||||
mesecons = {effector = { -- play sound when activated
|
mesecons = {effector = { -- play sound when activated
|
||||||
action_on = function (pos, node)
|
action_on = function (pos, node)
|
||||||
mesecon.noteblock_play(pos, node.param2)
|
mesecon.noteblock_play(pos, node.param2)
|
||||||
|
@ -136,6 +136,7 @@ minetest.register_node("mesecons_pistons:piston_normal_off", {
|
|||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
after_place_node = piston_orientate,
|
after_place_node = piston_orientate,
|
||||||
mesecons_piston = pistonspec_normal,
|
mesecons_piston = pistonspec_normal,
|
||||||
|
sounds = default.node_sound_wood_defaults(),
|
||||||
mesecons = {effector={
|
mesecons = {effector={
|
||||||
action_on = piston_on,
|
action_on = piston_on,
|
||||||
rules = piston_get_rules
|
rules = piston_get_rules
|
||||||
@ -163,6 +164,7 @@ minetest.register_node("mesecons_pistons:piston_normal_on", {
|
|||||||
node_box = piston_on_box,
|
node_box = piston_on_box,
|
||||||
selection_box = piston_on_box,
|
selection_box = piston_on_box,
|
||||||
mesecons_piston = pistonspec_normal,
|
mesecons_piston = pistonspec_normal,
|
||||||
|
sounds = default.node_sound_wood_defaults(),
|
||||||
mesecons = {effector={
|
mesecons = {effector={
|
||||||
action_off = piston_off,
|
action_off = piston_off,
|
||||||
rules = piston_get_rules
|
rules = piston_get_rules
|
||||||
@ -215,6 +217,7 @@ minetest.register_node("mesecons_pistons:piston_sticky_off", {
|
|||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
after_place_node = piston_orientate,
|
after_place_node = piston_orientate,
|
||||||
mesecons_piston = pistonspec_sticky,
|
mesecons_piston = pistonspec_sticky,
|
||||||
|
sounds = default.node_sound_wood_defaults(),
|
||||||
mesecons = {effector={
|
mesecons = {effector={
|
||||||
action_on = piston_on,
|
action_on = piston_on,
|
||||||
rules = piston_get_rules
|
rules = piston_get_rules
|
||||||
@ -242,6 +245,7 @@ minetest.register_node("mesecons_pistons:piston_sticky_on", {
|
|||||||
node_box = piston_on_box,
|
node_box = piston_on_box,
|
||||||
selection_box = piston_on_box,
|
selection_box = piston_on_box,
|
||||||
mesecons_piston = pistonspec_sticky,
|
mesecons_piston = pistonspec_sticky,
|
||||||
|
sounds = default.node_sound_wood_defaults(),
|
||||||
mesecons = {effector={
|
mesecons = {effector={
|
||||||
action_off = piston_off,
|
action_off = piston_off,
|
||||||
rules = piston_get_rules
|
rules = piston_get_rules
|
||||||
@ -339,6 +343,7 @@ minetest.register_node("mesecons_pistons:piston_up_normal_on", {
|
|||||||
node_box = piston_up_on_box,
|
node_box = piston_up_on_box,
|
||||||
selection_box = piston_up_on_box,
|
selection_box = piston_up_on_box,
|
||||||
mesecons_piston = pistonspec_normal_up,
|
mesecons_piston = pistonspec_normal_up,
|
||||||
|
sounds = default.node_sound_wood_defaults(),
|
||||||
mesecons = {effector={
|
mesecons = {effector={
|
||||||
action_off = piston_off,
|
action_off = piston_off,
|
||||||
}}
|
}}
|
||||||
@ -393,6 +398,7 @@ minetest.register_node("mesecons_pistons:piston_up_sticky_off", {
|
|||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
drop = "mesecons_pistons:piston_sticky_off",
|
drop = "mesecons_pistons:piston_sticky_off",
|
||||||
mesecons_piston = pistonspec_sticky_up,
|
mesecons_piston = pistonspec_sticky_up,
|
||||||
|
sounds = default.node_sound_wood_defaults(),
|
||||||
mesecons = {effector={
|
mesecons = {effector={
|
||||||
action_on = piston_on,
|
action_on = piston_on,
|
||||||
}}
|
}}
|
||||||
@ -419,6 +425,7 @@ minetest.register_node("mesecons_pistons:piston_up_sticky_on", {
|
|||||||
node_box = piston_up_on_box,
|
node_box = piston_up_on_box,
|
||||||
selection_box = piston_up_on_box,
|
selection_box = piston_up_on_box,
|
||||||
mesecons_piston = pistonspec_sticky_up,
|
mesecons_piston = pistonspec_sticky_up,
|
||||||
|
sounds = default.node_sound_wood_defaults(),
|
||||||
mesecons = {effector={
|
mesecons = {effector={
|
||||||
action_off = piston_off,
|
action_off = piston_off,
|
||||||
}}
|
}}
|
||||||
@ -491,6 +498,7 @@ minetest.register_node("mesecons_pistons:piston_down_normal_off", {
|
|||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
drop = "mesecons_pistons:piston_normal_off",
|
drop = "mesecons_pistons:piston_normal_off",
|
||||||
mesecons_piston = pistonspec_normal_down,
|
mesecons_piston = pistonspec_normal_down,
|
||||||
|
sounds = default.node_sound_wood_defaults(),
|
||||||
mesecons = {effector={
|
mesecons = {effector={
|
||||||
action_on = piston_on,
|
action_on = piston_on,
|
||||||
}}
|
}}
|
||||||
@ -517,6 +525,7 @@ minetest.register_node("mesecons_pistons:piston_down_normal_on", {
|
|||||||
node_box = piston_down_on_box,
|
node_box = piston_down_on_box,
|
||||||
selection_box = piston_down_on_box,
|
selection_box = piston_down_on_box,
|
||||||
mesecons_piston = pistonspec_normal_down,
|
mesecons_piston = pistonspec_normal_down,
|
||||||
|
sounds = default.node_sound_wood_defaults(),
|
||||||
mesecons = {effector={
|
mesecons = {effector={
|
||||||
action_off = piston_off,
|
action_off = piston_off,
|
||||||
}}
|
}}
|
||||||
@ -567,6 +576,7 @@ minetest.register_node("mesecons_pistons:piston_down_sticky_off", {
|
|||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
drop = "mesecons_pistons:piston_sticky_off",
|
drop = "mesecons_pistons:piston_sticky_off",
|
||||||
mesecons_piston = pistonspec_sticky_down,
|
mesecons_piston = pistonspec_sticky_down,
|
||||||
|
sounds = default.node_sound_wood_defaults(),
|
||||||
mesecons = {effector={
|
mesecons = {effector={
|
||||||
action_on = piston_on,
|
action_on = piston_on,
|
||||||
}}
|
}}
|
||||||
@ -593,6 +603,7 @@ minetest.register_node("mesecons_pistons:piston_down_sticky_on", {
|
|||||||
node_box = piston_down_on_box,
|
node_box = piston_down_on_box,
|
||||||
selection_box = piston_down_on_box,
|
selection_box = piston_down_on_box,
|
||||||
mesecons_piston = pistonspec_sticky_down,
|
mesecons_piston = pistonspec_sticky_down,
|
||||||
|
sounds = default.node_sound_wood_defaults(),
|
||||||
mesecons = {effector={
|
mesecons = {effector={
|
||||||
action_off = piston_off,
|
action_off = piston_off,
|
||||||
}}
|
}}
|
||||||
|
@ -15,6 +15,7 @@ minetest.register_node("mesecons_powerplant:power_plant", {
|
|||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {-0.1, -0.5, -0.1, 0.1, -0.5+0.6, 0.1},
|
fixed = {-0.1, -0.5, -0.1, 0.1, -0.5+0.6, 0.1},
|
||||||
},
|
},
|
||||||
|
sounds = default.node_sound_leaves_defaults(),
|
||||||
mesecons = {receptor = {
|
mesecons = {receptor = {
|
||||||
state = mesecon.state.on
|
state = mesecon.state.on
|
||||||
}}
|
}}
|
||||||
|
@ -85,6 +85,7 @@ function mesecon:register_pressure_plate(offstate, onstate, description, texture
|
|||||||
drop = offstate,
|
drop = offstate,
|
||||||
pressureplate = ppspec,
|
pressureplate = ppspec,
|
||||||
on_timer = pp_on_timer,
|
on_timer = pp_on_timer,
|
||||||
|
sounds = default.node_sound_wood_defaults(),
|
||||||
mesecons = {receptor = {
|
mesecons = {receptor = {
|
||||||
state = mesecon.state.on
|
state = mesecon.state.on
|
||||||
}},
|
}},
|
||||||
|
@ -5,6 +5,7 @@ minetest.register_node("mesecons_random:removestone", {
|
|||||||
inventory_image = minetest.inventorycube("jeija_removestone_inv.png"),
|
inventory_image = minetest.inventorycube("jeija_removestone_inv.png"),
|
||||||
groups = {cracky=3},
|
groups = {cracky=3},
|
||||||
description="Removestone",
|
description="Removestone",
|
||||||
|
sounds = default.node_sound_stone_defaults(),
|
||||||
mesecons = {effector = {
|
mesecons = {effector = {
|
||||||
action_on = function (pos, node)
|
action_on = function (pos, node)
|
||||||
minetest.env:remove_node(pos)
|
minetest.env:remove_node(pos)
|
||||||
|
@ -22,6 +22,7 @@ minetest.register_node("mesecons_solarpanel:solar_panel_on", {
|
|||||||
},
|
},
|
||||||
drop = "mesecons_solarpanel:solar_panel_off",
|
drop = "mesecons_solarpanel:solar_panel_off",
|
||||||
groups = {dig_immediate=3, not_in_creative_inventory = 1},
|
groups = {dig_immediate=3, not_in_creative_inventory = 1},
|
||||||
|
sounds = default.node_sound_glass_defaults(),
|
||||||
mesecons = {receptor = {
|
mesecons = {receptor = {
|
||||||
state = mesecon.state.on
|
state = mesecon.state.on
|
||||||
}}
|
}}
|
||||||
@ -51,6 +52,7 @@ minetest.register_node("mesecons_solarpanel:solar_panel_off", {
|
|||||||
},
|
},
|
||||||
groups = {dig_immediate=3},
|
groups = {dig_immediate=3},
|
||||||
description="Solar Panel",
|
description="Solar Panel",
|
||||||
|
sounds = default.node_sound_glass_defaults(),
|
||||||
mesecons = {receptor = {
|
mesecons = {receptor = {
|
||||||
state = mesecon.state.off
|
state = mesecon.state.off
|
||||||
}}
|
}}
|
||||||
|
@ -5,12 +5,14 @@ minetest.register_node("mesecons_switch:mesecon_switch_off", {
|
|||||||
paramtype2="facedir",
|
paramtype2="facedir",
|
||||||
groups = {dig_immediate=2},
|
groups = {dig_immediate=2},
|
||||||
description="Switch",
|
description="Switch",
|
||||||
|
sounds = default.node_sound_stone_defaults(),
|
||||||
mesecons = {receptor = {
|
mesecons = {receptor = {
|
||||||
state = mesecon.state.off
|
state = mesecon.state.off
|
||||||
}},
|
}},
|
||||||
on_punch = function(pos, node)
|
on_punch = function(pos, node)
|
||||||
mesecon:swap_node(pos, "mesecons_switch:mesecon_switch_on")
|
mesecon:swap_node(pos, "mesecons_switch:mesecon_switch_on")
|
||||||
mesecon:receptor_on(pos)
|
mesecon:receptor_on(pos)
|
||||||
|
minetest.sound_play("mesecons_switch", {pos=pos})
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -19,12 +21,14 @@ minetest.register_node("mesecons_switch:mesecon_switch_on", {
|
|||||||
paramtype2="facedir",
|
paramtype2="facedir",
|
||||||
groups = {dig_immediate=2,not_in_creative_inventory=1},
|
groups = {dig_immediate=2,not_in_creative_inventory=1},
|
||||||
drop='"mesecons_switch:mesecon_switch_off" 1',
|
drop='"mesecons_switch:mesecon_switch_off" 1',
|
||||||
|
sounds = default.node_sound_stone_defaults(),
|
||||||
mesecons = {receptor = {
|
mesecons = {receptor = {
|
||||||
state = mesecon.state.on
|
state = mesecon.state.on
|
||||||
}},
|
}},
|
||||||
on_punch = function(pos, node)
|
on_punch = function(pos, node)
|
||||||
mesecon:swap_node(pos, "mesecons_switch:mesecon_switch_off")
|
mesecon:swap_node(pos, "mesecons_switch:mesecon_switch_off")
|
||||||
mesecon:receptor_off(pos)
|
mesecon:receptor_off(pos)
|
||||||
|
minetest.sound_play("mesecons_switch", {pos=pos})
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
|
BIN
mesecons_switch/sounds/mesecons_switch.ogg
Normal file
BIN
mesecons_switch/sounds/mesecons_switch.ogg
Normal file
Binary file not shown.
@ -34,7 +34,9 @@ minetest.register_node("mesecons_walllever:wall_lever_off", {
|
|||||||
on_punch = function (pos, node)
|
on_punch = function (pos, node)
|
||||||
mesecon:swap_node(pos, "mesecons_walllever:wall_lever_on")
|
mesecon:swap_node(pos, "mesecons_walllever:wall_lever_on")
|
||||||
mesecon:receptor_on(pos, mesecon.rules.buttonlike_get(node))
|
mesecon:receptor_on(pos, mesecon.rules.buttonlike_get(node))
|
||||||
|
minetest.sound_play("mesecons_lever", {pos=pos})
|
||||||
end,
|
end,
|
||||||
|
sounds = default.node_sound_wood_defaults(),
|
||||||
mesecons = {receptor = {
|
mesecons = {receptor = {
|
||||||
rules = mesecon.rules.buttonlike_get,
|
rules = mesecon.rules.buttonlike_get,
|
||||||
state = mesecon.state.off
|
state = mesecon.state.off
|
||||||
@ -74,7 +76,9 @@ minetest.register_node("mesecons_walllever:wall_lever_on", {
|
|||||||
on_punch = function (pos, node)
|
on_punch = function (pos, node)
|
||||||
mesecon:swap_node(pos, "mesecons_walllever:wall_lever_off")
|
mesecon:swap_node(pos, "mesecons_walllever:wall_lever_off")
|
||||||
mesecon:receptor_off(pos, mesecon.rules.buttonlike_get(node))
|
mesecon:receptor_off(pos, mesecon.rules.buttonlike_get(node))
|
||||||
|
minetest.sound_play("mesecons_lever", {pos=pos})
|
||||||
end,
|
end,
|
||||||
|
sounds = default.node_sound_wood_defaults(),
|
||||||
mesecons = {receptor = {
|
mesecons = {receptor = {
|
||||||
rules = mesecon.rules.buttonlike_get,
|
rules = mesecon.rules.buttonlike_get,
|
||||||
state = mesecon.state.on
|
state = mesecon.state.on
|
||||||
|
BIN
mesecons_walllever/sounds/mesecons_lever.ogg
Normal file
BIN
mesecons_walllever/sounds/mesecons_lever.ogg
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user