From f8ccfa9ce59acb4b82f2ba96c2664e1c571df9de Mon Sep 17 00:00:00 2001
From: SkyratBot <59378654+SkyratBot@users.noreply.github.com>
Date: Fri, 8 Apr 2022 22:34:01 +0200
Subject: [PATCH] [MIRROR] Armour tags on clothing say when an item blocks
pepperspray or facehuggers [MDB IGNORE] (#12614)
* Armour tags on clothing say when an item blocks pepperspray or facehuggers (#65784)
* Armour tags on clothing tell you when an item blocks pepperspray or facehuggers
* Will block, not always blocks
* Armour tags on clothing say when an item blocks pepperspray or facehuggers
Co-authored-by: cacogen <25089914+cacogen@users.noreply.github.com>
---
code/modules/clothing/clothing.dm | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)
diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm
index 3fcf26b9df6..d424b08dcd3 100644
--- a/code/modules/clothing/clothing.dm
+++ b/code/modules/clothing/clothing.dm
@@ -308,16 +308,16 @@
how_cool_are_your_threads += ""
. += how_cool_are_your_threads.Join()
- if(armor.bio || armor.bomb || armor.bullet || armor.energy || armor.laser || armor.melee || armor.fire || armor.acid)
+ if(armor.bio || armor.bomb || armor.bullet || armor.energy || armor.laser || armor.melee || armor.fire || armor.acid || flags_cover & HEADCOVERSMOUTH || flags_cover & PEPPERPROOF)
. += span_notice("It has a tag listing its protection classes.")
/obj/item/clothing/Topic(href, href_list)
. = ..()
if(href_list["list_armor"])
- var/list/readout = list("PROTECTION CLASSES (I-X)")
+ var/list/readout = list("PROTECTION CLASSES")
if(armor.bio || armor.bomb || armor.bullet || armor.energy || armor.laser || armor.melee)
- readout += "\nARMOR"
+ readout += "\nARMOR (I-X)"
if(armor.bio)
readout += "\nTOXIN [armor_to_protection_class(armor.bio)]"
if(armor.bomb)
@@ -331,11 +331,21 @@
if(armor.melee)
readout += "\nMELEE [armor_to_protection_class(armor.melee)]"
if(armor.fire || armor.acid)
- readout += "\nDURABILITY"
+ readout += "\nDURABILITY (I-X)"
if(armor.fire)
readout += "\nFIRE [armor_to_protection_class(armor.fire)]"
if(armor.acid)
readout += "\nACID [armor_to_protection_class(armor.acid)]"
+ if(flags_cover & HEADCOVERSMOUTH || flags_cover & PEPPERPROOF)
+ var/list/things_blocked = list()
+ if(flags_cover & HEADCOVERSMOUTH)
+ things_blocked += span_tooltip("Because this item is worn on the head and is covering the mouth, it will block facehugger proboscides, killing facehuggers.", "facehuggers")
+ if(flags_cover & PEPPERPROOF)
+ things_blocked += "pepperspray"
+ if(length(things_blocked))
+ readout += "\nCOVERAGE"
+ readout += "\nIt will block [english_list(things_blocked)]."
+
readout += ""
to_chat(usr, "[readout.Join()]")