diff options
author | cheapie <no-email-for-you@example.com> | 2020-04-29 17:44:41 -0500 |
---|---|---|
committer | cheapie <no-email-for-you@example.com> | 2020-04-29 17:45:54 -0500 |
commit | 416286ae368f06ee35fb0e38cf7ce8fc54a11e41 (patch) | |
tree | 75820f387b9616b5a7c5c957d36aa22f3cd0e1e3 | |
download | firealarm_decoronly-416286ae368f06ee35fb0e38cf7ce8fc54a11e41.tar firealarm_decoronly-416286ae368f06ee35fb0e38cf7ce8fc54a11e41.tar.gz firealarm_decoronly-416286ae368f06ee35fb0e38cf7ce8fc54a11e41.tar.bz2 firealarm_decoronly-416286ae368f06ee35fb0e38cf7ce8fc54a11e41.tar.xz firealarm_decoronly-416286ae368f06ee35fb0e38cf7ce8fc54a11e41.zip |
Add initial content
23 files changed, 412 insertions, 0 deletions
@@ -0,0 +1,24 @@ +This is free and unencumbered software released into the public domain. + +Anyone is free to copy, modify, publish, use, compile, sell, or +distribute this software, either in source code form or as a compiled +binary, for any purpose, commercial or non-commercial, and by any +means. + +In jurisdictions that recognize copyright laws, the author or authors +of this software dedicate any and all copyright interest in the +software to the public domain. We make this dedication for the benefit +of the public at large and to the detriment of our heirs and +successors. We intend this dedication to be an overt act of +relinquishment in perpetuity of all present and future rights to this +software under copyright law. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +For more information, please refer to <http://unlicense.org/> @@ -0,0 +1,5 @@ +Fire Alarm Mod for Minetest (decorative-only version) +===================================================== + +This mod adds more or less the same nodes as the firealarm mod, but with the functionality mostly removed. +The pull stations can still be pulled and reset as before, but nothing else does anything. diff --git a/init.lua b/init.lua new file mode 100644 index 0000000..5eff4cf --- /dev/null +++ b/init.lua @@ -0,0 +1,381 @@ +if minetest.get_modpath("firealarm_common") then + error("firealarm_decoronly conflicts with firealarm. Only one of them may be installed at a time.") +end + +minetest.register_node(":firealarm:annunciator",{ + description = "Fire Alarm Annunciator", + groups = { oddly_breakable_by_hand = 1,firealarm_clearformspec = 1,}, + tiles = { + "firealarm_panel_sides.png", + "firealarm_panel_sides.png", + "firealarm_panel_sides.png", + "firealarm_panel_sides.png", + "firealarm_panel_sides.png", + "firealarm_annunciator_front_normal.png", + }, + paramtype = "light", + paramtype2 = "facedir", + drawtype = "nodebox", + node_box = { + type = "fixed", + fixed = { + {-0.2,0.13,0.4,0.2,0.34,0.5}, + }, + }, +}) + +minetest.register_alias("firealarm:annunciator_alarm","firealarm:annunciator") +minetest.register_alias("firealarm:annunciator_trouble","firealarm:annunciator") +minetest.register_alias("firealarm:annunciator_supervisory","firealarm:annunciator") + +minetest.register_node(":firealarm:hornstrobe_off",{ + description = "Fire Alarm Horn/Strobe", + groups = { oddly_breakable_by_hand = 1 }, + tiles = { + "firealarm_hornstrobe_top.png", + "firealarm_hornstrobe_top.png", + "firealarm_hornstrobe_side.png", + "firealarm_hornstrobe_side.png", + "firealarm_hornstrobe_back.png", + "firealarm_hornstrobe_front_off.png", + }, + paramtype = "light", + paramtype2 = "facedir", + drawtype = "nodebox", + node_box = { + type = "fixed", + fixed = { + {-0.15,-0.02,0.4,0.18,0.37,0.5}, + }, + }, +}) + +minetest.register_alias("firealarm:hornstrobe_on","firealarm:hornstrobe_off") + +minetest.register_node(":firealarm:remotestrobe_off",{ + description = "Fire Alarm Remote Strobe", + groups = { oddly_breakable_by_hand = 1 }, + tiles = { + "firealarm_hornstrobe_top.png", + "firealarm_hornstrobe_top.png", + "firealarm_hornstrobe_side.png", + "firealarm_hornstrobe_side.png", + "firealarm_hornstrobe_back.png", + "firealarm_hornstrobe_remotestrobe_front_off.png", + }, + paramtype = "light", + paramtype2 = "facedir", + drawtype = "nodebox", + node_box = { + type = "fixed", + fixed = { + {-0.15,-0.02,0.4,0.18,0.37,0.5}, + }, + }, +}) + +minetest.register_alias("firealarm:remotestrobe_on","firealarm:remotestrobe_off") + +minetest.register_node(":firealarm:hornstrobe_old_off",{ + description = "Fire Alarm Horn/Light Plate", + groups = { oddly_breakable_by_hand = 1 }, + tiles = { + "firealarm_hornstrobe_top.png", + "firealarm_hornstrobe_top.png", + "firealarm_hornstrobe_side.png", + "firealarm_hornstrobe_side.png", + "firealarm_hornstrobe_back.png", + "firealarm_hornstrobe_old_front_off.png", + }, + paramtype = "light", + paramtype2 = "facedir", + drawtype = "nodebox", + node_box = { + type = "fixed", + fixed = { + {-0.15,-0.02,0.4,0.18,0.37,0.5}, + }, + }, +}) + +minetest.register_alias("firealarm:hornstrobe_old_on","firealarm:hornstrobe_old_off") + +minetest.register_node(":firealarm:mesecons_input_off",{ + description = "Fire Alarm Mesecons Input Module", + groups = { oddly_breakable_by_hand = 1,not_in_creative_inventory=1, }, + drop = "", + tiles = { + "firealarm_meseconsio_input_off.png", + "firealarm_meseconsio_sides.png", + "firealarm_meseconsio_sides.png", + "firealarm_meseconsio_sides.png", + "firealarm_meseconsio_sides.png", + "firealarm_meseconsio_sides.png", + }, + paramtype = "light", + paramtype2 = "facedir", + drawtype = "nodebox", + node_box = { + type = "fixed", + fixed = { + {-0.5,-0.5,-0.5,0.5,-0.4,0.5}, + }, + }, +}) + +minetest.register_alias("firealarm:mesecons_input_on","firealarm:mesecons_input_off") + +minetest.register_node(":firealarm:mesecons_output_off",{ + description = "Fire Alarm Mesecons Output Module", + groups = { oddly_breakable_by_hand = 1,not_in_creative_inventory=1, }, + drop = "", + tiles = { + "firealarm_meseconsio_output_off.png", + "firealarm_meseconsio_sides.png", + "firealarm_meseconsio_sides.png", + "firealarm_meseconsio_sides.png", + "firealarm_meseconsio_sides.png", + "firealarm_meseconsio_sides.png", + }, + paramtype = "light", + paramtype2 = "facedir", + drawtype = "nodebox", + node_box = { + type = "fixed", + fixed = { + {-0.5,-0.5,-0.5,0.5,-0.4,0.5}, + }, + }, +}) + +minetest.register_alias("firealarm:mesecons_output_on","firealarm:mesecons_output_off") + +minetest.register_node(":firealarm:panel",{ + description = "Fire Alarm Panel", + groups = { oddly_breakable_by_hand = 1,firealarm_clearformspec = 1,}, + tiles = { + "firealarm_panel_sides.png", + "firealarm_panel_sides.png", + "firealarm_panel_sides.png", + "firealarm_panel_sides.png", + "firealarm_panel_sides.png", + "firealarm_panel_front_normal.png", + }, + paramtype = "light", + paramtype2 = "facedir", + drawtype = "nodebox", + node_box = { + type = "fixed", + fixed = { + {-0.5,-0.5,0.4,0.5,0.5,0.5}, + }, + }, +}) + +minetest.register_alias("firealarm:panel_alarm","firealarm:panel") +minetest.register_alias("firealarm:panel_supervisory","firealarm:panel") +minetest.register_alias("firealarm:panel_trouble","firealarm:panel") + +minetest.register_privilege("firealarm",{ + description = "Can bypass area protection when pulling fire alarms", + give_to_singleplayer = true, +}) + +minetest.register_node(":firealarm:pullstation_off",{ + description = "Fire Alarm Pull Station", + groups = { oddly_breakable_by_hand = 1 }, + tiles = { + "firealarm_pullstation_back.png", + "firealarm_pullstation_back.png", + "firealarm_pullstation_back.png", + "firealarm_pullstation_back.png", + "firealarm_pullstation_back.png", + "firealarm_pullstation_front_off.png", + }, + paramtype = "light", + paramtype2 = "facedir", + drawtype = "nodebox", + node_box = { + type = "fixed", + fixed = { + {-0.15,-0.5,0.4,0.18,-0.11,0.5}, + }, + }, + on_punch = function(pos,_,player) + local name = player:get_player_name() + minetest.chat_send_player(name,string.format("Position: %d,%d,%d",pos.x,pos.y,pos.z)) + end, + on_rightclick = function(pos,node,clicker) + if minetest.is_protected(pos,clicker:get_player_name()) and not minetest.check_player_privs(clicker,"protection_bypass") and not minetest.check_player_privs(clicker,"firealarm") then + minetest.record_protection_violation(pos,clicker:get_player_name()) + return + end + node.name = "firealarm:pullstation_on" + minetest.set_node(pos,node) + minetest.sound_play("firealarm_pullstation_pull",{pos=pos}) + end, +}) + +minetest.register_node(":firealarm:pullstation_on",{ + drop = "firealarm:pullstation_off", + description = "Fire Alarm Pull Station (pulled state - you hacker you!)", + groups = { oddly_breakable_by_hand = 1,not_in_creative_inventory = 1 }, + tiles = { + "firealarm_pullstation_back.png", + "firealarm_pullstation_back.png", + "firealarm_pullstation_back.png", + "firealarm_pullstation_back.png", + "firealarm_pullstation_back.png", + "firealarm_pullstation_front_on.png", + }, + paramtype = "light", + paramtype2 = "facedir", + drawtype = "nodebox", + node_box = { + type = "fixed", + fixed = { + {-0.15,-0.5,0.4,0.18,-0.11,0.5}, + }, + }, + on_punch = function(pos,_,player) + local name = player:get_player_name() + minetest.chat_send_player(name,string.format("Position: %d,%d,%d",pos.x,pos.y,pos.z)) + end, + on_rightclick = function(pos,node,clicker) + if minetest.is_protected(pos,clicker:get_player_name()) and not minetest.check_player_privs(clicker,"protection_bypass") then + minetest.record_protection_violation(pos,clicker:get_player_name()) + minetest.chat_send_player(clicker:get_player_name(),"You are not authorized to reset this pull station") + return + end + node.name = "firealarm:pullstation_off" + minetest.set_node(pos,node) + minetest.sound_play("firealarm_pullstation_reset",{pos=pos}) + end, +}) + +local smokeDetectorOffBottomTexture = "[combine:32x320".. + ":0,0=firealarm_smokedetector_bottom_on.png".. + ":0,32=firealarm_smokedetector_bottom_off.png".. + ":0,64=firealarm_smokedetector_bottom_off.png".. + ":0,96=firealarm_smokedetector_bottom_off.png".. + ":0,128=firealarm_smokedetector_bottom_off.png".. + ":0,160=firealarm_smokedetector_bottom_off.png".. + ":0,192=firealarm_smokedetector_bottom_off.png".. + ":0,224=firealarm_smokedetector_bottom_off.png".. + ":0,256=firealarm_smokedetector_bottom_off.png".. + ":0,288=firealarm_smokedetector_bottom_off.png" + +minetest.register_node(":firealarm:smokedetector_off",{ + description = "Fire Alarm Smoke Detector", + groups = { oddly_breakable_by_hand = 1 }, + tiles = { + "firealarm_smokedetector_sides.png", + { + name = smokeDetectorOffBottomTexture, + animation = + { + type = "vertical_frames", + aspect_w = 32, + aspect_h = 32, + length = 5, + }, + }, + "firealarm_smokedetector_sides.png", + "firealarm_smokedetector_sides.png", + "firealarm_smokedetector_sides.png", + "firealarm_smokedetector_sides.png", + }, + paramtype = "light", + paramtype2 = "facedir", + drawtype = "nodebox", + node_box = { + type = "fixed", + fixed = { + {-0.2,0.4,-0.2,0.2,0.5,0.2}, + {-0.075,0.35,-0.075,0.075,0.4,0.075}, + }, + }, +}) + +minetest.register_alias("firealarm:smokedetector_on","firealarm:smokedetector_off") + +minetest.register_craft({ + output = "firealarm:annunciator", + recipe = { + {"moreblocks:slab_steelblock_1","","moreblocks:slab_steelblock_1",}, + {"digistuff:touchscreen","mesecons_luacontroller:luacontroller0000","mesecons_lightstone:lightstone_red_off",}, + {"moreblocks:slab_steelblock_1","","moreblocks:slab_steelblock_1",}, + } +}) + +minetest.register_craft({ + output = "firealarm:hornstrobe_off", + recipe = { + {"","mesecons_lightstone:lightstone_white_off","",}, + {"dye:white","homedecor:speaker_driver","dye:white",}, + {"","plasticbox:plasticbox","homedecor:ic",}, + } +}) + +minetest.register_craft({ + output = "firealarm:remotestrobe_off", + recipe = { + {"","mesecons_lightstone:lightstone_white_off","",}, + {"dye:white","","dye:white",}, + {"","plasticbox:plasticbox","homedecor:ic",}, + } +}) + +minetest.register_craft({ + output = "firealarm:hornstrobe_old_off", + recipe = { + {"","ilights:light","",}, + {"dye:white","homedecor:speaker_driver","dye:white",}, + {"","plasticbox:plasticbox","",}, + } +}) + +minetest.register_craft({ + output = "firealarm:panel", + recipe = { + {"moreblocks:slab_steelblock_1","moreblocks:slab_steelblock_1","moreblocks:slab_steelblock_1",}, + {"moreblocks:slab_steelblock_1","firealarm:annunciator","moreblocks:slab_steelblock_1",}, + {"moreblocks:slab_steelblock_1","mesecons:wire_00000000_off","moreblocks:slab_steelblock_1",}, + } +}) + +minetest.register_craft({ + output = "firealarm:pullstation_off", + recipe = { + {"dye:red","dye:white","dye:red",}, + {"","mesecons_walllever:wall_lever_off","",}, + {"","plasticbox:plasticbox","",}, + } +}) + +minetest.register_craft({ + output = "firealarm:smokedetector_off", + recipe = { + {"plasticbox:plasticbox","homedecor:ic","plasticbox:plasticbox",}, + {"homedecor:copper_strip","technic:uranium_lump","homedecor:copper_strip",}, + {"","plasticbox:plasticbox","mesecons_lightstone:lightstone_red_off",}, + } +}) + +minetest.register_craft({ + output = "firealarm:smokedetector_off", + recipe = { + {"plasticbox:plasticbox","homedecor:ic","plasticbox:plasticbox",}, + {"mesecons_lamp:lamp_off","","mesecons_solarpanel:solar_panel_off",}, + {"","plasticbox:plasticbox","mesecons_lightstone:lightstone_red_off",}, + } +}) + +minetest.register_lbm({ + name = "firealarm_decoronly:nuke_formspecs", + label = "Remove firealarm device formspecs", + nodenames = {"group:firealarm_clearformspec",}, + action = function(pos) + minetest.get_meta(pos):set_string("formspec","") + end, +}) diff --git a/mod.conf b/mod.conf new file mode 100644 index 0000000..39c85b4 --- /dev/null +++ b/mod.conf @@ -0,0 +1,2 @@ +name = firealarm_decoronly +description = Fire alarm mod for Minetest (decorative-only version) diff --git a/sounds/firealarm_pullstation_pull.ogg b/sounds/firealarm_pullstation_pull.ogg Binary files differnew file mode 100644 index 0000000..1f6922e --- /dev/null +++ b/sounds/firealarm_pullstation_pull.ogg diff --git a/sounds/firealarm_pullstation_reset.ogg b/sounds/firealarm_pullstation_reset.ogg Binary files differnew file mode 100644 index 0000000..7e125e0 --- /dev/null +++ b/sounds/firealarm_pullstation_reset.ogg diff --git a/textures/firealarm_annunciator_front_normal.png b/textures/firealarm_annunciator_front_normal.png Binary files differnew file mode 100644 index 0000000..319be21 --- /dev/null +++ b/textures/firealarm_annunciator_front_normal.png diff --git a/textures/firealarm_hornstrobe_back.png b/textures/firealarm_hornstrobe_back.png Binary files differnew file mode 100644 index 0000000..b6bfc40 --- /dev/null +++ b/textures/firealarm_hornstrobe_back.png diff --git a/textures/firealarm_hornstrobe_front_off.png b/textures/firealarm_hornstrobe_front_off.png Binary files differnew file mode 100644 index 0000000..0033f4c --- /dev/null +++ b/textures/firealarm_hornstrobe_front_off.png diff --git a/textures/firealarm_hornstrobe_front_on.png b/textures/firealarm_hornstrobe_front_on.png Binary files differnew file mode 100644 index 0000000..fdca07d --- /dev/null +++ b/textures/firealarm_hornstrobe_front_on.png diff --git a/textures/firealarm_hornstrobe_old_front_off.png b/textures/firealarm_hornstrobe_old_front_off.png Binary files differnew file mode 100644 index 0000000..0dfb6ae --- /dev/null +++ b/textures/firealarm_hornstrobe_old_front_off.png diff --git a/textures/firealarm_hornstrobe_old_front_on.png b/textures/firealarm_hornstrobe_old_front_on.png Binary files differnew file mode 100644 index 0000000..234c527 --- /dev/null +++ b/textures/firealarm_hornstrobe_old_front_on.png diff --git a/textures/firealarm_hornstrobe_remotestrobe_front_off.png b/textures/firealarm_hornstrobe_remotestrobe_front_off.png Binary files differnew file mode 100644 index 0000000..6c18b97 --- /dev/null +++ b/textures/firealarm_hornstrobe_remotestrobe_front_off.png diff --git a/textures/firealarm_hornstrobe_side.png b/textures/firealarm_hornstrobe_side.png Binary files differnew file mode 100644 index 0000000..7f33a6d --- /dev/null +++ b/textures/firealarm_hornstrobe_side.png diff --git a/textures/firealarm_hornstrobe_top.png b/textures/firealarm_hornstrobe_top.png Binary files differnew file mode 100644 index 0000000..4beaa00 --- /dev/null +++ b/textures/firealarm_hornstrobe_top.png diff --git a/textures/firealarm_panel_front_normal.png b/textures/firealarm_panel_front_normal.png Binary files differnew file mode 100644 index 0000000..b3ba575 --- /dev/null +++ b/textures/firealarm_panel_front_normal.png diff --git a/textures/firealarm_panel_sides.png b/textures/firealarm_panel_sides.png Binary files differnew file mode 100644 index 0000000..4beaa00 --- /dev/null +++ b/textures/firealarm_panel_sides.png diff --git a/textures/firealarm_pullstation_back.png b/textures/firealarm_pullstation_back.png Binary files differnew file mode 100644 index 0000000..4beaa00 --- /dev/null +++ b/textures/firealarm_pullstation_back.png diff --git a/textures/firealarm_pullstation_front_off.png b/textures/firealarm_pullstation_front_off.png Binary files differnew file mode 100644 index 0000000..a77f411 --- /dev/null +++ b/textures/firealarm_pullstation_front_off.png diff --git a/textures/firealarm_pullstation_front_on.png b/textures/firealarm_pullstation_front_on.png Binary files differnew file mode 100644 index 0000000..e5fc410 --- /dev/null +++ b/textures/firealarm_pullstation_front_on.png diff --git a/textures/firealarm_smokedetector_bottom_off.png b/textures/firealarm_smokedetector_bottom_off.png Binary files differnew file mode 100644 index 0000000..3885b58 --- /dev/null +++ b/textures/firealarm_smokedetector_bottom_off.png diff --git a/textures/firealarm_smokedetector_bottom_on.png b/textures/firealarm_smokedetector_bottom_on.png Binary files differnew file mode 100644 index 0000000..2449290 --- /dev/null +++ b/textures/firealarm_smokedetector_bottom_on.png diff --git a/textures/firealarm_smokedetector_sides.png b/textures/firealarm_smokedetector_sides.png Binary files differnew file mode 100644 index 0000000..6873873 --- /dev/null +++ b/textures/firealarm_smokedetector_sides.png |