Kills airlocks lights (#5309)

<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may
not be viewable. -->
<!-- You can view Contributing.MD for a detailed description of the pull
request process. -->

## 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
<!-- Describe The Pull Request. Please be sure every change is
documented or this can delay review and even discourage maintainers from
merging your PR! -->

<!-- Please make sure to actually test your PRs. If you have not tested
your PR mention it. -->

## Why It's Good For The Game
tracy told us that lightning can use a helluvalot of time (old trace
though)
<!-- Argue for the merits of your changes and how they benefit the game,
especially if they are controversial and/or far reaching. If you can't
actually explain WHY what you are doing will improve the game, then it
probably isn't good for the game in the first place. -->

## Proof Of Testing
um
<!-- Compile and run your code locally. Make sure it works. This is the
place to show off your changes! We are not responsible for testing your
features. -->
<details>
<summary>Screenshots/Videos</summary>

</details>

## Changelog

<!-- If your PR modifies aspects of the game that can be concretely
observed by players or admins you should add a changelog. If your change
does NOT meet this description, remove this section. Be sure to properly
mark your PRs to prevent unnecessary GBP loss. You can read up on GBP
and its effects on PRs in the tgstation guides for contributors. Please
note that maintainers freely reserve the right to remove and add tags
should they deem it appropriate. You can attempt to finagle the system
all you want, but it's best to shoot for clear communication right off
the bat. -->

🆑
del: for performance reasons, airlocks no longer emit their own lights
/🆑

<!-- Both 🆑's are required for the changelog to work! You can put
your name to the right of the first 🆑 if you want to overwrite your
GitHub username as author ingame. -->
<!-- You can use multiple of the same prefix (they're only used for the
icon ingame) and delete the unneeded ones. Despite some of the tags,
changelogs should generally represent how a player might be affected by
the changes rather than a summary of the PR's contents. -->

<!-- By opening a pull request. You have read and understood the
repository rules located on the main README.md on this project. -->

---------

Co-authored-by: Alexis <catmc8565@gmail.com>
This commit is contained in:
Arturlang
2026-04-19 10:42:26 -07:00
committed by GitHub
co-authored by Alexis
parent 93d87cab3b
commit e6a765c11c
2 changed files with 2 additions and 26 deletions
@@ -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"
@@ -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)