Added the z-level manager system from TG (#19532)

Added the z-level manager system from TG, mostly
This commit is contained in:
Fluffy
2024-07-22 13:00:38 +00:00
committed by GitHub
parent 0a9176841c
commit 1345beac4b
90 changed files with 614 additions and 245 deletions
+4 -4
View File
@@ -108,12 +108,12 @@
if(O.invisibility == 101)
O.singularity_act(src, current_size)
if(go_up && current_size >= STAGE_FIVE)
if(HasAbove(src.z))
var/turf/A = GetAbove(src)
if(GET_TURF_ABOVE(src))
var/turf/A = GET_TURF_ABOVE(src)
A.singularity_act(S, current_size, 0, 1)
if(go_down && current_size >= STAGE_FIVE)
if(HasBelow(src.z))
var/turf/B = GetBelow(src)
if(GET_TURF_BELOW(src))
var/turf/B = GET_TURF_BELOW(src)
B.singularity_act(S, current_size, 1, 0)
if(istype(src,/turf/simulated/mineral))
var/turf/simulated/mineral/M = src
@@ -507,7 +507,8 @@
return FALSE
/obj/singularity/proc/zMove(direction)
var/turf/destination = (direction == UP) ? GetAbove(src) : GetBelow(src)
var/turf/T = get_turf(src)
var/turf/destination = (direction == UP) ? GET_TURF_ABOVE(T) : GET_TURF_BELOW(T)
if(destination)
forceMove(destination)