From 5042b3ea51387b4000054d378352385f97233515 Mon Sep 17 00:00:00 2001 From: iliekprogrammar Date: Fri, 30 Dec 2022 20:52:06 +0800 Subject: [PATCH] Tweak move physics for liquids, ladders, vines and cobwebs --- minetest.conf | 4 ++-- mods/ITEMS/mcl_core/nodes_climb.lua | 13 +++++++++++-- mods/ITEMS/mcl_core/nodes_misc.lua | 8 ++++++-- mods/PLAYER/mcl_playerplus/init.lua | 11 +++-------- 4 files changed, 22 insertions(+), 14 deletions(-) diff --git a/minetest.conf b/minetest.conf index 223587f4d..2f3b91cb4 100644 --- a/minetest.conf +++ b/minetest.conf @@ -19,9 +19,9 @@ movement_speed_jump = 6.6 movement_speed_climb = 2.35 # TODO: Add descend speed (3.0) when available -movement_liquid_fluidity = 1.13 +movement_liquid_fluidity = 0.88 movement_liquid_fluidity_smooth = 0.5 -movement_liquid_sink = 23 +movement_liquid_sink = 16 movement_gravity = 10.4 diff --git a/mods/ITEMS/mcl_core/nodes_climb.lua b/mods/ITEMS/mcl_core/nodes_climb.lua index 1a6780618..adb744ad9 100644 --- a/mods/ITEMS/mcl_core/nodes_climb.lua +++ b/mods/ITEMS/mcl_core/nodes_climb.lua @@ -24,6 +24,7 @@ minetest.register_node("mcl_core:ladder", { paramtype2 = "wallmounted", walkable = true, climbable = true, + move_resistance = 1, node_box = { type = "wallmounted", wall_side = { -0.5, -0.5, -0.5, -7/16, 0.5, 0.5 }, @@ -32,8 +33,15 @@ minetest.register_node("mcl_core:ladder", { type = "wallmounted", wall_side = { -0.5, -0.5, -0.5, -7/16, 0.5, 0.5 }, }, + collision_box = { + type = "wallmounted", + wall_side = { -0.5, -0.5, -0.5, -7/16, 0.5, 0.5 }, + }, stack_max = 64, - groups = {handy=1,axey=1, attached_node=1, deco_block=1, dig_by_piston=1}, + groups = { + handy=1, axey=1, attached_node=1, deco_block=1, dig_by_piston=1, + no_fall_damage=1 + }, sounds = mcl_sounds.node_sound_wood_defaults(), node_placement_prediction = "", -- Restrict placement of ladders @@ -99,6 +107,7 @@ minetest.register_node("mcl_core:vine", { paramtype2 = "wallmounted", walkable = false, climbable = true, + move_resistance = 1, buildable_to = true, selection_box = { type = "wallmounted", @@ -107,7 +116,7 @@ minetest.register_node("mcl_core:vine", { groups = { handy = 1, axey = 1, shearsy = 1, swordy = 1, deco_block = 1, dig_by_piston = 1, destroy_by_lava_flow = 1, compostability = 50, - flammable = 2, fire_encouragement = 15, fire_flammability = 100 + flammable = 2, fire_encouragement = 15, fire_flammability = 100, no_fall_damage=1 }, sounds = mcl_sounds.node_sound_leaves_defaults(), drop = "", diff --git a/mods/ITEMS/mcl_core/nodes_misc.lua b/mods/ITEMS/mcl_core/nodes_misc.lua index 5f5b005e2..5a41c5d18 100644 --- a/mods/ITEMS/mcl_core/nodes_misc.lua +++ b/mods/ITEMS/mcl_core/nodes_misc.lua @@ -102,14 +102,18 @@ minetest.register_node("mcl_core:cobweb", { tiles = {"mcl_core_web.png"}, inventory_image = "mcl_core_web.png", paramtype = "light", - liquid_viscosity = 14, + liquid_viscosity = 60, liquidtype = "source", liquid_alternative_flowing = "mcl_core:cobweb", liquid_alternative_source = "mcl_core:cobweb", liquid_renewable = false, liquid_range = 0, walkable = false, - groups = {swordy_cobweb=1, shearsy_cobweb=1, fake_liquid=1, disable_jump=1, deco_block=1, dig_by_piston=1, dig_by_water=1,destroy_by_lava_flow=1,}, + groups = { + swordy_cobweb=1, shearsy_cobweb=1, fake_liquid=1, disable_jump=1, + deco_block=1, dig_by_piston=1, dig_by_water=1,destroy_by_lava_flow=1, + no_fall_damage=1 + }, drop = "mcl_mobitems:string", _mcl_shears_drop = true, sounds = mcl_sounds.node_sound_leaves_defaults(), diff --git a/mods/PLAYER/mcl_playerplus/init.lua b/mods/PLAYER/mcl_playerplus/init.lua index 0faa9c53f..8ae5c99f4 100644 --- a/mods/PLAYER/mcl_playerplus/init.lua +++ b/mods/PLAYER/mcl_playerplus/init.lua @@ -717,19 +717,14 @@ mcl_damage.register_modifier(function(obj, damage, reason) end if minetest.get_item_group(node.name, "water") ~= 0 then return 0 - end - if node.name == "mcl_portals:portal_end" then + elseif minetest.get_item_group(node.name, "no_fall_damage") ~= 0 then + return 0 + elseif node.name == "mcl_portals:portal_end" then if mcl_portals and mcl_portals.end_teleport then mcl_portals.end_teleport(obj) end return 0 end - if node.name == "mcl_core:cobweb" then - return 0 - end - if node.name == "mcl_core:vine" then - return 0 - end end pos = vector.add(pos, step) node = minetest.get_node(pos)