Replaces our lighting system with CM's. (#21465)

Depends on #21458.

Ports https://github.com/cmss13-devs/cmss13/pull/4229, with the original
authors as:

- https://github.com/tgstation/TerraGov-Marine-Corps/pull/1964 for the
lighting controller (A-lexa)
- https://github.com/tgstation/TerraGov-Marine-Corps/pull/4747 and
https://github.com/tgstation/TerraGov-Marine-Corps/pull/7263 for the
lighting (TiviPlus)
- https://github.com/tgstation/tgstation/pull/54520 for the dir lighting
component
- https://github.com/tgstation/tgstation/pull/75018 for the out of
bounds fix in lighting
- https://github.com/tgstation/TerraGov-Marine-Corps/pull/6678 for the
emissives (TiviPlus)

The main driving reason behind this is that current lighting consumes
way too much processing power, especially for things like odysseys/away
sites where a billion light sources are processing/moving at once and
the game slows down to a crawl. Hopefully this improves the situation by
a good margin, but we will need some testmerging to confirm that.
<img width="1349" height="1349" alt="image"
src="https://github.com/user-attachments/assets/1059ba2b-c0c5-495a-9c76-2d75d0c42bf2"
/>
<img width="1349" height="1349" alt="image"
src="https://github.com/user-attachments/assets/9704b0f6-4cf6-4dfd-a6cb-5702ad07d677"
/>


- [x] Resolve todos
- [x] Look into open space fuckery (border objects)

---------

Co-authored-by: Matt Atlas <liermattia@gmail.com>
Co-authored-by: JohnWildkins <john.wildkins@gmail.com>
This commit is contained in:
Matt Atlas
2025-11-04 21:27:42 +00:00
committed by GitHub
co-authored by Matt Atlas JohnWildkins
parent 8ebd7c9ad5
commit 94d92803b4
395 changed files with 3906 additions and 3299 deletions
@@ -50,7 +50,6 @@
light_range = 2
light_power = 0.5
light_color = LIGHT_COLOR_GREEN
uv_intensity = 0
icon = 'icons/effects/effects.dmi'
icon_state = "greenglow"
+1 -1
View File
@@ -51,7 +51,7 @@
/obj/effect/decal/fake_object/light_source/Initialize()
.=..()
set_light()
set_light(light_power, light_range, light_color)
/obj/effect/decal/fake_object/light_source/invisible
simulated = 0
+6 -1
View File
@@ -122,6 +122,11 @@ would spawn and follow the beaker, even if it is carried or thrown.
AddElement(/datum/element/connect_loc, loc_connections)
/obj/effect/smoke/Destroy()
if(opacity)
set_opacity(FALSE)
return ..()
/obj/effect/smoke/proc/kill()
animate(src, alpha = 0, time = 2 SECONDS, easing = QUAD_EASING)
set_opacity(FALSE)
@@ -157,7 +162,7 @@ would spawn and follow the beaker, even if it is carried or thrown.
icon = 'icons/effects/effects.dmi'
icon_state = "sparks"
/obj/effect/smoke/illumination/New(var/newloc, var/brightness=15, var/lifetime=10)
/obj/effect/smoke/illumination/New(var/newloc, var/brightness=15, var/lifetime=5)
time_to_live=lifetime
..()
set_light(brightness)
+1 -1
View File
@@ -4,7 +4,7 @@
/obj/effect/shockwave
icon = 'icons/effects/shockwave.dmi'
icon = 'icons/effects/light_overlays/shockwave.dmi'
icon_state = "shockwave"
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
plane = DISPLACEMENT_PLATE_RENDER_LAYER