From df1f548198cf68868ecdef04ca1898c881ff3683 Mon Sep 17 00:00:00 2001 From: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com> Date: Sun, 20 Dec 2020 23:02:38 +0000 Subject: [PATCH] Removes ability to put collars on jumpsuits (#15155) * Removes ability to put collars on jumpsuits * Mochi tweaks --- code/modules/clothing/clothing.dm | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index 6a9dd763a05..64fe5c0501a 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -666,10 +666,19 @@ BLIND // can't see anything 3 = Report location */ var/list/accessories = list() + + /// List of blacklisted accessory types + var/list/blacklisted_accessory_typecache var/displays_id = 1 var/rolled_down = 0 var/basecolor +/obj/item/clothing/under/Initialize(mapload) + . = ..() + blacklisted_accessory_typecache = typecacheof(list( + /obj/item/clothing/accessory/petcollar // No collars on jumpsuits + )) + /obj/item/clothing/under/rank/New() if(random_sensor) sensor_mode = pick(SENSOR_OFF, SENSOR_LIVING, SENSOR_VITALS, SENSOR_COORDS) @@ -685,11 +694,17 @@ BLIND // can't see anything else return FALSE + if(is_type_in_typecache(A, blacklisted_accessory_typecache)) + to_chat(usr, "[A] doesn't fit on [src].") + return FALSE + if(accessories.len) for(var/obj/item/clothing/accessory/AC in accessories) if((A.slot in list(ACCESSORY_SLOT_UTILITY, ACCESSORY_SLOT_ARMBAND)) && AC.slot == A.slot) + to_chat(usr, "[A] doesn't fit on [src].") return FALSE if(!A.allow_duplicates && AC.type == A.type) + to_chat(usr, "You cannot attach more accessories of this type to [src].") return FALSE /obj/item/clothing/under/attackby(obj/item/I, mob/user, params) @@ -716,8 +731,6 @@ BLIND // can't see anything H.update_inv_w_uniform() return TRUE - else - to_chat(user, "You cannot attach more accessories of this type to [src].") return FALSE