mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-25 09:01:40 +00:00
* Fixes a hard del in overlay lighting, fixes inconsistent light overlays (#79939)
## About The Pull Request
Fixes https://github.com/tgstation/tgstation/issues/79418
Fixes https://github.com/tgstation/tgstation/issues/79345
Fixes https://github.com/Skyrat-SS13/Skyrat-tg/issues/25220

The root of the issue though was an early return in `on_holder_qdeleted`
that resulted in not setting the `current_holder` to null.
I'm assuming this can also happen because `check_holder()` can
potentially set the `current_holder` back to the original parent's `loc`
(in this case, the mechanical toolbox) in the code below, after the
parent has been qdeleted.
8c0becb4f0/code/datums/components/overlay_lighting.dm (L276-L278)
Adds checks to ensure that this cannot happen.
Edit:
On top of this, stored light sources were behaving inconsistently where
if you placed a storage item (like a backpack for instance) on the floor
and then put the flashlight inside of that, it would allow the light to
shine through. However as soon as you picked the storage item up, the
light would mysteriously vanish.
<details><summary>For simplicity's sake, the light will always get
blocked if placed inside of a storage item now.</summary>

</details>
## Why It's Good For The Game
Bugfix
## Changelog
🆑
fix: fixes an overlay lighting hard del
fix: flashlights placed inside of backpacks and other storage items that
were on the floor will no longer allow light to shine through
/🆑
* Fixes a hard del in overlay lighting, fixes inconsistent light overlays
---------
Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com>
21 KiB
21 KiB