From 23ceb30e88d85a2a997713f99e296d64545458a4 Mon Sep 17 00:00:00 2001 From: TumeniNodes Date: Sun, 22 Sep 2019 18:05:38 -0400 Subject: [PATCH] Xpanes: Register steel bar door and steel bar trapdoor Register using the 'doors' mod API. --- mods/xpanes/README.txt | 6 +++ mods/xpanes/init.lua | 42 ++++++++++++++++++ mods/xpanes/license.txt | 1 + mods/xpanes/mod.conf | 1 + .../xpanes/textures/xpanes_door_steel_bar.png | Bin 0 -> 605 bytes .../xpanes/textures/xpanes_item_steel_bar.png | Bin 0 -> 354 bytes .../textures/xpanes_trapdoor_steel_bar.png | Bin 0 -> 261 bytes .../xpanes_trapdoor_steel_bar_side.png | Bin 0 -> 98 bytes 8 files changed, 50 insertions(+) create mode 100644 mods/xpanes/textures/xpanes_door_steel_bar.png create mode 100644 mods/xpanes/textures/xpanes_item_steel_bar.png create mode 100644 mods/xpanes/textures/xpanes_trapdoor_steel_bar.png create mode 100644 mods/xpanes/textures/xpanes_trapdoor_steel_bar_side.png 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 0000000000000000000000000000000000000000..435af148df7b0401acfa6cfa4cb23e28f80258cd GIT binary patch literal 605 zcmV-j0;2tiP)Ou#^hu00015P)t-s0000cCMGd4F!>k00DGTPE!Ct=GbNc0004EOGiWqhTfHW z0004eNklP10QtgBc!CG1KwocWzWO2!x@rkCp!wObf#kzR|h*8>Z z-YD}F`g!xhK}v5gZ(2~LZ1)PzFbi) z^mS!_%poMEFE4oeFGzWQfKP}kNSlU+zP^4^Qc`kqa#~tidU|?hW@c7aR(5uFZfa!?aF=@EE#o=nh5-A6*hDkiS31@k2POvSS w&3q+i)=qYvO9CtSCRr7K&q=#Eb8|YwlrJVabEZ`40nKOdboFyt=akR{0Ivv9M*si- literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..a71231e84cf289acdb40c000f88ef44ea73d8274 GIT binary patch literal 98 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!93?!50ihlx9oB=)|u0VSF^y%~G&tEW|>ot%g t;_2cT!f`!0f|Z45p~C?O&W71c46cXSe?Ba}J_{(%;OXk;vd$@?2>=ua8NvVn literal 0 HcmV?d00001 -- 2.25.1