From 7c7c2bcb6d125b875e8d222335e83fbe3b03c7ee Mon Sep 17 00:00:00 2001 From: teknomunk Date: Fri, 3 Jan 2025 16:12:00 -0600 Subject: [PATCH] Address review comments --- mods/ENTITIES/mcl_minecarts/carts.lua | 2 +- mods/ENTITIES/mcl_minecarts/carts/minecart.lua | 3 ++- mods/ENTITIES/mcl_minecarts/functions.lua | 4 +--- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/mods/ENTITIES/mcl_minecarts/carts.lua b/mods/ENTITIES/mcl_minecarts/carts.lua index efb72af86..6731c05fc 100644 --- a/mods/ENTITIES/mcl_minecarts/carts.lua +++ b/mods/ENTITIES/mcl_minecarts/carts.lua @@ -634,7 +634,7 @@ minetest.register_globalstep(function(dtime) --[[ local pos = mod.get_cart_position(staticdata) local le = mcl_util.get_luaentity_from_uuid(staticdata.uuid) - print("cart# "..uuid.. + print("cart# "..staticdata.uuid.. ",velocity="..tostring(staticdata.velocity).. ",pos="..tostring(pos).. ",le="..tostring(le).. diff --git a/mods/ENTITIES/mcl_minecarts/carts/minecart.lua b/mods/ENTITIES/mcl_minecarts/carts/minecart.lua index f606f7a6b..6ec4f791c 100644 --- a/mods/ENTITIES/mcl_minecarts/carts/minecart.lua +++ b/mods/ENTITIES/mcl_minecarts/carts/minecart.lua @@ -1,5 +1,6 @@ local modname = minetest.get_current_modname() local S = minetest.get_translator(modname) +local mcl_log = mcl_util.make_mcl_logger("mcl_logging_minecarts", "Minecarts") local mod = mcl_minecarts -- Imports @@ -40,7 +41,7 @@ function mod.attach_driver(cart, player) -- Update player information mcl_player.player_attached[player_name] = true - --minetest.log("action", player_name.." entered minecart #"..tostring(uuid).." at "..tostring(cart._start_pos)) + mcl_log(player_name.." entered minecart #"..tostring(staticdata.uuid).." at "..tostring(cart._start_pos)) -- Attach the player object to the minecart player:set_attach(cart.object, "", vector.new(1,-1.75,-2), vector.new(0,0,0)) diff --git a/mods/ENTITIES/mcl_minecarts/functions.lua b/mods/ENTITIES/mcl_minecarts/functions.lua index 952629b0e..234148b3d 100644 --- a/mods/ENTITIES/mcl_minecarts/functions.lua +++ b/mods/ENTITIES/mcl_minecarts/functions.lua @@ -512,7 +512,5 @@ function mod.reverse_cart_direction(staticdata) staticdata.distance = 1 - (staticdata.distance or 0) -- recalculate direction - next_dir = mod:get_rail_direction(staticdata.connected_at, next_dir) - staticdata.dir = next_dir + staticdata.dir = mod:get_rail_direction(staticdata.connected_at, next_dir) end -