mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-20 04:17:33 +01:00
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:
@@ -93,13 +93,14 @@
|
||||
|
||||
night_vision = TRUE
|
||||
if(can_change_invisible())
|
||||
owner.set_see_invisible(SEE_INVISIBLE_NOLIGHTING)
|
||||
owner.lighting_alpha = LIGHTING_PLANE_ALPHA_SOMEWHAT_INVISIBLE
|
||||
if(status & ORGAN_ROBOT)
|
||||
if(vision_mechanical_color)
|
||||
owner.add_client_color(vision_mechanical_color)
|
||||
else
|
||||
if(vision_color)
|
||||
owner.add_client_color(vision_color)
|
||||
owner.update_sight()
|
||||
|
||||
/obj/item/organ/internal/eyes/night/proc/disable_night_vision()
|
||||
if(!owner)
|
||||
@@ -108,13 +109,14 @@
|
||||
return
|
||||
night_vision = FALSE
|
||||
if(can_change_invisible())
|
||||
owner.set_see_invisible(SEE_INVISIBLE_LIVING)
|
||||
owner.lighting_alpha = LIGHTING_PLANE_ALPHA_VISIBLE
|
||||
if(status & ORGAN_ROBOT)
|
||||
if(vision_mechanical_color)
|
||||
owner.remove_client_color(vision_mechanical_color)
|
||||
else
|
||||
if(vision_color)
|
||||
owner.remove_client_color(vision_color)
|
||||
owner.update_sight()
|
||||
|
||||
/obj/item/organ/internal/stomach/tajara
|
||||
name = "reinforced stomach"
|
||||
|
||||
@@ -31,18 +31,19 @@
|
||||
lights_on = !lights_on
|
||||
|
||||
if(lights_on)
|
||||
set_light(lights_range, lights_intensity, lights_color, uv = 0, angle = LIGHT_WIDE)
|
||||
set_light_range_power_color(lights_range, lights_intensity, lights_color)
|
||||
set_light_on(TRUE)
|
||||
else
|
||||
set_light(0)
|
||||
set_light_on(FALSE)
|
||||
|
||||
/obj/item/organ/internal/augment/sightlights/emp_act(severity)
|
||||
. = ..()
|
||||
set_light(0)
|
||||
set_light_on(FALSE)
|
||||
|
||||
/obj/item/organ/internal/augment/sightlights/take_damage(var/amount, var/silent = 0)
|
||||
. = ..()
|
||||
set_light(0)
|
||||
set_light_on(FALSE)
|
||||
|
||||
/obj/item/organ/internal/augment/sightlights/take_internal_damage(var/amount, var/silent = 0)
|
||||
. = ..()
|
||||
set_light(0)
|
||||
set_light_on(FALSE)
|
||||
|
||||
@@ -226,7 +226,7 @@
|
||||
return FALSE
|
||||
|
||||
if(!online)
|
||||
set_light(3, 2, LIGHT_COLOR_RED, uv = 0, angle = LIGHT_WIDE)
|
||||
set_light(3, 2, LIGHT_COLOR_RED)
|
||||
owner.change_eye_color(250, 130, 130)
|
||||
owner.update_eyes()
|
||||
online = TRUE
|
||||
|
||||
@@ -84,8 +84,9 @@
|
||||
owner.set_default_language(LANGUAGE_LIIDRA)
|
||||
removed_langs = TRUE
|
||||
|
||||
owner.set_see_invisible(SEE_INVISIBLE_NOLIGHTING)
|
||||
owner.lighting_alpha = LIGHTING_PLANE_ALPHA_SOMEWHAT_INVISIBLE
|
||||
owner.add_client_color(/datum/client_color/vaurca)
|
||||
owner.update_sight()
|
||||
|
||||
if(prob(10))
|
||||
if(owner.can_feel_pain())
|
||||
|
||||
Reference in New Issue
Block a user