From b0f2c2c832233bff775c52ce13c3606be8bf7d40 Mon Sep 17 00:00:00 2001 From: Iajret Creature <122297233+Steals-The-PRs@users.noreply.github.com> Date: Thu, 23 Nov 2023 22:14:37 +0300 Subject: [PATCH] [MIRROR] Fixes Window Damage Overlays [MDB IGNORE] (#25201) (#787) * 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
![image](https://github.com/tgstation/tgstation/assets/106436013/77c40048-5e2c-4db7-b5c1-581bf78d6999) (I swear one day I will make a PR longer than 2 lines... but today is not that day.) --------- * Fixes Window Damage Overlays --------- Co-authored-by: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Co-authored-by: TwistedCicrularConvexLens <106436013+TwistedCicrularConvexLens@users.noreply.github.com> 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 4260e7ba19f..a1676f0d39f 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