Files
Fluffy 86f8d6fd4f Movement update v2 (#20548)
Refactored (second passage) how movement works, now it's mostly in line
with TG handling and avoids calling 3 gazillion Cross() Uncross() etc.
on every atom in a turf.
Fixed EMP protection from species not actually protecting (this includes
the surge prevention for IPCs).
Fixed EMP 3D calculation runtiming because I forgot to make the value
absolute and it was doing the square root of a negative number.
It's now possible to queue the round to start with the Start Round verb
even while the system is initializing, for an even faster pain train to
enter the round and test things.
2025-03-22 11:38:05 +00:00

32 lines
685 B
Plaintext

/obj/skybox
name = "skybox"
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
anchored = TRUE
simulated = FALSE
screen_loc = "CENTER:-224,CENTER:-224"
plane = SKYBOX_PLANE
/client
var/obj/skybox/skybox
/client/proc/update_skybox(rebuild)
if(!skybox)
skybox = new()
screen += skybox
rebuild = TRUE
var/turf/T = get_turf(eye)
if(T)
if(rebuild)
skybox.overlays.Cut()
skybox.overlays += SSskybox.get_skybox(T.z)
screen |= skybox
if(skybox)
skybox.screen_loc = "CENTER:[-224 - T.x],CENTER:[-224 - T.y]"
/mob/Move(atom/newloc, direct, glide_size_override, update_dir)
var/old_z = GET_Z(src)
. = ..()
if(. && client)
client.update_skybox(old_z != GET_Z(src))