kinda a dumb workaround

This commit is contained in:
Linzolle
2019-10-24 13:57:00 -05:00
parent deaf1a0e00
commit 507e9b7aa0
2 changed files with 34 additions and 17 deletions
+11 -3
View File
@@ -239,12 +239,13 @@
equip_delay_other = 140
var/datum/brain_trauma/mild/phobia/paranoia
var/warped = FALSE
var/charges = 6
/obj/item/clothing/head/foilhat/Initialize(mapload)
. = ..()
if(!warped)
AddComponent(/datum/component/anti_magic, FALSE, FALSE, TRUE, ITEM_SLOT_HEAD, 6, TRUE, null, CALLBACK(src, .proc/warp_up))
else
if(warped) // originally !warped
//AddComponent(/datum/component/anti_magic, FALSE, FALSE, TRUE, ITEM_SLOT_HEAD, 6, TRUE, null, CALLBACK(src, .proc/warp_up)) //Citadel doesn't have tg's updated antimagic
//else
warp_up()
/obj/item/clothing/head/foilhat/equipped(mob/living/carbon/human/user, slot)
@@ -274,6 +275,13 @@
if(paranoia)
QDEL_NULL(paranoia)
/obj/item/clothing/head/foilhat/proc/take_hit()
if (warped)
return
charges--
if (charges <= 0)
warp_up() // Kind of a weird workaround since Citadel doens't like tg's updates to the antimagic component
/obj/item/clothing/head/foilhat/proc/warp_up()
name = "scorched tinfoil hat"
desc = "A badly warped up hat. Quite unprobable this will still work against any of fictional and contemporary dangers it used to."