From b70ca591d83fe48e8b0b5f637ab117255ffcbfc6 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Sun, 17 Dec 2023 16:02:51 +0100 Subject: [PATCH] [MIRROR] Updating elevation.dm to fix a recursion issue. [MDB IGNORE] (#25669) * Updating elevation.dm to fix a recursion issue. (#80341) ## About The Pull Request I thought `ADD_TRAIT`, like `REMOVE_TRAIT`, supported using a list of trait sources, but I was wrong. ## Why It's Good For The Game ![immagine](https://github.com/tgstation/tgstation/assets/42542238/c992d19b-816c-4f8e-b05c-651ce12d158d) Should fix #80338. ## Changelog N/A * Updating elevation.dm to fix a recursion issue. --------- Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com> --- code/datums/elements/elevation.dm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/datums/elements/elevation.dm b/code/datums/elements/elevation.dm index 8a21edbd2e1..645ee2a6081 100644 --- a/code/datums/elements/elevation.dm +++ b/code/datums/elements/elevation.dm @@ -72,7 +72,8 @@ post_change_callbacks += CALLBACK(src, PROC_REF(post_change_turf), trait_sources) /datum/element/elevation/proc/post_change_turf(list/trait_sources, turf/changed) - ADD_TRAIT(changed, TRAIT_TURF_HAS_ELEVATED_OBJ(pixel_shift), trait_sources) + for(var/source in trait_sources) + ADD_TRAIT(changed, TRAIT_TURF_HAS_ELEVATED_OBJ(pixel_shift), source) reset_elevation(changed) #define ELEVATE_TIME 0.2 SECONDS