Skip to content

Commit

Permalink
try to filter overlays/underlays in encode_appearance
Browse files Browse the repository at this point in the history
  • Loading branch information
Absolucy committed Jan 15, 2025
1 parent 8f3ab7e commit 782edb8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions monkestation/code/modules/replays/subsystem/replay.dm
Original file line number Diff line number Diff line change
Expand Up @@ -305,10 +305,13 @@ SUBSYSTEM_DEF(demo)
inted[i] += round(old_list[i] * 255)
color_string = jointext(inted, ",")
var/overlays_string = "\[]"
var/base_plane = PLANE_TO_TRUE(appearance.plane)
var/list/appearance_overlays = appearance.overlays
if(length(appearance_overlays))
var/list/overlays_list = list()
for(var/image/overlay as anything in appearance_overlays)
if(isnull(overlay) || PLANE_TO_TRUE(overlay.plane) != base_plane)
continue
overlays_list += encode_appearance(overlay, appearance, TRUE, target = target)
overlays_string = "\[[jointext(overlays_list, ",")]]"

Expand All @@ -317,6 +320,8 @@ SUBSYSTEM_DEF(demo)
if(length(appearance_underlays))
var/list/underlays_list = list()
for(var/image/underlay as anything in appearance_underlays)
if(isnull(underlay) || PLANE_TO_TRUE(underlay.plane) != base_plane)
continue
underlays_list += encode_appearance(underlay, appearance, TRUE, target = target)
underlays_string = "\[[jointext(underlays_list, ",")]]"

Expand Down

0 comments on commit 782edb8

Please sign in to comment.