From 61352468dcee109a8e5efa13110036ea0acca6f8 Mon Sep 17 00:00:00 2001 From: Leshana Date: Sat, 2 May 2020 22:23:30 -0400 Subject: [PATCH] Fixed build_overmap() to actually work. --- code/modules/overmap/sectors.dm | 2 +- code/modules/overmap/turfs.dm | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/code/modules/overmap/sectors.dm b/code/modules/overmap/sectors.dm index f437874609..1824a3947a 100644 --- a/code/modules/overmap/sectors.dm +++ b/code/modules/overmap/sectors.dm @@ -150,7 +150,7 @@ var/area/overmap/A = new for (var/square in block(locate(1,1,global.using_map.overmap_z), locate(global.using_map.overmap_size,global.using_map.overmap_size,global.using_map.overmap_z))) var/turf/T = square - if(T.x == global.using_map.overmap_size || T.y == global.using_map.overmap_size) + if(T.x == 1 || T.y == 1 || T.x == global.using_map.overmap_size || T.y == global.using_map.overmap_size) T = T.ChangeTurf(/turf/unsimulated/map/edge) else T = T.ChangeTurf(/turf/unsimulated/map) diff --git a/code/modules/overmap/turfs.dm b/code/modules/overmap/turfs.dm index fc9f0b16eb..bd31d6bc9a 100644 --- a/code/modules/overmap/turfs.dm +++ b/code/modules/overmap/turfs.dm @@ -19,7 +19,10 @@ var/global/list/map_sectors = list() var/turf/unsimulated/map/edge/wrap_buddy /turf/unsimulated/map/edge/Initialize() - . = ..() + ..() + return INITIALIZE_HINT_LATELOAD + +/turf/unsimulated/map/edge/LateInitialize() //This could be done by using the using_map.overmap_size much faster, HOWEVER, doing it programatically to 'find' // the edges this way allows for 'sub overmaps' elsewhere and whatnot. for(var/side in alldirs) //The order of this list is relevant: It should definitely break on finding a cardinal FIRST.