add sneak_glitch mod

master
Milan 2020-12-14 12:05:38 +01:00
parent 59dfc6c83b
commit e8090f4c3a
3 changed files with 47 additions and 0 deletions

30
sneak_glitch/README.txt Normal file
View File

@ -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

15
sneak_glitch/init.lua Normal file
View File

@ -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)

View File

@ -0,0 +1,2 @@
# Replaces the new sneak behaviour with the old one
sneak_glitch.use_old_code (Use old sneak code) bool false