Skip to content

Commit

Permalink
Fixes Statues emitting solid lights (#81398)
Browse files Browse the repository at this point in the history
## About The Pull Request
Fixes #63653
![Screenshot 2024-02-10
003356](https://github.com/tgstation/tgstation/assets/16868239/2fc8b2f0-81a0-40d9-9b52-bd04e66a30df)
Custom sculpted statues no longer include the light layers of objects
such as lanterns and PDA lights.
## Why It's Good For The Game
No longer have to worry if sculpting someone with their lights on.
Can safely sculpt a vibebot without covering your screen in a solid
circle.
## Changelog
:cl:
fix: Sculpted statues stop including light layers.
/:cl:

---------

Co-authored-by: LemonInTheDark <[email protected]>
(cherry picked from commit 1f494b47e95a9287c46fd0fa29247eb87aedddf1)
  • Loading branch information
Ed640 committed Feb 11, 2024
1 parent a1f89c5 commit c3135dd
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions code/modules/art/statues.dm
Original file line number Diff line number Diff line change
Expand Up @@ -572,23 +572,21 @@ Moving interrupts
var/static/list/plane_whitelist = list(FLOAT_PLANE, GAME_PLANE, FLOOR_PLANE)

/// Ideally we'd have knowledge what we're removing but i'd have to be done on target appearance retrieval
var/list/overlays_to_remove = list()
var/list/overlays_to_keep = list()
for(var/mutable_appearance/special_overlay as anything in content_ma.overlays)
var/mutable_appearance/real = new()
real.appearance = special_overlay
if(PLANE_TO_TRUE(real.plane) in plane_whitelist)
continue
overlays_to_remove += real
content_ma.overlays -= overlays_to_remove
overlays_to_keep += real
content_ma.overlays = overlays_to_keep

var/list/underlays_to_remove = list()
var/list/underlays_to_keep = list()
for(var/mutable_appearance/special_underlay as anything in content_ma.underlays)
var/mutable_appearance/real = new()
real.appearance = special_underlay
if(PLANE_TO_TRUE(real.plane) in plane_whitelist)
continue
underlays_to_remove += real
content_ma.underlays -= underlays_to_remove
underlays_to_keep += real
content_ma.underlays = underlays_to_keep

content_ma.appearance_flags &= ~KEEP_APART //Don't want this
content_ma.filters = filter(type="color",color=greyscale_with_value_bump,space=FILTER_COLOR_HSV)
Expand Down

0 comments on commit c3135dd

Please sign in to comment.