[DNM] Fixes all that Bump() nonsense
Created by: Exxion
How it works:
Every instance of Cross()
in the codebase was changed to CrossCheck()
. This applies to both definitions and calls.
On the /atom/movable
level, Cross()
is defined to call CrossCheck()
and, if that returns false (and the object being crossed is dense and on a turf), the object being crossed moves itself to the beginning of its loc
's contents
. This causes it to be the object that gets bumped.
Also, border objects are checked before anything else, to prevent that causing nonsense.
Problems:
- I don't like the way I made it check border objects first. It works, but it's not exactly great code. I'll try to figure out a better way to do it.
- Mobs are fucky. Apparently, they are handled differently from all other
/atom/movable
s and cannot be manually inserted intocontents
, so they still don't work. I can't think of a way around this other than moving all OTHER dense objects to the END of contents when a mob should be bumped. That sounds like an awful solution and I'd rather not use it, but I will if nothing better comes up.