mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-01-06 23:41:57 +00:00
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:
@@ -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
|
||||
|
||||
@@ -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 ..()
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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
|
||||
..()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user