/obj/item/implant/traitor
name = "Mindslave Implant"
desc = "Divide and Conquer"
origin_tech = "programming=5;biotech=5;syndicate=8"
activated = FALSE
/obj/item/implant/traitor/get_data()
var/dat = {"Implant Specifications:
Name: Mind-Slave Implant
Life: ???
Important Notes: Any humanoid injected with this implant will become loyal to the injector, unless of course the host is already loyal to someone else.
Implant Details:
Function: Contains a small pod of nanobots that manipulate the host's mental functions.
Special Features: Diplomacy was never so easy.
Integrity: Implant will last so long as the nanobots are inside the bloodstream."}
return dat
/obj/item/implant/traitor/implant(mob/living/carbon/human/mindslave_target, mob/living/carbon/human/user)
// Check `activated` here so you can't just keep taking it out and putting it back into other people.
if(!..() || activated || !istype(mindslave_target) || !istype(user)) // Both the target and the user need to be human.
return FALSE
// If the target is catatonic or doesn't have a mind, return.
if(!mindslave_target.mind)
to_chat(user, "This person doesn't have a mind for you to slave!")
return FALSE
// Fails if they're already a mindslave of someone, or if they're mindshielded.
if(ismindslave(mindslave_target) || ismindshielded(mindslave_target))
mindslave_target.visible_message(
"[mindslave_target] seems to resist the implant!", \
"You feel a strange sensation in your head that quickly dissipates.")
removed(mindslave_target)
qdel(src)
return FALSE
// Mindslaving yourself.
if(mindslave_target == user)
to_chat(user, "Making yourself loyal to yourself was a great idea! Perhaps even the best idea ever! Actually, you just feel like an idiot.")
user.adjustBrainLoss(20)
removed(mindslave_target)
qdel(src)
return FALSE
// Create a new mindslave datum for the target with the user as their master.
mindslave_target.mind.add_antag_datum(new /datum/antagonist/mindslave(user.mind))
log_admin("[key_name_admin(user)] has mind-slaved [key_name_admin(mindslave_target)].")
return TRUE
/obj/item/implant/traitor/removed(mob/target)
if(..())
target.mind.remove_antag_datum(/datum/antagonist/mindslave)
return TRUE
return FALSE