From 4bcd55c293c94f1ca1ac0cdd7da71c3909c36401 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Tue, 29 Jun 2021 17:47:00 +0200 Subject: [PATCH] [MIRROR] Fixes a runtime: Entered() passing the wrong args (#6578) * Fixes a runtime: Entered() passing the wrong args (#59854) * Fixes a runtime: Entered() passing the wrong args Co-authored-by: Rohesie --- code/game/atoms_movable.dm | 13 +++++++------ code/game/turfs/turf.dm | 4 ++-- code/modules/events/spacevine.dm | 2 +- code/modules/mob/living/carbon/human/emote.dm | 2 +- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm index 2d30ad11f06..db6292ea766 100644 --- a/code/game/atoms_movable.dm +++ b/code/game/atoms_movable.dm @@ -685,6 +685,7 @@ var/same_loc = oldloc == destination var/area/old_area = get_area(oldloc) var/area/destarea = get_area(destination) + var/movement_dir = get_dir(src, destination) moving_diagonally = 0 @@ -692,18 +693,18 @@ if(!same_loc) if(oldloc) - oldloc.Exited(src, destination) + oldloc.Exited(src, movement_dir) if(old_area && old_area != destarea) - old_area.Exited(src, destination) + old_area.Exited(src, movement_dir) var/turf/oldturf = get_turf(oldloc) var/turf/destturf = get_turf(destination) var/old_z = (oldturf ? oldturf.z : null) var/dest_z = (destturf ? destturf.z : null) if (old_z != dest_z) onTransitZ(old_z, dest_z) - destination.Entered(src, oldloc) + destination.Entered(src, movement_dir) if(destarea && old_area != destarea) - destarea.Entered(src, oldloc) + destarea.Entered(src, movement_dir) . = TRUE @@ -713,9 +714,9 @@ loc = null if (oldloc) var/area/old_area = get_area(oldloc) - oldloc.Exited(src, null) + oldloc.Exited(src, NONE) if(old_area) - old_area.Exited(src, null) + old_area.Exited(src, NONE) Moved(oldloc, NONE, TRUE) diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index 79ff5464861..5a2447f7fa3 100644 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -105,8 +105,8 @@ GLOBAL_LIST_EMPTY(station_turfs) visibilityChanged() - for(var/atom/movable/AM in src) - Entered(AM) + for(var/atom/movable/content as anything in src) + Entered(content, NONE) var/area/A = loc if(!IS_DYNAMIC_LIGHTING(src) && IS_DYNAMIC_LIGHTING(A)) diff --git a/code/modules/events/spacevine.dm b/code/modules/events/spacevine.dm index 01ef356f4e6..9b8e2238f02 100644 --- a/code/modules/events/spacevine.dm +++ b/code/modules/events/spacevine.dm @@ -479,7 +479,7 @@ for(var/datum/spacevine_mutation/SM in SV.mutations) SM.on_birth(SV) - location.Entered(SV) + location.Entered(SV, NONE) return SV /datum/spacevine_controller/proc/VineDestroyed(obj/structure/spacevine/S) diff --git a/code/modules/mob/living/carbon/human/emote.dm b/code/modules/mob/living/carbon/human/emote.dm index 5408243527b..20549ebbd6f 100644 --- a/code/modules/mob/living/carbon/human/emote.dm +++ b/code/modules/mob/living/carbon/human/emote.dm @@ -192,7 +192,7 @@ update_body() if(isturf(loc)) var/turf/T = loc - T.Entered(src) + T.Entered(src, NONE) //Ayy lmao