From 416286ae368f06ee35fb0e38cf7ce8fc54a11e41 Mon Sep 17 00:00:00 2001 From: cheapie Date: Wed, 29 Apr 2020 17:44:41 -0500 Subject: Add initial content --- COPYING | 24 ++ README | 5 + init.lua | 381 +++++++++++++++++++++ mod.conf | 2 + sounds/firealarm_pullstation_pull.ogg | Bin 0 -> 8029 bytes sounds/firealarm_pullstation_reset.ogg | Bin 0 -> 7373 bytes textures/firealarm_annunciator_front_normal.png | Bin 0 -> 3337 bytes textures/firealarm_hornstrobe_back.png | Bin 0 -> 1422 bytes textures/firealarm_hornstrobe_front_off.png | Bin 0 -> 274 bytes textures/firealarm_hornstrobe_front_on.png | Bin 0 -> 1792 bytes textures/firealarm_hornstrobe_old_front_off.png | Bin 0 -> 2882 bytes textures/firealarm_hornstrobe_old_front_on.png | Bin 0 -> 2835 bytes ...firealarm_hornstrobe_remotestrobe_front_off.png | Bin 0 -> 1622 bytes textures/firealarm_hornstrobe_side.png | Bin 0 -> 438 bytes textures/firealarm_hornstrobe_top.png | Bin 0 -> 146 bytes textures/firealarm_panel_front_normal.png | Bin 0 -> 460 bytes textures/firealarm_panel_sides.png | Bin 0 -> 146 bytes textures/firealarm_pullstation_back.png | Bin 0 -> 146 bytes textures/firealarm_pullstation_front_off.png | Bin 0 -> 4588 bytes textures/firealarm_pullstation_front_on.png | Bin 0 -> 4740 bytes textures/firealarm_smokedetector_bottom_off.png | Bin 0 -> 216 bytes textures/firealarm_smokedetector_bottom_on.png | Bin 0 -> 216 bytes textures/firealarm_smokedetector_sides.png | Bin 0 -> 146 bytes 23 files changed, 412 insertions(+) create mode 100644 COPYING create mode 100644 README create mode 100644 init.lua create mode 100644 mod.conf create mode 100644 sounds/firealarm_pullstation_pull.ogg create mode 100644 sounds/firealarm_pullstation_reset.ogg create mode 100644 textures/firealarm_annunciator_front_normal.png create mode 100644 textures/firealarm_hornstrobe_back.png create mode 100644 textures/firealarm_hornstrobe_front_off.png create mode 100644 textures/firealarm_hornstrobe_front_on.png create mode 100644 textures/firealarm_hornstrobe_old_front_off.png create mode 100644 textures/firealarm_hornstrobe_old_front_on.png create mode 100644 textures/firealarm_hornstrobe_remotestrobe_front_off.png create mode 100644 textures/firealarm_hornstrobe_side.png create mode 100644 textures/firealarm_hornstrobe_top.png create mode 100644 textures/firealarm_panel_front_normal.png create mode 100644 textures/firealarm_panel_sides.png create mode 100644 textures/firealarm_pullstation_back.png create mode 100644 textures/firealarm_pullstation_front_off.png create mode 100644 textures/firealarm_pullstation_front_on.png create mode 100644 textures/firealarm_smokedetector_bottom_off.png create mode 100644 textures/firealarm_smokedetector_bottom_on.png create mode 100644 textures/firealarm_smokedetector_sides.png diff --git a/COPYING b/COPYING new file mode 100644 index 0000000..68a49da --- /dev/null +++ b/COPYING @@ -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 diff --git a/README b/README new file mode 100644 index 0000000..907bf01 --- /dev/null +++ b/README @@ -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 new file mode 100644 index 0000000..1f6922e Binary files /dev/null and b/sounds/firealarm_pullstation_pull.ogg differ diff --git a/sounds/firealarm_pullstation_reset.ogg b/sounds/firealarm_pullstation_reset.ogg new file mode 100644 index 0000000..7e125e0 Binary files /dev/null and b/sounds/firealarm_pullstation_reset.ogg differ diff --git a/textures/firealarm_annunciator_front_normal.png b/textures/firealarm_annunciator_front_normal.png new file mode 100644 index 0000000..319be21 Binary files /dev/null and b/textures/firealarm_annunciator_front_normal.png differ diff --git a/textures/firealarm_hornstrobe_back.png b/textures/firealarm_hornstrobe_back.png new file mode 100644 index 0000000..b6bfc40 Binary files /dev/null and b/textures/firealarm_hornstrobe_back.png differ diff --git a/textures/firealarm_hornstrobe_front_off.png b/textures/firealarm_hornstrobe_front_off.png new file mode 100644 index 0000000..0033f4c Binary files /dev/null and b/textures/firealarm_hornstrobe_front_off.png differ diff --git a/textures/firealarm_hornstrobe_front_on.png b/textures/firealarm_hornstrobe_front_on.png new file mode 100644 index 0000000..fdca07d Binary files /dev/null and b/textures/firealarm_hornstrobe_front_on.png differ diff --git a/textures/firealarm_hornstrobe_old_front_off.png b/textures/firealarm_hornstrobe_old_front_off.png new file mode 100644 index 0000000..0dfb6ae Binary files /dev/null and b/textures/firealarm_hornstrobe_old_front_off.png differ diff --git a/textures/firealarm_hornstrobe_old_front_on.png b/textures/firealarm_hornstrobe_old_front_on.png new file mode 100644 index 0000000..234c527 Binary files /dev/null and b/textures/firealarm_hornstrobe_old_front_on.png differ diff --git a/textures/firealarm_hornstrobe_remotestrobe_front_off.png b/textures/firealarm_hornstrobe_remotestrobe_front_off.png new file mode 100644 index 0000000..6c18b97 Binary files /dev/null and b/textures/firealarm_hornstrobe_remotestrobe_front_off.png differ diff --git a/textures/firealarm_hornstrobe_side.png b/textures/firealarm_hornstrobe_side.png new file mode 100644 index 0000000..7f33a6d Binary files /dev/null and b/textures/firealarm_hornstrobe_side.png differ diff --git a/textures/firealarm_hornstrobe_top.png b/textures/firealarm_hornstrobe_top.png new file mode 100644 index 0000000..4beaa00 Binary files /dev/null and b/textures/firealarm_hornstrobe_top.png differ diff --git a/textures/firealarm_panel_front_normal.png b/textures/firealarm_panel_front_normal.png new file mode 100644 index 0000000..b3ba575 Binary files /dev/null and b/textures/firealarm_panel_front_normal.png differ diff --git a/textures/firealarm_panel_sides.png b/textures/firealarm_panel_sides.png new file mode 100644 index 0000000..4beaa00 Binary files /dev/null and b/textures/firealarm_panel_sides.png differ diff --git a/textures/firealarm_pullstation_back.png b/textures/firealarm_pullstation_back.png new file mode 100644 index 0000000..4beaa00 Binary files /dev/null and b/textures/firealarm_pullstation_back.png differ diff --git a/textures/firealarm_pullstation_front_off.png b/textures/firealarm_pullstation_front_off.png new file mode 100644 index 0000000..a77f411 Binary files /dev/null and b/textures/firealarm_pullstation_front_off.png differ diff --git a/textures/firealarm_pullstation_front_on.png b/textures/firealarm_pullstation_front_on.png new file mode 100644 index 0000000..e5fc410 Binary files /dev/null and b/textures/firealarm_pullstation_front_on.png differ diff --git a/textures/firealarm_smokedetector_bottom_off.png b/textures/firealarm_smokedetector_bottom_off.png new file mode 100644 index 0000000..3885b58 Binary files /dev/null and b/textures/firealarm_smokedetector_bottom_off.png differ diff --git a/textures/firealarm_smokedetector_bottom_on.png b/textures/firealarm_smokedetector_bottom_on.png new file mode 100644 index 0000000..2449290 Binary files /dev/null and b/textures/firealarm_smokedetector_bottom_on.png differ diff --git a/textures/firealarm_smokedetector_sides.png b/textures/firealarm_smokedetector_sides.png new file mode 100644 index 0000000..6873873 Binary files /dev/null and b/textures/firealarm_smokedetector_sides.png differ -- cgit v1.2.3