From ddca22ae60fb841a0fcab9d91c415e1e251b8b98 Mon Sep 17 00:00:00 2001 From: Roxy <75404941+TealSeer@users.noreply.github.com> Date: Sat, 29 Nov 2025 15:57:49 -0600 Subject: [PATCH] Fix MULEbots not unloading cargo in the right direction (#94127) ## About The Pull Request MULEbots and MULEbot beacons are set up so that the bot knows what direction to push the crate in after delivery, so it can go into the little delivery area and be seen by people. Unfortunately when it calls `load.forceMove(loc)` in `unload()` that triggers `Exited()` which has a condition for if the thing that Exited is `load` which calls `unload(0)` and fucks it all up, dropping the crate on the tile with the plastic flaps where nobody can see it. Changes the if branch to null `load` earlier (we still have a reference as `cached_load`) so `Exited` won't interfere ## Why It's Good For The Game MULEbots are already a struggle and it doesn't help that nobody can see the cargo it delivers cause it's on the wrong tile ## Changelog :cl: fix: fixed MULEbots unloading deliveries onto the wrong tile /:cl: --- code/modules/mob/living/simple_animal/bot/mulebot.dm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/code/modules/mob/living/simple_animal/bot/mulebot.dm b/code/modules/mob/living/simple_animal/bot/mulebot.dm index ca875f65146..c98dcadd014 100644 --- a/code/modules/mob/living/simple_animal/bot/mulebot.dm +++ b/code/modules/mob/living/simple_animal/bot/mulebot.dm @@ -451,11 +451,11 @@ unbuckle_all_mobs() if(load) //don't have to do any of this for mobs. - load.forceMove(loc) - load.pixel_y = initial(load.pixel_y) - load.layer = initial(load.layer) - SET_PLANE_EXPLICIT(load, initial(load.plane), src) load = null + cached_load.forceMove(loc) + cached_load.pixel_y = initial(cached_load.pixel_y) + cached_load.layer = initial(cached_load.layer) + SET_PLANE_EXPLICIT(cached_load, initial(cached_load.plane), src) if(dirn) //move the thing to the delivery point. cached_load.Move(get_step(loc,dirn), dirn)