Code Cleanup: (Bump(), Bumped()) -> (Collide(), CollidedWith()) (#4349)

This PR rips out the old Bump() and Bumped() procs and replaces them with Collide() and CollidedWith() respectively. Behavior should be the same, but Bump() should no longer be double-called, and no longer relies on spawns.

Other changes:

LAssailant is now a weakref.
Some direct loc setting are now forceMove().
This commit is contained in:
Lohikar
2018-03-08 09:39:53 +02:00
committed by Erki
parent 057e787948
commit a86398d0d2
66 changed files with 231 additions and 216 deletions
@@ -37,7 +37,8 @@
return
/obj/effect/accelerated_particle/Bump(atom/A)
/obj/effect/accelerated_particle/Collide(atom/A)
. = ..()
if (A)
if(ismob(A))
toxmob(A)
@@ -45,11 +46,10 @@
A:energy += energy
return
/obj/effect/accelerated_particle/Bumped(atom/A)
/obj/effect/accelerated_particle/CollidedWith(atom/A)
. = ..()
if(ismob(A))
Bump(A)
return
toxmob(A)
/obj/effect/accelerated_particle/ex_act(severity)
@@ -72,11 +72,15 @@
/obj/singularity/bullet_act(obj/item/projectile/P)
return 0 //Will there be an impact? Who knows. Will we see it? No.
/obj/singularity/Bump(atom/A)
consume(A)
/obj/singularity/Collide(atom/A)
. = ..()
if (A)
consume(A)
/obj/singularity/Bumped(atom/A)
consume(A)
/obj/singularity/CollidedWith(atom/movable/AM)
. = ..()
if (AM)
consume(AM)
/obj/singularity/process()
eat()