From: TumeniNodes Date: Sun, 22 Sep 2019 22:05:38 +0000 (-0400) Subject: Xpanes: Register steel bar door and steel bar trapdoor X-Git-Tag: 5.1.0~10 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=23ceb30e88d85a2a997713f99e296d64545458a4;p=oweals%2Fminetest_game.git Xpanes: Register steel bar door and steel bar trapdoor Register using the 'doors' mod API. --- diff --git a/mods/xpanes/README.txt b/mods/xpanes/README.txt index 47161da5..2e0afe49 100644 --- a/mods/xpanes/README.txt +++ b/mods/xpanes/README.txt @@ -22,3 +22,9 @@ paramat (CC BY-SA 3.0): Krock (CC0 1.0): xpanes_edge.png + +TumeniNodes (CC BY-SA 3.0): + xpanes_door_steel_bar.png + xpanes_item_steel_bar.png + xpanes_trapdoor_steel_bar.png + xpanes_trapdoor_steel_bar_side.png diff --git a/mods/xpanes/init.lua b/mods/xpanes/init.lua index d978beeb..8dcbb5fa 100644 --- a/mods/xpanes/init.lua +++ b/mods/xpanes/init.lua @@ -202,3 +202,45 @@ minetest.register_lbm({ end end }) + +-- Register steel bar doors and trapdoors + +if minetest.get_modpath("doors") then + + doors.register("xpanes:door_steel_bar", { + tiles = {{name = "xpanes_door_steel_bar.png", backface_culling = true}}, + description = S("Steel Bar Door"), + inventory_image = "xpanes_item_steel_bar.png", + protected = true, + groups = {cracky = 1, level = 2}, + sounds = default.node_sound_metal_defaults(), + sound_open = "doors_steel_door_open", + sound_close = "doors_steel_door_close", + recipe = { + {"xpanes:bar_flat", "xpanes:bar_flat"}, + {"xpanes:bar_flat", "xpanes:bar_flat"}, + {"xpanes:bar_flat", "xpanes:bar_flat"}, + }, + }) + + doors.register_trapdoor("xpanes:trapdoor_steel_bar", { + description = S("Steel Bar Trapdoor"), + inventory_image = "xpanes_trapdoor_steel_bar.png", + wield_image = "xpanes_trapdoor_steel_bar.png", + tile_front = "xpanes_trapdoor_steel_bar.png", + tile_side = "xpanes_trapdoor_steel_bar_side.png", + protected = true, + groups = {cracky = 1, level = 2, door = 1}, + sounds = default.node_sound_metal_defaults(), + sound_open = "doors_steel_door_open", + sound_close = "doors_steel_door_close", + }) + + minetest.register_craft({ + output = "xpanes:trapdoor_steel_bar", + recipe = { + {"xpanes:bar_flat", "xpanes:bar_flat"}, + {"xpanes:bar_flat", "xpanes:bar_flat"}, + } + }) +end diff --git a/mods/xpanes/license.txt b/mods/xpanes/license.txt index dff72274..7e922b9a 100644 --- a/mods/xpanes/license.txt +++ b/mods/xpanes/license.txt @@ -34,6 +34,7 @@ Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) Copyright (C) 2014-2016 xyz Copyright (C) 2013-2016 Gambit Copyright (C) 2016 paramat +Copyright (C) 2019 TumeniNodes You are free to: Share — copy and redistribute the material in any medium or format. diff --git a/mods/xpanes/mod.conf b/mods/xpanes/mod.conf index bc043614..dcb07167 100644 --- a/mods/xpanes/mod.conf +++ b/mods/xpanes/mod.conf @@ -1,3 +1,4 @@ name = xpanes description = Minetest Game mod: xpanes depends = default +optional_depends = doors diff --git a/mods/xpanes/textures/xpanes_door_steel_bar.png b/mods/xpanes/textures/xpanes_door_steel_bar.png new file mode 100644 index 00000000..435af148 Binary files /dev/null and b/mods/xpanes/textures/xpanes_door_steel_bar.png differ diff --git a/mods/xpanes/textures/xpanes_item_steel_bar.png b/mods/xpanes/textures/xpanes_item_steel_bar.png new file mode 100644 index 00000000..d1ddaddd Binary files /dev/null and b/mods/xpanes/textures/xpanes_item_steel_bar.png differ diff --git a/mods/xpanes/textures/xpanes_trapdoor_steel_bar.png b/mods/xpanes/textures/xpanes_trapdoor_steel_bar.png new file mode 100644 index 00000000..de4b4946 Binary files /dev/null and b/mods/xpanes/textures/xpanes_trapdoor_steel_bar.png differ diff --git a/mods/xpanes/textures/xpanes_trapdoor_steel_bar_side.png b/mods/xpanes/textures/xpanes_trapdoor_steel_bar_side.png new file mode 100644 index 00000000..a71231e8 Binary files /dev/null and b/mods/xpanes/textures/xpanes_trapdoor_steel_bar_side.png differ