Files
Matt Atlas 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

117 lines
2.4 KiB
Plaintext

/obj/effect/overlay
name = "overlay"
unacidable = 1
/// Added for possible image attachments to objects. For hallucinations and the like.
var/i_attached
/// Prevents janitorial cyborgs from cleaning this effect.
var/no_clean = FALSE
/obj/effect/overlay/Destroy()
i_attached = null
return ..()
/obj/effect/overlay/beam//Not actually a projectile, just an effect.
name="beam"
icon='icons/effects/beam.dmi'
icon_state="b_beam"
blend_mode = BLEND_ADD
plane = ABOVE_LIGHTING_PLANE
animate_movement = FALSE
var/tmp/atom/BeamSource
/obj/effect/overlay/palmtree_r
name = "palm tree"
icon = 'icons/misc/beach2.dmi'
icon_state = "palm1"
density = 1
layer = ABOVE_HUMAN_LAYER
anchored = 1
/obj/effect/overlay/palmtree_l
name = "palm tree"
icon = 'icons/misc/beach2.dmi'
icon_state = "palm2"
density = 1
layer = ABOVE_HUMAN_LAYER
anchored = 1
/obj/effect/overlay/coconut
name = "coconuts"
icon = 'icons/misc/beach.dmi'
icon_state = "coconuts"
/obj/effect/overlay/bluespacify
name = "bluespace"
icon = 'icons/turf/space.dmi'
icon_state = "bluespacify"
plane = ABOVE_LIGHTING_PLANE
layer = SUPERMATTER_WALL_LAYER
/obj/effect/overlay/temp
icon_state = "nothing"
anchored = 1
layer = 5
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
var/duration = 10 //in deciseconds
var/randomdir = TRUE
var/timerid
/obj/effect/overlay/temp/New()
..()
if(randomdir)
dir = (pick(GLOB.cardinals))
flick("[icon_state]", src)
QDEL_IN(src, duration)
/obj/effect/overlay/temp/ex_act(var/severity = 2.0)
return
/obj/effect/overlay/temp/dir_setting
randomdir = FALSE
/obj/effect/overlay/temp/dir_setting/New(loc, set_dir)
if(set_dir)
dir = set_dir
..()
/obj/effect/overlay/temp/kinetic_blast
name = "kinetic explosion"
icon = 'icons/obj/projectiles.dmi'
icon_state = "kinetic_blast"
layer = 5
duration = 4
/obj/effect/overlay/temp/explosion
name = "explosion"
icon = 'icons/effects/96x96.dmi'
icon_state = "explosion"
pixel_x = -32
pixel_y = -32
duration = 8
/obj/effect/overlay/temp/explosion/fast
icon_state = "explosionfast"
duration = 4
/obj/effect/overlay/closet_door
anchored = TRUE
plane = FLOAT_PLANE
layer = FLOAT_LAYER
vis_flags = VIS_INHERIT_ID
appearance_flags = KEEP_TOGETHER | LONG_GLIDE | PIXEL_SCALE
/obj/effect/overlay/teleport_pulse
icon = 'icons/effects/effects.dmi'
icon_state = "emppulse"
mouse_opacity = FALSE
anchored = TRUE
/obj/effect/overlay/teleport_pulse/Initialize(mapload, ...)
. = ..()
QDEL_IN(src, 8)