kinda a dumb workaround
This commit is contained in:
@@ -339,9 +339,12 @@
|
||||
if(QDELETED(G))
|
||||
return
|
||||
|
||||
if(C.anti_magic_check(FALSE, FALSE, TRUE, 0))
|
||||
to_chat(user, "<span class='warning'>Your target seems to have some sort of tinfoil protection on, blocking the message from being sent!</span>")
|
||||
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, "<span class='warning'>Your target seems to have some sort of tinfoil protection on, blocking the message from being sent!</span>")
|
||||
return
|
||||
|
||||
G.mind_control(command, user)
|
||||
to_chat(user, "<span class='notice'>You send the command to your target.</span>")
|
||||
@@ -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, "<span class='warning'>The specimen's tinfoil protection is interfering with the sleep inducement!</span>")
|
||||
L.visible_message("<span class='danger'>[user] tried to induced sleep in [L] with [src], but [L.p_their()] tinfoil protection [L.p_them()]!</span>", \
|
||||
"<span class='userdanger'>You feel a strange wave of heavy drowsiness wash over you, but your tinfoil protection deflects most of it!</span>")
|
||||
L.drowsyness += 2
|
||||
return
|
||||
if (F)
|
||||
if(!F.warped)
|
||||
F.take_hit()
|
||||
to_chat(user, "<span class='warning'>The specimen's tinfoil protection is interfering with the sleep inducement!</span>")
|
||||
L.visible_message("<span class='danger'>[user] tried to induced sleep in [L] with [src], but [L.p_their()] tinfoil protection [L.p_them()]!</span>", \
|
||||
"<span class='userdanger'>You feel a strange wave of heavy drowsiness wash over you, but your tinfoil protection deflects most of it!</span>")
|
||||
L.drowsyness += 2
|
||||
return
|
||||
L.visible_message("<span class='danger'>[user] has induced sleep in [L] with [src]!</span>", \
|
||||
"<span class='userdanger'>You suddenly feel very drowsy!</span>")
|
||||
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, "<span class='warning'>The specimen's tinfoil protection is completely blocking our sleep inducement methods!</span>")
|
||||
L.visible_message("<span class='danger'>[user] tried to induce sleep in [L] with [src], but [L.p_their()] tinfoil protection completely protected [L.p_them()]!</span>", \
|
||||
"<span class='userdanger'>Any sense of drowsiness is quickly diminished as your tinfoil protection deflects the effects!</span>")
|
||||
return
|
||||
if (F)
|
||||
if(!F.warped)
|
||||
to_chat(user, "<span class='warning'>The specimen's tinfoil protection is completely blocking our sleep inducement methods!</span>")
|
||||
L.visible_message("<span class='danger'>[user] tried to induce sleep in [L] with [src], but [L.p_their()] tinfoil protection completely protected [L.p_them()]!</span>", \
|
||||
"<span class='userdanger'>Any sense of drowsiness is quickly diminished as your tinfoil protection deflects the effects!</span>")
|
||||
return
|
||||
L.drowsyness += 1
|
||||
to_chat(user, "<span class='warning'>Sleep inducement works fully only on stunned specimens! </span>")
|
||||
L.visible_message("<span class='danger'>[user] tried to induce sleep in [L] with [src]!</span>", \
|
||||
|
||||
@@ -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."
|
||||
|
||||
Reference in New Issue
Block a user