mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-21 12:02:31 +01:00
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).
32 lines
633 B
Plaintext
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))
|