From 0ad7ddf2c6efcd9be912e4095e4defe4df006951 Mon Sep 17 00:00:00 2001 From: teknomunk Date: Fri, 12 Apr 2024 19:09:23 +0000 Subject: [PATCH] Cleanup debug prints --- mods/ENTITIES/mcl_minecarts/carts.lua | 6 ------ mods/ENTITIES/mcl_minecarts/movement.lua | 2 +- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/mods/ENTITIES/mcl_minecarts/carts.lua b/mods/ENTITIES/mcl_minecarts/carts.lua index d13059b99..f6c23a6f5 100644 --- a/mods/ENTITIES/mcl_minecarts/carts.lua +++ b/mods/ENTITIES/mcl_minecarts/carts.lua @@ -616,36 +616,30 @@ minetest.register_on_joinplayer(function(player) local meta = mcl_playerinfo.get_mod_meta(player_name, modname) local cart_uuid = meta.attached_to if cart_uuid then - print("Trying to reattach "..player_name.." to cart #"..cart_uuid) local cartdata = get_cart_data(cart_uuid) -- Can't get into a cart that was destroyed if not cartdata then - print("Failed to get cartdata") return end -- Don't reattach players if someone else got in the cart if cartdata.last_player ~= player_name then - print("Somebody else got in the cart while you were gone") return end minetest.after(0.2,function(player_name, cart_uuid) local player = minetest.get_player_by_name(player_name) if not player then - print("Can't get an ObjectRef for "..player_name) return end local cart = mcl_util.get_luaentity_from_uuid(cart_uuid) if not cart then - print("Can't find the luaentity for cart #"..cart_uuid) return end mod.attach_driver(cart, player) - end, player_name, cart_uuid) end end) diff --git a/mods/ENTITIES/mcl_minecarts/movement.lua b/mods/ENTITIES/mcl_minecarts/movement.lua index f1b405921..be9a0ca6c 100644 --- a/mods/ENTITIES/mcl_minecarts/movement.lua +++ b/mods/ENTITIES/mcl_minecarts/movement.lua @@ -33,7 +33,7 @@ mod.detach_minecart = detach_minecart local function try_detach_minecart(staticdata) if not staticdata or not staticdata.connected_at then return end if not mod:is_rail(staticdata.connected_at) then - print("Detaching minecart #"..tostring(staticdata.uuid)) + mcl_debug("Detaching minecart #"..tostring(staticdata.uuid)) detach_minecart(staticdata) end end