mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 10:21:11 +00:00
Added lazy events (#27091)
* Added lazy events * remember to compile before changing your code * Converted on_z_transition and on_post_z_transition to lazy events * add todo * fix oops * fix another oops * and anotha one * Moved unit tests to the proper place
This commit is contained in:
@@ -137,9 +137,9 @@
|
||||
P.reflected = TRUE//you can now get hit by the projectile you just fired. Careful with portals!
|
||||
|
||||
if(curturf.z != destturf.z)
|
||||
INVOKE_EVENT(teleatom.on_z_transition, list("user" = teleatom, "from_z" = curturf.z, "to_z" = destturf.z))
|
||||
teleatom.lazy_invoke_event(/lazy_event/on_z_transition, list("user" = teleatom, "from_z" = curturf.z, "to_z" = destturf.z))
|
||||
for(var/atom/movable/AA in recursive_type_check(teleatom))
|
||||
INVOKE_EVENT(AA.on_z_transition, list("user" = AA, "from_z" = curturf.z, "to_z" = destturf.z))
|
||||
AA.lazy_invoke_event(/lazy_event/on_z_transition, list("user" = AA, "from_z" = curturf.z, "to_z" = destturf.z))
|
||||
|
||||
if(force_teleport)
|
||||
teleatom.forceMove(destturf,TRUE)
|
||||
|
||||
Reference in New Issue
Block a user