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 22:27:42 +01:00
committed by GitHub
parent 8ebd7c9ad5
commit 94d92803b4
395 changed files with 3906 additions and 3299 deletions
-5
View File
@@ -224,7 +224,6 @@ GLOBAL_LIST_INIT(admin_verbs_debug, list(
/client/proc/toggle_recursive_explosions,
/client/proc/restart_sql,
/client/proc/fix_player_list,
/client/proc/lighting_show_verbs,
/client/proc/restart_controller,
/client/proc/cmd_display_del_log,
/client/proc/cmd_display_harddel_log,
@@ -236,7 +235,6 @@ GLOBAL_LIST_INIT(admin_verbs_debug, list(
/datum/admins/proc/map_template_load,
/datum/admins/proc/map_template_load_new_z,
/datum/admins/proc/map_template_upload,
/client/proc/global_ao_regenerate,
/client/proc/add_client_color,
/client/proc/connect_ntsl,
/client/proc/disconnect_ntsl,
@@ -342,7 +340,6 @@ GLOBAL_LIST_INIT(admin_verbs_hideable, list(
/client/proc/end_round,
/datum/admins/proc/immreboot,
/client/proc/cmd_dev_bst,
/client/proc/global_ao_regenerate,
/client/proc/everyone_random,
/datum/admins/proc/toggleAI,
/client/proc/cmd_admin_delete,
@@ -420,7 +417,6 @@ GLOBAL_LIST_INIT(admin_verbs_hideable, list(
/datum/admins/proc/capture_map,
/turf/proc/view_chunk,
/turf/proc/update_chunk,
/client/proc/lighting_show_verbs,
/client/proc/callproc,
/client/proc/callproc_target,
/client/proc/debug_controller,
@@ -498,7 +494,6 @@ GLOBAL_LIST_INIT(admin_verbs_dev, list( //will need to be altered - Ryan784
/client/proc/toggledebuglogs,
/client/proc/ZASSettings,
/client/proc/cmd_dev_bst,
/client/proc/lighting_show_verbs,
/client/proc/cmd_display_del_log,
/client/proc/cmd_display_harddel_log,
/client/proc/cmd_display_init_log,
+8 -8
View File
@@ -419,7 +419,7 @@
name = "bluespace technician's glasses"
desc = "A pair of modified sunglasses. The word 'BST' is stamped on the side."
vision_flags = (SEE_TURFS|SEE_OBJS|SEE_MOBS)
see_invisible = SEE_INVISIBLE_NOLIGHTING
lighting_alpha = LIGHTING_PLANE_ALPHA_SOMEWHAT_INVISIBLE
canremove = 0
flash_protection = FLASH_PROTECTION_MAJOR
@@ -431,17 +431,17 @@
switch (mode)
if ("X-Ray without Lighting")
vision_flags = SEE_TURFS|SEE_OBJS|SEE_MOBS|SEE_BLACKNESS|SEE_SELF
see_invisible = SEE_INVISIBLE_NOLIGHTING
vision_flags = SEE_TURFS|SEE_OBJS|SEE_MOBS|SEE_SELF
lighting_alpha = LIGHTING_PLANE_ALPHA_INVISIBLE
if ("X-Ray with Lighting")
vision_flags = SEE_TURFS|SEE_OBJS|SEE_MOBS|SEE_BLACKNESS|SEE_SELF
see_invisible = -1
vision_flags = SEE_TURFS|SEE_OBJS|SEE_MOBS|SEE_SELF
lighting_alpha = LIGHTING_PLANE_ALPHA_VISIBLE
if ("Darkvision")
vision_flags = SEE_BLACKNESS|SEE_SELF
see_invisible = SEE_INVISIBLE_NOLIGHTING
vision_flags = SEE_SELF
lighting_alpha = LIGHTING_PLANE_ALPHA_SOMEWHAT_INVISIBLE
if ("Normal vision")
vision_flags = 0
see_invisible = -1
lighting_alpha = LIGHTING_PLANE_ALPHA_VISIBLE
to_chat(usr, SPAN_NOTICE("\The [src]'s vision mode is now <b>[mode]</b>."))