From e6a765c11cdeefd08838531bb4e8cd39d1b8dc18 Mon Sep 17 00:00:00 2001
From: Arturlang <24881678+Arturlang@users.noreply.github.com>
Date: Sun, 19 Apr 2026 20:42:26 +0300
Subject: [PATCH] Kills airlocks lights (#5309)
## About The Pull Request
airlocks update their lights every time it calls update_overlays which
seems pretty often, perf-wise this doesn't seem worth it with how common
they are, i don't think they contribute much
Keep in mind, this keeps the emissives and overlays and whatever, and
only removes the outward lights emitting from the airlock
## Why It's Good For The Game
tracy told us that lightning can use a helluvalot of time (old trace
though)
## Proof Of Testing
um
Screenshots/Videos
## Changelog
:cl:
del: for performance reasons, airlocks no longer emit their own lights
/:cl:
---------
Co-authored-by: Alexis
---
code/__DEFINES/~skyrat_defines/airlock.dm | 1 -
.../aesthetics/airlock/code/airlock.dm | 27 ++-----------------
2 files changed, 2 insertions(+), 26 deletions(-)
diff --git a/code/__DEFINES/~skyrat_defines/airlock.dm b/code/__DEFINES/~skyrat_defines/airlock.dm
index 484b5c20f44..b46f5dcba05 100644
--- a/code/__DEFINES/~skyrat_defines/airlock.dm
+++ b/code/__DEFINES/~skyrat_defines/airlock.dm
@@ -1,6 +1,5 @@
-#define AIRLOCK_LIGHT_POWER 0.5
#define AIRLOCK_LIGHT_RANGE 2
#define AIRLOCK_LIGHT_ENGINEERING "engineering"
#define AIRLOCK_LIGHT_FIRE "fire"
diff --git a/modular_skyrat/modules/aesthetics/airlock/code/airlock.dm b/modular_skyrat/modules/aesthetics/airlock/code/airlock.dm
index 53c1077b58e..cd8d9e7a072 100644
--- a/modular_skyrat/modules/aesthetics/airlock/code/airlock.dm
+++ b/modular_skyrat/modules/aesthetics/airlock/code/airlock.dm
@@ -35,7 +35,6 @@
. = ..()
var/frame_state
var/light_state = AIRLOCK_LIGHT_POWERON
- var/pre_light_color
if(machine_stat & MAINT) // in the process of being emagged
frame_state = AIRLOCK_FRAME_CLOSED
else switch(airlock_state)
@@ -43,53 +42,38 @@
frame_state = AIRLOCK_FRAME_CLOSED
if(locked)
light_state = AIRLOCK_LIGHT_BOLTS
- pre_light_color = AIRLOCK_BOLTS_LIGHT_COLOR
else if(emergency)
light_state = AIRLOCK_LIGHT_EMERGENCY
- pre_light_color = AIRLOCK_EMERGENCY_LIGHT_COLOR
else if(has_active_reta_access())
light_state = AIRLOCK_LIGHT_RETA
- pre_light_color = AIRLOCK_RETA_LIGHT_COLOR
else if(fire_active)
light_state = AIRLOCK_LIGHT_FIRE
- pre_light_color = AIRLOCK_FIRE_LIGHT_COLOR
else if(engineering_override)
light_state = AIRLOCK_LIGHT_ENGINEERING
- pre_light_color = AIRLOCK_ENGINEERING_LIGHT_COLOR
- else
- pre_light_color = AIRLOCK_POWERON_LIGHT_COLOR
+
if(AIRLOCK_DENY)
frame_state = AIRLOCK_FRAME_CLOSED
light_state = AIRLOCK_LIGHT_DENIED
- pre_light_color = AIRLOCK_DENY_LIGHT_COLOR
if(AIRLOCK_CLOSING)
frame_state = AIRLOCK_FRAME_CLOSING
light_state = AIRLOCK_LIGHT_CLOSING
- pre_light_color = AIRLOCK_ACCESS_LIGHT_COLOR
if(AIRLOCK_OPEN)
frame_state = AIRLOCK_FRAME_OPEN
if(locked)
light_state = AIRLOCK_LIGHT_BOLTS
- pre_light_color = AIRLOCK_BOLTS_LIGHT_COLOR
else if(emergency)
light_state = AIRLOCK_LIGHT_EMERGENCY
- pre_light_color = AIRLOCK_EMERGENCY_LIGHT_COLOR
else if(has_active_reta_access())
light_state = AIRLOCK_LIGHT_RETA
- pre_light_color = AIRLOCK_RETA_LIGHT_COLOR
else if(fire_active)
light_state = AIRLOCK_LIGHT_FIRE
- pre_light_color = AIRLOCK_FIRE_LIGHT_COLOR
else if(engineering_override)
light_state = AIRLOCK_LIGHT_ENGINEERING
- pre_light_color = AIRLOCK_ENGINEERING_LIGHT_COLOR
- else
- pre_light_color = AIRLOCK_POWERON_LIGHT_COLOR
+
light_state += "_open"
if(AIRLOCK_OPENING)
frame_state = AIRLOCK_FRAME_OPENING
light_state = AIRLOCK_LIGHT_OPENING
- pre_light_color = AIRLOCK_ACCESS_LIGHT_COLOR
. += get_airlock_overlay(frame_state, icon, src, em_block = TRUE)
if(airlock_material)
@@ -101,13 +85,6 @@
. += get_airlock_overlay("lights_[light_state]", overlays_file, src, em_block = FALSE)
. += emissive_appearance(overlays_file, "lights_[light_state]", src, alpha = src.alpha)
- if(multi_tile && filler)
- filler.set_light(l_range = AIRLOCK_LIGHT_RANGE, l_power = AIRLOCK_LIGHT_POWER, l_color = pre_light_color, l_on = TRUE)
-
- set_light(l_range = AIRLOCK_LIGHT_RANGE, l_power = AIRLOCK_LIGHT_POWER, l_color = pre_light_color, l_on = TRUE)
- else
- set_light(l_on = FALSE)
-
if(greyscale_accent_color)
. += get_airlock_overlay("[frame_state]_accent", overlays_file, src, em_block = TRUE, state_color = greyscale_accent_color)