From e8090f4c3a010e5db3db24342eccf82fc9060bd9 Mon Sep 17 00:00:00 2001 From: Milan Date: Mon, 14 Dec 2020 12:05:38 +0100 Subject: [PATCH] add sneak_glitch mod --- sneak_glitch/README.txt | 30 ++++++++++++++++++++++++++++++ sneak_glitch/init.lua | 15 +++++++++++++++ sneak_glitch/settingtypes.txt | 2 ++ 3 files changed, 47 insertions(+) create mode 100644 sneak_glitch/README.txt create mode 100644 sneak_glitch/init.lua create mode 100644 sneak_glitch/settingtypes.txt diff --git a/sneak_glitch/README.txt b/sneak_glitch/README.txt new file mode 100644 index 0000000..264207d --- /dev/null +++ b/sneak_glitch/README.txt @@ -0,0 +1,30 @@ + Minetest mod: sneak_glitch +============================ +This mod re-enables the sneak glitch in your Minetest world. It +will allow you to use the 1-row and 2-row sneak ladders again. + + +License: CC0 +Dependencies: (none) + + + Old sneak behaviour +---------------------- +If you dislike the new sneak code, add the following setting +to your minetest.conf file: + + sneak_glitch.use_old_code = true + +In case you used the ingame command `/set` to do this change, +rejoin the world in order to apply the new settings for this mod. + + + Other climbing mods +--------------------- +Make all leaves climbable [climbing_leaves] + https://forum.minetest.net/viewtopic.php?t=15679 + https://github.com/pithydon/climbing_leaves + +Mountain Climbing [handholds] + https://forum.minetest.net/viewtopic.php?t=17069 + https://github.com/Ezhh/handholds diff --git a/sneak_glitch/init.lua b/sneak_glitch/init.lua new file mode 100644 index 0000000..f1ef406 --- /dev/null +++ b/sneak_glitch/init.lua @@ -0,0 +1,15 @@ +-- Enable the sneak glitch (horray!) + +local use_old_code = minetest.settings:get_bool("sneak_glitch.use_old_code") +if use_old_code == nil then + -- Default to the new sneak code + use_old_code = false +end + +minetest.register_on_joinplayer(function(player) + player:set_physics_override({ + sneak_glitch = true, + sneak = true, + new_move = not use_old_code + }) +end) diff --git a/sneak_glitch/settingtypes.txt b/sneak_glitch/settingtypes.txt new file mode 100644 index 0000000..fdeb551 --- /dev/null +++ b/sneak_glitch/settingtypes.txt @@ -0,0 +1,2 @@ +# Replaces the new sneak behaviour with the old one +sneak_glitch.use_old_code (Use old sneak code) bool false