mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
Fix overmap spacemove not actually re-using deepspace sectors.
This commit is contained in:
@@ -29,14 +29,16 @@ var/list/cached_space = list()
|
||||
return 1
|
||||
|
||||
proc/get_deepspace(x,y)
|
||||
var/obj/effect/overmap/visitable/sector/temporary/res = locate(x,y,global.using_map.overmap_z)
|
||||
var/turf/unsimulated/map/overmap_turf = locate(x,y,global.using_map.overmap_z)
|
||||
if(!istype(overmap_turf))
|
||||
CRASH("Attempt to get deepspace at ([x],[y]) which is not on overmap: [overmap_turf]")
|
||||
var/obj/effect/overmap/visitable/sector/temporary/res = locate() in overmap_turf
|
||||
if(istype(res))
|
||||
return res
|
||||
else if(cached_space.len)
|
||||
res = cached_space[cached_space.len]
|
||||
cached_space -= res
|
||||
res.x = x
|
||||
res.y = y
|
||||
res.forceMove(overmap_turf)
|
||||
return res
|
||||
else
|
||||
return new /obj/effect/overmap/visitable/sector/temporary(x, y, global.using_map.get_empty_zlevel())
|
||||
@@ -110,5 +112,5 @@ proc/overmap_spacetravel(var/turf/space/T, var/atom/movable/A)
|
||||
var/obj/effect/overmap/visitable/sector/temporary/source = M
|
||||
if (source.can_die())
|
||||
testing("Caching [M] for future use")
|
||||
source.loc = null
|
||||
source.moveToNullspace()
|
||||
cached_space += source
|
||||
|
||||
Reference in New Issue
Block a user