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
🆑
fix: fixed MULEbots unloading deliveries onto the wrong tile
/🆑
This commit is contained in:
Roxy
2025-11-29 15:57:49 -06:00
committed by GitHub
parent a54e805a29
commit ddca22ae60
@@ -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)