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 01:39:53 -06:00
committed by Erki
parent 057e787948
commit a86398d0d2
66 changed files with 231 additions and 216 deletions

View File

@@ -19,7 +19,7 @@ var/list/obj/effect/bump_teleporter/BUMP_TELEPORTERS = list()
BUMP_TELEPORTERS -= src
return ..()
/obj/effect/bump_teleporter/Bumped(atom/user)
/obj/effect/bump_teleporter/CollidedWith(atom/user)
if(!ismob(user))
//user.loc = src.loc //Stop at teleporter location
return
@@ -30,5 +30,5 @@ var/list/obj/effect/bump_teleporter/BUMP_TELEPORTERS = list()
for(var/obj/effect/bump_teleporter/BT in BUMP_TELEPORTERS)
if(BT.id == src.id_target)
usr.loc = BT.loc //Teleport to location with correct id.
usr.forceMove(BT.loc) //Teleport to location with correct id.
return

View File

@@ -65,7 +65,7 @@
return 0
. = ..()
/obj/effect/effect/water/Bump(atom/A)
/obj/effect/effect/water/Collide(atom/A)
var/turf/T = get_turf(A)
wet_things(T)
return ..()

View File

@@ -10,7 +10,7 @@
var/creator = null
anchored = 1.0
/obj/effect/portal/Bumped(mob/M as mob|obj)
/obj/effect/portal/CollidedWith(mob/M as mob|obj)
set waitfor = FALSE
src.teleport(M)

View File

@@ -148,9 +148,9 @@
STOP_PROCESSING(SSprocessing, src)
return ..()
/obj/effect/spider/spiderling/Bump(atom/user)
/obj/effect/spider/spiderling/Collide(atom/user)
if(istype(user, /obj/structure/table))
src.loc = user.loc
forceMove(user.loc)
else
..()