From 8906e57f33fd1c15008cc9639c9992dd50514255 Mon Sep 17 00:00:00 2001 From: WillConker Date: Sun, 9 Jun 2024 20:56:42 +0100 Subject: [PATCH] Added setting for menu --- mods/PLAYER/mcl_playerplus/init.lua | 3 ++- settingtypes.txt | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/mods/PLAYER/mcl_playerplus/init.lua b/mods/PLAYER/mcl_playerplus/init.lua index 25d8ad9f0..592c54e6d 100644 --- a/mods/PLAYER/mcl_playerplus/init.lua +++ b/mods/PLAYER/mcl_playerplus/init.lua @@ -33,6 +33,8 @@ local elytra_vars = { rocket_speed = tonumber(minetest.settings:get("mcl_elytra_rocket_speed")) or 3.5, --was 5.5 } +local inside_liquid_leeway = tonumber(minetest.settings:get("vl_inside_liquid_leeway")) or 0.06 + --minetest.log("action", "elytra_vars.max_speed: " .. dump(elytra_vars.max_speed)) --minetest.log("action", "elytra_vars.rocket_speed: " .. dump(elytra_vars.rocket_speed)) @@ -185,7 +187,6 @@ local function get_head_submerged_node(head_pos) -- Would be better if this were implemented in minetest i.e. players climbing outside of liquids local pos_origin = vector.round(head_pos)--{x=math.floor(head_pos.x + 0.5), y=head_pos.y, z=math.floor(head_pos.z + 0.5)} -- Amount in nodes to allow player to be inside liquid without being inside liquid - local inside_liquid_leeway = 0.06 local adjacent_liquid if head_pos.x - pos_origin.x > 0.5 - inside_liquid_leeway then adjacent_liquid = flowlib.liquid_at_exact({x=pos_origin.x+1, y=pos_origin.y, z=pos_origin.z}, {x=-0.5, y=head_pos.y - pos_origin.y, z=0}) diff --git a/settingtypes.txt b/settingtypes.txt index 5e27cc5f9..4a9c77fd1 100644 --- a/settingtypes.txt +++ b/settingtypes.txt @@ -113,6 +113,10 @@ mcl_eating_delay (Eating delay) float 1.61 0 # Default: 10 vl_breath_max (Maximum breath) int 10 0 +# Breathable outside width of water columns +# Default: 10 +vl_inside_liquid_leeway (Water column leeway) float 0.06 0 + [Mobs] # If enabled, mobs will spawn naturally. This does not affect # affect mob spawners.