Replaces borg hat whitelist with a blacklist, making most hats wearable by borgs (#44203)

* HATS

HATS

* fixes a pretty bad oversight

* AppVeyor pls

* update
This commit is contained in:
zxaber
2019-06-04 23:44:20 -07:00
committed by ShizCalev
parent e8b175e1b7
commit fbc76852d0
2 changed files with 9 additions and 26 deletions
+7 -21
View File
@@ -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)
@@ -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, "<span class='warning'>You can't quite fit [I] onto [src]'s head.</span>")
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, "<span class='notice'>You begin to place [I] on [src]'s head...</span>")
to_chat(src, "<span class='notice'>[user] is placing [I] on your head...</span>")
if(do_after(user, 30, target = src))
@@ -181,4 +178,4 @@
. = ..()
updatehealth()
if(prob(75) && Proj.damage > 0)
spark_system.start()
spark_system.start()