diff --git a/code/modules/antagonists/abductor/equipment/abduction_gear.dm b/code/modules/antagonists/abductor/equipment/abduction_gear.dm
index ac657e9491..a7d7e0b6eb 100644
--- a/code/modules/antagonists/abductor/equipment/abduction_gear.dm
+++ b/code/modules/antagonists/abductor/equipment/abduction_gear.dm
@@ -339,9 +339,12 @@
if(QDELETED(G))
return
- if(C.anti_magic_check(FALSE, FALSE, TRUE, 0))
- to_chat(user, "Your target seems to have some sort of tinfoil protection on, blocking the message from being sent!")
- return
+ if (istype(C.get_item_by_slot(SLOT_HEAD), /obj/item/clothing/head/foilhat))
+ var/obj/item/clothing/head/foilhat/F = C.get_item_by_slot(SLOT_HEAD)
+
+ if(!F.warped)
+ to_chat(user, "Your target seems to have some sort of tinfoil protection on, blocking the message from being sent!")
+ return
G.mind_control(command, user)
to_chat(user, "You send the command to your target.")
@@ -525,24 +528,30 @@ Congratulations! You are now trained for invasive xenobiology research!"}
log_combat(user, L, "stunned")
/obj/item/abductor/baton/proc/SleepAttack(mob/living/L,mob/living/user)
+ var/obj/item/clothing/head/foilhat/F = null
+ if (istype(L.get_item_by_slot(SLOT_HEAD), /obj/item/clothing/head/foilhat))
+ F = L.get_item_by_slot(SLOT_HEAD)
if(L.incapacitated(TRUE, TRUE))
- if(L.anti_magic_check(FALSE, FALSE, TRUE))
- to_chat(user, "The specimen's tinfoil protection is interfering with the sleep inducement!")
- L.visible_message("[user] tried to induced sleep in [L] with [src], but [L.p_their()] tinfoil protection [L.p_them()]!", \
- "You feel a strange wave of heavy drowsiness wash over you, but your tinfoil protection deflects most of it!")
- L.drowsyness += 2
- return
+ if (F)
+ if(!F.warped)
+ F.take_hit()
+ to_chat(user, "The specimen's tinfoil protection is interfering with the sleep inducement!")
+ L.visible_message("[user] tried to induced sleep in [L] with [src], but [L.p_their()] tinfoil protection [L.p_them()]!", \
+ "You feel a strange wave of heavy drowsiness wash over you, but your tinfoil protection deflects most of it!")
+ L.drowsyness += 2
+ return
L.visible_message("[user] has induced sleep in [L] with [src]!", \
"You suddenly feel very drowsy!")
playsound(src, 'sound/weapons/egloves.ogg', 50, TRUE, -1)
L.Sleeping(1200)
log_combat(user, L, "put to sleep")
else
- if(L.anti_magic_check(FALSE, FALSE, TRUE, 0))
- to_chat(user, "The specimen's tinfoil protection is completely blocking our sleep inducement methods!")
- L.visible_message("[user] tried to induce sleep in [L] with [src], but [L.p_their()] tinfoil protection completely protected [L.p_them()]!", \
- "Any sense of drowsiness is quickly diminished as your tinfoil protection deflects the effects!")
- return
+ if (F)
+ if(!F.warped)
+ to_chat(user, "The specimen's tinfoil protection is completely blocking our sleep inducement methods!")
+ L.visible_message("[user] tried to induce sleep in [L] with [src], but [L.p_their()] tinfoil protection completely protected [L.p_them()]!", \
+ "Any sense of drowsiness is quickly diminished as your tinfoil protection deflects the effects!")
+ return
L.drowsyness += 1
to_chat(user, "Sleep inducement works fully only on stunned specimens! ")
L.visible_message("[user] tried to induce sleep in [L] with [src]!", \
diff --git a/code/modules/clothing/head/misc_special.dm b/code/modules/clothing/head/misc_special.dm
index 9417f61f39..fcf90dd1e6 100644
--- a/code/modules/clothing/head/misc_special.dm
+++ b/code/modules/clothing/head/misc_special.dm
@@ -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."