From 095ae99008e0bd7f3464e6a67fb2fa121870c012 Mon Sep 17 00:00:00 2001 From: Aylong Date: Thu, 11 Apr 2024 19:24:31 +0300 Subject: [PATCH] Better way --- code/__HELPERS/unsorted.dm | 2 +- code/game/area/areas.dm | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm index 1e7de38ae12e..4e347f8676d9 100644 --- a/code/__HELPERS/unsorted.dm +++ b/code/__HELPERS/unsorted.dm @@ -765,7 +765,7 @@ Returns 1 if the chain up to the area contains the given typepath areatype = areatemp.type var/list/turfs = list() - for(var/area/N as anything in world) + for(var/area/N as anything in GLOB.all_areas) if(istype(N, areatype)) for(var/turf/T in N) turfs += T diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm index 12b81b96e95d..e0364ea07b41 100644 --- a/code/game/area/areas.dm +++ b/code/game/area/areas.dm @@ -100,13 +100,13 @@ /area/New(loc, ...) if(!there_can_be_many) // Has to be done in New else the maploader will fuck up and find subtypes for the parent GLOB.all_unique_areas[type] = src - ..() + GLOB.all_areas += src + return ..() /area/Initialize(mapload) if(is_station_level(z)) RegisterSignal(SSsecurity_level, COMSIG_SECURITY_LEVEL_CHANGED, PROC_REF(on_security_level_update)) - GLOB.all_areas += src icon_state = "" layer = AREA_LAYER uid = ++global_uid