Fixes headrevs being able to be mindshielded (#21714)

* VIVAAAAA

* sirryan review
This commit is contained in:
Contrabang
2023-07-24 15:36:42 +01:00
committed by GitHub
parent 4f145b9fe0
commit 2e7c83866c
2 changed files with 23 additions and 1 deletions
@@ -160,7 +160,9 @@
* -1 if the implant fails to inject
* 0 if there's no room for the implant.
*/
/obj/item/implant/proc/implant(mob/source, mob/user)
/obj/item/implant/proc/implant(mob/source, mob/user, force)
if(!force && !can_implant(source, user))
return
var/obj/item/implant/imp_e = locate(type) in source
if(!allow_multiple && imp_e && imp_e != src)
if(imp_e.uses < initial(imp_e.uses)*2)
@@ -200,6 +202,19 @@
return 1
/**
* Check that we can actually implant this before implanting it
* * source - The person being implanted
* * user - The person doing the implanting
*
* Returns
* TRUE - I could care less, implant it, maybe don't. I don't care.
* FALSE - Don't implant!
*/
/obj/item/implant/proc/can_implant(mob/source, mob/user)
return TRUE
/**
* Clean up when an implant is removed.
* * source - the user who the implant was removed from.
@@ -6,6 +6,13 @@
implant_data = /datum/implant_fluff/mindshield
implant_state = "implant-nanotrasen"
/obj/item/implant/mindshield/can_implant(mob/source, mob/user)
if(source.mind in SSticker.mode.head_revolutionaries)
source.visible_message("<span class='biggerdanger'>[source] seems to resist [src]!</span>",
"<span class='warning'>You feel something interfering with your mental conditioning, but you resist it!</span>")
return FALSE
return ..()
/obj/item/implant/mindshield/implant(mob/target)
if(!..())
return FALSE