From ca3fb2aea6325abd8046c0b08d6cfa69e5bb2e0e Mon Sep 17 00:00:00 2001
From: Zonespace <41448081+Zonespace27@users.noreply.github.com>
Date: Wed, 11 Jan 2023 22:16:32 -0800
Subject: [PATCH] Mirrors #72337 (#18647)
Fixes clothing not showing armor (#72337)
So the linter didn't detect usage of a private var for some reason.
We never want to directly access the armor var because ideally its null
unless being used
Inspecting armor should work now.
Co-authored-by: Zephyr <12817816+ZephyrTFA@users.noreply.github.com>
---
code/modules/clothing/clothing.dm | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm
index 12c55697e03..6c4aee6a5bb 100644
--- a/code/modules/clothing/clothing.dm
+++ b/code/modules/clothing/clothing.dm
@@ -286,7 +286,7 @@
how_cool_are_your_threads += ""
. += how_cool_are_your_threads.Join()
- if(armor.has_any_armor() || flags_cover & HEADCOVERSMOUTH || flags_cover & PEPPERPROOF)
+ if(get_armor().has_any_armor() || (flags_cover & (HEADCOVERSMOUTH|PEPPERPROOF)))
. += span_notice("OOC: Click here to see its protection classes.") // SKYRAT EDIT ORIGINAL: ("It has a tag listing its protection classes.")
/obj/item/clothing/Topic(href, href_list)
@@ -295,6 +295,7 @@
if(href_list["list_armor"])
var/list/readout = list("PROTECTION CLASSES")
+ var/datum/armor/armor = get_armor()
var/added_damage_header = FALSE
for(var/damage_key in ARMOR_LIST_DAMAGE())
var/rating = armor.get_rating(damage_key)