From a616830d1d91eb2d65eb0b6fba21fb3441236e94 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Thu, 4 Aug 2022 16:48:29 +0200 Subject: [PATCH] [MIRROR] Add chance for maintenance crate and closet spawners to be open [MDB IGNORE] (#15369) * Add chance for maintenance crate and closet spawners to be open (#68851) * Add randomized open state for crate spawners * Add chance for empty closets to spawn open * Add chance for maintenance crate and closet spawners to be open Co-authored-by: Tim --- .../effects/spawners/random/structure.dm | 26 ++++++++++++++----- 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/code/game/objects/effects/spawners/random/structure.dm b/code/game/objects/effects/spawners/random/structure.dm index 2458bd3c7cc..cf2d5eab6ec 100644 --- a/code/game/objects/effects/spawners/random/structure.dm +++ b/code/game/objects/effects/spawners/random/structure.dm @@ -101,6 +101,13 @@ /obj/structure/closet/crate/science = 1, ) +/obj/effect/spawner/random/structure/crate_empty/Initialize(mapload) + var/obj/structure/closet/crate/peek_a_boo = ..() + if(istype(peek_a_boo)) + peek_a_boo.opened = prob(50) + + return INITIALIZE_HINT_QDEL + /obj/effect/spawner/random/structure/crate_loot name = "lootcrate spawner" icon_state = "crate" @@ -127,6 +134,13 @@ /obj/structure/closet/acloset = 1, ) +/obj/effect/spawner/random/structure/closet_empty/Initialize(mapload) + var/obj/structure/closet/peek_a_boo = ..() + if(istype(peek_a_boo)) + peek_a_boo.opened = prob(50) + + return INITIALIZE_HINT_QDEL + /obj/effect/spawner/random/structure/closet_maintenance name = "maintenance closet spawner" icon_state = "locker" @@ -211,17 +225,17 @@ /obj/effect/spawner/random/structure/billboard/roadsigns //also pretty much only unifunctionally useful for gas stations name = "\improper Gas Station billboard spawner" loot = list( - /obj/structure/billboard/roadsign/two = 25, - /obj/structure/billboard/roadsign/twothousand = 25, - /obj/structure/billboard/roadsign/twomillion = 25, - /obj/structure/billboard/roadsign/error = 25, + /obj/structure/billboard/roadsign/two, + /obj/structure/billboard/roadsign/twothousand, + /obj/structure/billboard/roadsign/twomillion, + /obj/structure/billboard/roadsign/error, ) /obj/effect/spawner/random/structure/steam_vent name = "steam vent spawner" loot = list( - /obj/structure/steam_vent = 50, - /obj/structure/steam_vent/fast = 50, + /obj/structure/steam_vent, + /obj/structure/steam_vent/fast, ) /obj/effect/spawner/random/structure/musician/piano/random_piano