Files
Bubberstation/code/modules/unit_tests/_unit_tests.dm
Kapu1178 848c4f98b3 Canonical Movement (#82085)
## About The Pull Request

- https://github.com/DaedalusDock/daedalusdock/pull/892
Currently, TG's movement chain is not canonical, meaning movement can
resolve in an order that doesn't actually represent what it going on.
For example, if something inside of an Entered() call would move the
currently moving object, it resolves in this order:

1. Original Move
2. Intercepted Move
3. Intercepted Moved
4. Original Moved

This makes Moved() unreliable at tracking things like spatial grid
locations. This is a massive problem.

This PR introduces `active_movement`, a list containing arguments for
`Moved()`. At the start of `Move()` and `doMove()`, if the list is
present, it will call Moved(), concluding the original movement, before
proceeding. The original `Move()` call will not end in `Moved()`, due to
`active_movement` being null.

This is touching some of the most important code in the game and needs
extensive testing.
2024-03-22 17:31:15 -07:00

9.9 KiB