Improve space map edges

This commit is contained in:
Aronai Sieyes
2020-04-02 01:07:38 -04:00
parent 896c2bf6b8
commit 09003a6c61
8 changed files with 82 additions and 43 deletions

View File

@@ -74,6 +74,12 @@
global.using_map.contact_levels |= map_z
global.using_map.map_levels |= map_z
/obj/effect/overmap/visitable/proc/get_space_zlevels()
if(in_space)
return map_z
else
return list()
//Helper for init.
/obj/effect/overmap/visitable/proc/check_ownership(obj/object)
if((object.z in map_z) && !(get_area(object) in SSshuttles.shuttle_areas))

View File

@@ -96,10 +96,10 @@ proc/overmap_spacetravel(var/turf/space/T, var/atom/movable/A)
break
if(!TM)
TM = get_deepspace(M.x,M.y)
nz = pick(TM.map_z)
nz = pick(TM.get_space_zlevels())
var/turf/dest = locate(nx,ny,nz)
if(dest)
if(istype(dest))
A.forceMove(dest)
if(ismob(A))
var/mob/D = A
@@ -110,5 +110,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.forceMove(null)
source.loc = null
cached_space += source