From a2f33e79f1eab3ddaddfa7971b909f79bd880500 Mon Sep 17 00:00:00 2001 From: SmArtKar <44720187+SmArtKar@users.noreply.github.com> Date: Fri, 28 Mar 2025 18:24:38 +0100 Subject: [PATCH] Fixes incorrect indentation in blob victory code (#90282) ## About The Pull Request We ***really*** shouldn't be iterating over all areas for every single mob. No wonder this lags like hell. ## Changelog :cl: fix: Fixes incorrect indentation in blob victory code which could cause immense lag as a result /:cl: --- code/modules/antagonists/blob/overmind.dm | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/code/modules/antagonists/blob/overmind.dm b/code/modules/antagonists/blob/overmind.dm index 01429274f48..615f88f1668 100644 --- a/code/modules/antagonists/blob/overmind.dm +++ b/code/modules/antagonists/blob/overmind.dm @@ -210,18 +210,17 @@ GLOBAL_LIST_EMPTY(blob_nodes) else live_guy.fully_heal() - for(var/area/check_area in GLOB.areas) - if(!is_type_in_list(check_area, GLOB.the_station_areas)) - continue - if(!(check_area.area_flags & BLOBS_ALLOWED)) - continue - check_area.color = blobstrain.color - check_area.name = "blob" - check_area.icon = 'icons/mob/nonhuman-player/blob.dmi' - check_area.icon_state = "blob_shield" - check_area.layer = BELOW_MOB_LAYER - check_area.SetInvisibility(INVISIBILITY_NONE) - check_area.blend_mode = 0 + for(var/area_type in GLOB.the_station_areas) + var/area/check_area = GLOB.areas_by_type[area_type] + if(!(check_area.area_flags & BLOBS_ALLOWED)) + continue + check_area.color = blobstrain.color + check_area.name = "blob" + check_area.icon = 'icons/mob/nonhuman-player/blob.dmi' + check_area.icon_state = "blob_shield" + check_area.layer = BELOW_MOB_LAYER + check_area.SetInvisibility(INVISIBILITY_NONE) + check_area.blend_mode = 0 var/datum/antagonist/blob/B = mind.has_antag_datum(/datum/antagonist/blob) if(B)