Fixed build_overmap() to actually work.

This commit is contained in:
Leshana
2020-05-02 22:23:30 -04:00
parent 1c8ffad2c5
commit 61352468dc
2 changed files with 5 additions and 2 deletions
+1 -1
View File
@@ -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)
+4 -1
View File
@@ -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.