Skip to content

Commit

Permalink
[MIRROR] Fixes Window Damage Overlays [MDB IGNORE] (#25201) (#787)
Browse files Browse the repository at this point in the history
* Fixes Window Damage Overlays (#79876)

## About The Pull Request

Since tgstation/tgstation#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: tgstation/tgstation#79082
## Changelog
:cl: TwistedSilicon
fix: Window damage overlays have been fixed.
/:cl:

<details>
  <summary>Before</summary>

https://github.com/tgstation/tgstation/assets/106436013/694d2e46-0c76-4695-ad52-72c3cc292646

</details>
<details>
  <summary>After</summary>

https://github.com/tgstation/tgstation/assets/106436013/d843fe5c-aaab-4784-827e-5132e7acdd5e

</details>

![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 <[email protected]>
Co-authored-by: TwistedCicrularConvexLens <[email protected]>
Co-authored-by: Fikou <23585223+Fikou@ users.noreply.github.com>
  • Loading branch information
4 people authored Nov 23, 2023
1 parent 23f7141 commit b0f2c2c
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions code/game/objects/structures/window.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit b0f2c2c

Please sign in to comment.