Files
cca0dfe7b6 Ports /tg/ and CM planemasters to replace our renderers. (#21458)
Part one of our nefarious plans to destroy lag forever, and also
accomplish some cool shit.

This replaces our renderer system with plane masters, this will also be
used to turn skyboxes into backdrops and thus totally remove skybox
updating lag. Additionally, this will let us manipulate entire planes
very easily to do all sorts of zany shit. All credit goes to the
original coders, this is some seriously cool stuff.

Also fixes some bizarre smoothing behaviour, reduces updateoverlays
calls since now not every single structure in the game tries smoothing
with nothing.

<img width="1349" height="1349" alt="image"
src="https://github.com/user-attachments/assets/9b7cecd7-3c47-448b-9dd8-9b904640bf82"
/>
<img width="1349" height="1349" alt="image"
src="https://github.com/user-attachments/assets/647d75a2-1bff-45ca-ab92-0aea10631afd"
/>

---------

Co-authored-by: Matt Atlas <liermattia@gmail.com>
2025-10-16 11:39:15 +00:00

51 lines
1.5 KiB
Plaintext

/obj/machinery/stargazer
name = "stargazer system"
icon = 'icons/obj/machinery/stargazer.dmi'
icon_state = "stargazer_off"
anchored = TRUE
density = TRUE
pixel_x = -32
pixel_y = -24
var/image/star_system_image
/obj/machinery/stargazer/feedback_hints(mob/user, distance, is_adjacent)
. += ..()
if(!(stat & BROKEN) && !(stat & NOPOWER))
. += SPAN_NOTICE("\The [src] shows the current sector to be <a href='byond://?src=[REF(src)];examine=1'>[SSatlas.current_sector.name]</a>.")
/obj/machinery/stargazer/Initialize(mapload, d, populate_components)
. = ..()
star_system_image = image(icon, null, "stargazer_[SSatlas.current_sector.name]")
star_system_image.plane = ABOVE_LIGHTING_PLANE
star_system_image.layer = SUPERMATTER_WALL_LAYER
power_change()
/obj/machinery/stargazer/power_change()
..()
if(stat & BROKEN)
icon_state = "stargazer_off"
ClearOverlays()
set_light(0)
else if(!(stat & NOPOWER))
icon_state = "stargazer_on"
AddOverlays(star_system_image)
var/stargazer_light_color = LIGHT_COLOR_HALOGEN
if(SSatlas.current_sector.starlight_color)
stargazer_light_color = SSatlas.current_sector.starlight_color
set_light(6, 2, stargazer_light_color)
else
icon_state = "stargazer_off"
ClearOverlays()
set_light(0)
/obj/machinery/stargazer/Topic(href, href_list, datum/ui_state/state)
if((stat & BROKEN) || (stat & NOPOWER))
return TRUE
if(!is_in_sight(usr, src))
return TRUE
if(usr.incapacitated(INCAPACITATION_KNOCKOUT))
return TRUE
if(href_list["examine"])
to_chat(usr, SSatlas.current_sector.get_chat_description())