diff --git a/code/game/machinery/doors/brigdoors.dm b/code/game/machinery/doors/brigdoors.dm index 48c9a443..5a84c284 100644 --- a/code/game/machinery/doors/brigdoors.dm +++ b/code/game/machinery/doors/brigdoors.dm @@ -26,7 +26,10 @@ var/timing = 1 // boolean, true/1 timer is on, false/0 means it's not timing var/picture_state // icon_state of alert picture, if not displaying text/numbers var/list/obj/machinery/targets = list() + var/list/obj/item/clothing/under/color/orange/uniforms = list() var/timetoset = 0 // Used to set releasetime upon starting the timer + var/spamcheck = 0 + var/alerted = 0 maptext_height = 26 maptext_width = 32 @@ -47,6 +50,10 @@ if(C.id == src.id) targets += C + for(var/obj/item/clothing/under/color/orange/D in world) + if(D.id == id) + uniforms += D + if(targets.len==0) stat |= BROKEN update_icon() @@ -68,6 +75,8 @@ if(timeleft > 1e5) src.releasetime = 0 + if(timeleft < 30 && !alerted) + alertuniforms() if(world.timeofday > src.releasetime) src.timer_end() // open doors, reset timer, clear status screen @@ -109,6 +118,9 @@ if(C.opened && !C.close()) continue C.locked = 1 C.icon_state = C.icon_locked + + alerted = 0 + return 1 @@ -148,6 +160,34 @@ return +// Alert the uniform wearers that their timer is about to end up +/obj/machinery/door_timer/proc/alertuniforms() + if(!uniforms.len) + alerted = 1 + return + + for(var/obj/item/clothing/under/color/orange/D in uniforms) + if(!ishuman(D.loc)) continue + D.loc << "A speaker in the collar of your suit pings:\n\blue Your cell timer will expire in 30 seconds or less. Please go to your cell to speed up processing." + + alerted = 1 + + return + +// Alert the uniform wearers that they are needed at their cell +/obj/machinery/door_timer/proc/summonuniforms() + if(spamcheck) return + if(!uniforms.len) return + for(var/obj/item/clothing/under/color/orange/D in uniforms) + if(!ishuman(D.loc)) continue + D.loc << "A speaker in the collar of your suit pings:\n\red You have been summoned to your cell!" + + spamcheck = 1 + spawn(30) + spamcheck = 0 + + return + //Allows AIs to use door_timer, see human attack_hand function below /obj/machinery/door_timer/attack_ai(var/mob/user as mob) return src.attack_hand(user) @@ -203,6 +243,14 @@ else dat += "
Activate Flash" + if(uniforms.len) + if(!spamcheck) + dat +="
Summon prisoner" + else + dat +="
Anti-spam measure activated. Please wait." + else + dat +="
No unfiroms linked" + dat += "

Close" dat += "" @@ -249,6 +297,8 @@ if(href_list["change"]) src.timer_start() + if(href_list["summon"]) + summonuniforms() src.add_fingerprint(usr) src.updateUsrDialog() diff --git a/code/game/objects/structures/crates_lockers/closets/secure/security.dm b/code/game/objects/structures/crates_lockers/closets/secure/security.dm index 635faa43..15aebe86 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/security.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/security.dm @@ -320,8 +320,23 @@ New() ..() - new /obj/item/clothing/under/color/orange( src ) - new /obj/item/clothing/shoes/orange( src ) + switch(id) + if("Cell 1") + new /obj/item/clothing/under/color/orange/cell1(src) + new /obj/item/clothing/shoes/orange(src) + if("Cell 2") + new /obj/item/clothing/under/color/orange/cell2(src) + new /obj/item/clothing/shoes/orange(src) + if("Cell 3") + new /obj/item/clothing/under/color/orange/cell3(src) + new /obj/item/clothing/shoes/orange(src) + if("Cell 4") + new /obj/item/clothing/under/color/orange/cell4(src) + new /obj/item/clothing/shoes/orange(src) + else + new /obj/item/clothing/under/color/orange(src) + new /obj/item/clothing/shoes/orange(src) + return diff --git a/code/modules/clothing/under/color.dm b/code/modules/clothing/under/color.dm index 22dd3993..a9cdcb03 100644 --- a/code/modules/clothing/under/color.dm +++ b/code/modules/clothing/under/color.dm @@ -42,6 +42,23 @@ has_sensor = 2 sensor_mode = 3 flags = FPRINT | TABLEPASS + var/id + +/obj/item/clothing/under/color/orange/cell1 + desc = "It's standardised Nanotrasen prisoner-wear. Its suit sensors are stuck in the \"Fully On\" position.\nThis one has \"Cell 1\" marked on it." + id = "Cell 1" + +/obj/item/clothing/under/color/orange/cell2 + desc = "It's standardised Nanotrasen prisoner-wear. Its suit sensors are stuck in the \"Fully On\" position.\nThis one has \"Cell 2\" marked on it." + id = "Cell 2" + +/obj/item/clothing/under/color/orange/cell3 + desc = "It's standardised Nanotrasen prisoner-wear. Its suit sensors are stuck in the \"Fully On\" position.\nThis one has \"Cell 3\" marked on it." + id = "Cell 3" + +/obj/item/clothing/under/color/orange/cell4 + desc = "It's standardised Nanotrasen prisoner-wear. Its suit sensors are stuck in the \"Fully On\" position.\nThis one has \"Cell 4\" marked on it." + id = "Cell 4" /obj/item/clothing/under/color/pink name = "pink jumpsuit" diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm index c0c6208e..8058315d 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -66,6 +66,7 @@ //Ties var/tie_msg var/aband_msg + var/cell_msg if(istype(w_uniform,/obj/item/clothing/under)) var/obj/item/clothing/under/U = w_uniform if(U.hastie && U.aband) @@ -81,12 +82,17 @@ else aband_msg += " with \icon[U.webbing] \a [U.webbing]" + if(istype(w_uniform,/obj/item/clothing/under/color/orange)) + var/obj/item/clothing/under/color/orange/V = w_uniform + if(V.id) + cell_msg = " It has a marker for \"[V.id]\" painted on the front and back." + if(w_uniform.blood_DNA) - msg += "[t_He] [t_is] wearing \icon[w_uniform] [w_uniform.gender==PLURAL?"some":"a"] blood-stained [w_uniform.name][tie_msg][aband_msg]!\n" + msg += "[t_He] [t_is] wearing \icon[w_uniform] [w_uniform.gender==PLURAL?"some":"a"] blood-stained [w_uniform.name][tie_msg][aband_msg]![cell_msg]\n" else if(w_uniform.wasbloody == 2) - msg += "[t_He] [t_is] wearing \icon[w_uniform] [w_uniform.gender==PLURAL?"some":"a"] luminol-covered [w_uniform.name][tie_msg][aband_msg]!\n" + msg += "[t_He] [t_is] wearing \icon[w_uniform] [w_uniform.gender==PLURAL?"some":"a"] luminol-covered [w_uniform.name][tie_msg][aband_msg]![cell_msg]\n" else - msg += "[t_He] [t_is] wearing \icon[w_uniform] \a [w_uniform][tie_msg][aband_msg].\n" + msg += "[t_He] [t_is] wearing \icon[w_uniform] \a [w_uniform][tie_msg][aband_msg].[cell_msg]\n" //head if(head)