commit bb346f3b1e8d0cdf952ccff2709b89503a8146ae Author: Zenon Seth Date: Fri Nov 25 11:07:03 2022 +0000 Initial commit for Climbable Trapdoors diff --git a/README.txt b/README.txt new file mode 100644 index 0000000..acad99f --- /dev/null +++ b/README.txt @@ -0,0 +1,8 @@ +# Climbable Trapdoors + +A really simple mod that makes the default wood and steel trapdoors climbable. + +By default the mod only makes the "open" version climbable. +To make both the open and closed trapdoors climbable, go to the `init.lua` file and change `MAKE_CLOSED_DOORS_CLIMBABLE` to `true` + +The mod will also check if the `xpanes` Steel Bar Trapdoor is present, and if so will apply the same climbable state to it as well. diff --git a/init.lua b/init.lua new file mode 100644 index 0000000..c9cac58 --- /dev/null +++ b/init.lua @@ -0,0 +1,20 @@ +local MAKE_CLOSED_DOORS_CLIMBABLE = false + +local override = { + climbable = true +} + +minetest.override_item("doors:trapdoor_open", override) +minetest.override_item("doors:trapdoor_steel_open", override) + +if MAKE_CLOSED_DOORS_CLIMBABLE then + minetest.override_item("doors:trapdoor", override) + minetest.override_item("doors:trapdoor_steel", override) +end + +if minetest.registered_items["xpanes:trapdoor_steel_bar"] then + minetest.override_item("xpanes:trapdoor_steel_bar_open", override) + if MAKE_CLOSED_DOORS_CLIMBABLE then + minetest.override_item("xpanes:trapdoor_steel_bar", override) + end +end \ No newline at end of file diff --git a/license.txt b/license.txt new file mode 100644 index 0000000..f500e93 --- /dev/null +++ b/license.txt @@ -0,0 +1,24 @@ +License of source code +---------------------- + +The MIT License (MIT) +Copyright (C) 2022-2022 ZenonSeth + +Permission is hereby granted, free of charge, to any person obtaining a copy of this +software and associated documentation files (the "Software"), to deal in the Software +without restriction, including without limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or +substantial portions of the Software. + +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 OR COPYRIGHT HOLDERS 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 details: +https://opensource.org/licenses/MIT diff --git a/mod.conf b/mod.conf new file mode 100644 index 0000000..917013f --- /dev/null +++ b/mod.conf @@ -0,0 +1,5 @@ +name = climbable_trapdoors +title = Climbable Trapdoors +description = Makes the wood and steel trapdoors climbable +depends = doors +optional_depends = xpanes diff --git a/screenshot.png b/screenshot.png new file mode 100644 index 0000000..e47a8c9 Binary files /dev/null and b/screenshot.png differ