Paradise icon indicating copy to clipboard operation
Paradise copied to clipboard

refactor: Movement cross/uncross implementation.

Open warriorstar-orion opened this issue 5 months ago • 1 comments

What Does This PR Do

This PR refactors several aspects of movement code. It provides a replacement implementation for /atom/movable/Move which does not call the native implementation nor the various /Cross//Uncross native procs, instead relegating this behavior to signal handlers. It introduces the connect_loc component, which handles crossing-style signals for objects by reregistering the specified signals onto locations that the parent moves to, and connect_loc_behalf, which does the same thing as connect_loc except on behalf of another listener.

This PR is an amalgamation of several /tg/ PRs, including but not limited to:

  • https://github.com/tgstation/tgstation/pull/38938
  • https://github.com/tgstation/tgstation/pull/58188
  • https://github.com/tgstation/tgstation/pull/58340
  • https://github.com/tgstation/tgstation/pull/59608
  • https://github.com/tgstation/tgstation/pull/59804

Why It's Good For The Game

This implementation clears the way for https://github.com/ParadiseSS13/Paradise/pull/26637, another important refactor.

Many native BYOND procs are called millions of times a round for no reason. This implementation shortcircuits millions of these calls.

2024_09_05__15_11_20__Paradise Profile Viewer

2024_09_05__15_11_27__Paradise Profile Viewer

Overall this is a much cleaner implementation and easier to reason about, surprisingly.

Testing

In progorororereressss.

  • [X] Test crossing terror spider webs.
  • [x] Test bumps into doors/airlocks.
  • [X] Test bumps into gravgen tiles.
  • [X] Test crossover/crossing organics and exposed pulse demons.
  • [X] Test crossing over mice for squeak noise.
  • [X] Test crossing over peels.
  • [x] Test passing flipped tables in correct directions.
  • [x] Test projectiles passing shieldwalls and flipped tables.
  • [X] Test mobs passing under tesla balls.
  • [x] Test treadmill.
  • [x] Test assemblies.
  • [X] Test walking barefoot on syringes.
  • [X] Test meteor gun.
  • [x] Test necropolis doors.
  • [X] Test bloody decals.
  • [X] Test flamethrowers.
  • [X] Test beartraps.
  • [X] Test crossing over bluespace lockers.
  • [x] Test railings.
  • [X] Test teleport hubs.
  • [x] Test border firedoors.
  • [X] Test bonfires.
  • [X] Test acid.
  • [X] Test windoors.
  • [X] Test mines.
  • [X] Test snap-pops.
  • [X] Test tar.
  • [X] Test proximity sensors in assemblies, as well as assemblies placed in crates.
  • [X] Test proximity detector for energy projectiles shot near a singulo.

Declaration

  • [X] I confirm that I either do not require pre-approval for this PR, or I have obtained such approval and have included a screenshot to demonstrate this below.

Changelog

NPFC

warriorstar-orion avatar Sep 12 '24 17:09 warriorstar-orion