Damaged window and broken machine helpers (#75132)

## About The Pull Request

Added a helper that makes it possible to spawn broken machines without
var-editing.

Removed the damaged reinforced window spawner and added a general
damaged window helper working on any first window found on a tile.

<img width="787" alt="2"
src="https://user-images.githubusercontent.com/3625094/235808169-c6143606-52e8-4bb7-bab4-e7ce3d359eb2.PNG">

<img width="787" alt="1"
src="https://user-images.githubusercontent.com/3625094/235808160-688f56eb-269a-4019-8c1c-2819cc3a4432.PNG">

## Why It's Good For The Game

Less var edits, better tools for mappers, more immersive ruins.

## Changelog

🆑
qol: Mapping: Added broken machine map helper
qol: Mapping: Replaced damaged window spawner with a universal helper
/🆑
This commit is contained in:
Andrew
2023-05-04 23:06:30 +03:00
committed by GitHub
parent dc418a56ec
commit d3d2da52f9
8 changed files with 97 additions and 19 deletions
@@ -208,18 +208,6 @@
return
open_machine()
/obj/effect/spawner/structure/window/reinforced/damaged
name = "damaged reinforced window spawner"
spawn_list = list(/obj/structure/grille, /obj/structure/window/reinforced/fulltile/damaged)
/obj/structure/window/reinforced/fulltile/damaged
var/integrity_min_factor = 0.2
var/integrity_max_factor = 0.8
/obj/structure/window/reinforced/fulltile/damaged/Initialize(mapload)
. = ..()
atom_integrity = rand(max_integrity * integrity_min_factor, max_integrity * integrity_max_factor)
/obj/item/petri_dish/oldstation
name = "molly's biopsy"
desc = "You can see a moldy piece of sandwich inside the dish. Maybe it helped to preserve the bacteria for that long."