mirror of
https://repo.or.cz/mesecons_window.git
synced 2024-08-19 21:24:05 +02:00
Optional sounds
This commit is contained in:
parent
6bfeb6604d
commit
fe61103ea9
17
init.lua
17
init.lua
@ -1,12 +1,17 @@
|
||||
-- Window Block
|
||||
|
||||
local sfx
|
||||
if minetest.registered_modpath("default") then
|
||||
sfx = default.node_sound_glass_defaults()
|
||||
end
|
||||
|
||||
minetest.register_node("mesecons_window:window_closed", {
|
||||
description="Mesecon Window",
|
||||
_doc_items_longdesc = "A Mesecon receptor which is opaque when it isn't powered and is fully transparent to light and sunlight when powered.",
|
||||
tiles = {"mesecons_window_closed.png"},
|
||||
is_ground_content = false,
|
||||
groups = {cracky=3, oddly_breakable_by_hand=3},
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
sounds = sfx,
|
||||
mesecons = {conductor = {
|
||||
state = mesecon.state.off,
|
||||
rules = { --axes
|
||||
@ -31,7 +36,7 @@ minetest.register_node("mesecons_window:window_open", {
|
||||
paramtype = "light",
|
||||
groups = {cracky=3, oddly_breakable_by_hand=3, not_in_creative_inventory=1},
|
||||
drop = "mesecons_window:window_closed",
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
sounds = sfx,
|
||||
mesecons = {conductor = {
|
||||
state = mesecon.state.on,
|
||||
rules = {
|
||||
@ -59,7 +64,7 @@ minetest.register_node("mesecons_window:filter_closed", {
|
||||
_doc_items_longdesc = "A Mesecon receptor which is opaque when it isn't powered and is semi-transparent to light when powered.",
|
||||
is_ground_content = false,
|
||||
groups = {cracky=3, oddly_breakable_by_hand=3},
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
sounds = sfx,
|
||||
mesecons = {conductor = {
|
||||
state = mesecon.state.off,
|
||||
rules = { --axes
|
||||
@ -84,7 +89,7 @@ minetest.register_node("mesecons_window:filter_open", {
|
||||
paramtype = "light",
|
||||
groups = {cracky=3, oddly_breakable_by_hand=3, not_in_creative_inventory=1},
|
||||
drop = "mesecons_window:filter_closed",
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
sounds = sfx,
|
||||
mesecons = {conductor = {
|
||||
state = mesecon.state.on,
|
||||
rules = {
|
||||
@ -113,7 +118,7 @@ minetest.register_node("mesecons_window:filter2_closed", {
|
||||
tiles = {"mesecons_filter2_closed.png", "mesecons_filter2_closed_detail.png"},
|
||||
is_ground_content = false,
|
||||
groups = {cracky=3, oddly_breakable_by_hand=3},
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
sounds = sfx,
|
||||
paramtype = "light",
|
||||
sunlight_propagates = false,
|
||||
mesecons = {conductor = {
|
||||
@ -148,7 +153,7 @@ minetest.register_node("mesecons_window:filter2_open", {
|
||||
sunlight_propagates = true,
|
||||
groups = {cracky=3, oddly_breakable_by_hand=3, not_in_creative_inventory=1},
|
||||
drop = "mesecons_window:filter2_closed",
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
sounds = sfx,
|
||||
mesecons = {conductor = {
|
||||
state = mesecon.state.on,
|
||||
rules = {
|
||||
|
Loading…
Reference in New Issue
Block a user