From fbc76852d02ea8f9a538a08e862e00df2edded79 Mon Sep 17 00:00:00 2001
From: zxaber <37497534+zxaber@users.noreply.github.com>
Date: Tue, 4 Jun 2019 23:44:20 -0700
Subject: [PATCH] Replaces borg hat whitelist with a blacklist, making most
hats wearable by borgs (#44203)
* HATS
HATS
* fixes a pretty bad oversight
* AppVeyor pls
* update
---
.../modules/mob/living/silicon/robot/robot.dm | 28 +++++--------------
.../mob/living/silicon/robot/robot_defense.dm | 7 ++---
2 files changed, 9 insertions(+), 26 deletions(-)
diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm
index d5b8fd54dbe..1a9b4092ff5 100644
--- a/code/modules/mob/living/silicon/robot/robot.dm
+++ b/code/modules/mob/living/silicon/robot/robot.dm
@@ -81,26 +81,12 @@
var/hasExpanded = FALSE
var/obj/item/hat
var/hat_offset = -3
- var/list/equippable_hats = list(/obj/item/clothing/head/caphat,
- /obj/item/clothing/head/hardhat,
- /obj/item/clothing/head/centhat,
- /obj/item/clothing/head/HoS,
- /obj/item/clothing/head/beret,
- /obj/item/clothing/head/kitty,
- /obj/item/clothing/head/hopcap,
- /obj/item/clothing/head/wizard,
- /obj/item/clothing/head/nursehat,
- /obj/item/clothing/head/sombrero,
- /obj/item/clothing/head/helmet/chaplain/witchunter_hat,
- /obj/item/clothing/head/soft/, //All baseball caps
- /obj/item/clothing/head/that, //top hat
- /obj/item/clothing/head/collectable/tophat, //Not sure where this one is found, but it looks the same so might as well include
- /obj/item/clothing/mask/bandana/, //All bandanas (which only work in hat mode)
- /obj/item/clothing/head/fedora,
- /obj/item/clothing/head/beanie/, //All beanies
- /obj/item/clothing/ears/headphones,
- /obj/item/clothing/head/helmet/skull,
- /obj/item/clothing/head/crown/fancy)
+ var/list/blacklisted_hats = list( //Hats that don't really work on borgos
+ /obj/item/clothing/head/helmet/space/santahat,
+ /obj/item/clothing/head/welding,
+ /obj/item/clothing/head/mob_holder, //I am so very upset that this breaks things
+ /obj/item/clothing/head/helmet/space/eva,
+ )
can_buckle = TRUE
buckle_lying = FALSE
@@ -163,7 +149,7 @@
updatename()
- equippable_hats = typecacheof(equippable_hats)
+ blacklisted_hats = typecacheof(blacklisted_hats)
playsound(loc, 'sound/voice/liveagain.ogg', 75, 1)
aicamera = new/obj/item/camera/siliconcam/robot_camera(src)
diff --git a/code/modules/mob/living/silicon/robot/robot_defense.dm b/code/modules/mob/living/silicon/robot/robot_defense.dm
index f342c90db70..15fb14a6b52 100644
--- a/code/modules/mob/living/silicon/robot/robot_defense.dm
+++ b/code/modules/mob/living/silicon/robot/robot_defense.dm
@@ -1,8 +1,5 @@
/mob/living/silicon/robot/attackby(obj/item/I, mob/living/user)
- if(hat_offset != INFINITY && user.a_intent == INTENT_HELP && is_type_in_typecache(I, equippable_hats))
- if(!(I.slot_flags & ITEM_SLOT_HEAD))
- to_chat(user, "You can't quite fit [I] onto [src]'s head.")
- return
+ if(I.slot_flags & ITEM_SLOT_HEAD && hat_offset != INFINITY && user.a_intent == INTENT_HELP && !is_type_in_typecache(I, blacklisted_hats))
to_chat(user, "You begin to place [I] on [src]'s head...")
to_chat(src, "[user] is placing [I] on your head...")
if(do_after(user, 30, target = src))
@@ -181,4 +178,4 @@
. = ..()
updatehealth()
if(prob(75) && Proj.damage > 0)
- spark_system.start()
+ spark_system.start()
\ No newline at end of file