Files
Aurora.3/code/_onclick/hud/skybox.dm
T
FluffyandGitHub ab23fbdb70 Function overloads condensation (#18939)
Unified most of the procs into one definition, so there are no duplicate
around the codebase.
Marked some of the above as overridable if a good enough case can be
made for them (eg. external dependency or unlikely to be used).
2024-04-19 21:19:41 +00:00

32 lines
633 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()
var/old_z = GET_Z(src)
. = ..()
if(. && client)
client.update_skybox(old_z != GET_Z(src))