From 2fa63146b216f61a1abe0a6da7e09d82574e36f3 Mon Sep 17 00:00:00 2001
From: TwistedCicrularConvexLens
<106436013+TwistedCicrularConvexLens@users.noreply.github.com>
Date: Thu, 23 Nov 2023 03:23:37 +0000
Subject: [PATCH] Fixes Window Damage Overlays (#79876)
## About The Pull Request
Since https://github.com/tgstation/tgstation/pull/78719, Windows lacked
their damage overlays. This PR removes the **_one_** line responsible
that broke the overlays.
## Why It's Good For The Game
Fixes: https://github.com/tgstation/tgstation/issues/79082
## Changelog
:cl: TwistedSilicon
fix: Window damage overlays have been fixed.
/:cl:
Before
https://github.com/tgstation/tgstation/assets/106436013/694d2e46-0c76-4695-ad52-72c3cc292646
After
https://github.com/tgstation/tgstation/assets/106436013/d843fe5c-aaab-4784-827e-5132e7acdd5e

(I swear one day I will make a PR longer than 2 lines... but today is
not that day.)
---------
Co-authored-by: Fikou <23585223+Fikou@users.noreply.github.com>
---
code/game/objects/structures/window.dm | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm
index 67d3b7a2b18..01d961b177b 100644
--- a/code/game/objects/structures/window.dm
+++ b/code/game/objects/structures/window.dm
@@ -26,7 +26,6 @@
var/fulltile = FALSE
var/glass_type = /obj/item/stack/sheet/glass
var/glass_amount = 1
- var/mutable_appearance/crack_overlay
var/real_explosion_block //ignore this, just use explosion_block
var/break_sound = SFX_SHATTER
var/knock_sound = 'sound/effects/glassknock.ogg'
@@ -419,11 +418,9 @@
var/ratio = atom_integrity / max_integrity
ratio = CEILING(ratio*4, 1) * 25
- cut_overlay(crack_overlay)
if(ratio > 75)
return
- crack_overlay = mutable_appearance('icons/obj/structures.dmi', "damage[ratio]", -(layer+0.1))
- . += crack_overlay
+ . += mutable_appearance('icons/obj/structures.dmi', "damage[ratio]", -(layer+0.1))
/obj/structure/window/should_atmos_process(datum/gas_mixture/air, exposed_temperature)
return exposed_temperature > T0C + heat_resistance