diff --git a/code/datums/mind.dm b/code/datums/mind.dm index 7adc6a9679..6d57a6808d 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -112,6 +112,7 @@ datum/mind out += "Factions and special roles:
" var/list/sections = list( + "implant", "revolution", "cult", "wizard", @@ -122,19 +123,23 @@ datum/mind "malfunction", ) var/text = "" - + var/mob/living/carbon/human/H = current if (istype(current, /mob/living/carbon/human) || istype(current, /mob/living/carbon/monkey)) + /** Impanted**/ + if(H.is_loyalty_implanted(H)) + text = "Loyalty Implant:Remove|Implanted
" + else + text = "Loyalty Implant:No Implant|Implant him!
" + sections["implant"] = text /** REVOLUTION ***/ text = "revolution" if (ticker.mode.config_tag=="revolution") - text = uppertext(text) + text += uppertext(text) text = "[text]: " - if (assigned_role in command_positions) - text += "HEAD|employee|headrev|rev" -// else if (assigned_role in list("Security Officer", "Detective", "Warden")) -// text += "head|OFFICER|employee|headre|rev" + if (H.is_loyalty_implanted(H)) + text += "LOYAL EMPLOYEE|headrev|rev" else if (src in ticker.mode.head_revolutionaries) - text = "head|employee|HEADREV|rev" + text = "employee|HEADREV|rev" text += "
Flash: give" var/list/L = current.get_contents() @@ -151,9 +156,9 @@ datum/mind if (objectives.len==0) text += "
Objectives are empty! Set to kill all heads." else if (src in ticker.mode.revolutionaries) - text += "head|employee|headrev|REV" + text += "employee|headrev|REV" else - text += "head|EMPLOYEE|headrev|rev" + text += "EMPLOYEE|headrev|rev" sections["revolution"] = text /** CULT ***/ @@ -161,19 +166,17 @@ datum/mind if (ticker.mode.config_tag=="cult") text = uppertext(text) text = "[text]: " - if (assigned_role in command_positions) - text += "HEAD|employee|cultist" -// else if (assigned_role in list("Security Officer", "Detective", "Warden")) -// text += "head|OFFICER|employee|cultist" + if (H.is_loyalty_implanted(H)) + text += "LOYAL EMPLOYEE|cultist" else if (src in ticker.mode.cult) - text += "head|employee|CULTIST" + text += "employee|CULTIST" text += "
Give tome|amulet." /* if (objectives.len==0) text += "
Objectives are empty! Set to sacrifice and escape or summon." */ else - text += "head|EMPLOYEE|cultist" + text += "EMPLOYEE|cultist" sections["cult"] = text /** WIZARD ***/ @@ -232,12 +235,16 @@ datum/mind if (ticker.mode.config_tag=="traitor" || ticker.mode.config_tag=="traitorchan") text = uppertext(text) text = "[text]: " - if (src in ticker.mode.traitors) - text += "TRAITOR|loyal" - if (objectives.len==0) - text += "
Objectives are empty! Randomize!" + if(istype(current, /mob/living/carbon/human)) + if (H.is_loyalty_implanted(H)) + text +="traitor|LOYAL EMPLOYEE" else - text += "traitor|LOYAL" + if (src in ticker.mode.traitors) + text += "TRAITOR|Employee" + if (objectives.len==0) + text += "
Objectives are empty! Randomize!" + else + text += "traitor|Employee" sections["traitor"] = text /** MONKEY ***/ @@ -485,6 +492,48 @@ datum/mind if(!istype(objective)) return objective.completed = !objective.completed + else if(href_list["implant"]) + var/mob/living/carbon/human/H = current + switch(href_list["implant"]) + if("remove") + for(var/obj/item/weapon/implant/loyalty/I in H.contents) + for(var/datum/organ/external/organs in H.organs) + if(I in organs.implants) + I.Del() + break + H << "\blue Your loyalty implant has been deactivated." + if("add") + var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H) + L.imp_in = H + L.implanted = 1 + var/datum/organ/external/affected = H.organs_by_name["head"] + affected.implants += L + L.part = affected + + H << "\red You somehow have become the recepient of a loyalty transplant, and it just activated!" + if(src in ticker.mode.revolutionaries) + special_role = null + ticker.mode.revolutionaries -= src + src << "\red The nanobots in the loyalty implant remove all thoughts about being a revolutionary. Get back to work!" + if(src in ticker.mode.head_revolutionaries) + special_role = null + ticker.mode.head_revolutionaries -=src + src << "\red The nanobots in the loyalty implant remove all thoughts about being a revolutionary. Get back to work!" + if(src in ticker.mode.cult) + ticker.mode.cult -= src + ticker.mode.update_cult_icons_removed(src) + special_role = null + var/datum/game_mode/cult/cult = ticker.mode + if (istype(cult)) + cult.memoize_cult_objectives(src) + current << "\red The nanobots in the loyalty implant remove all thoughts about being in a cult. Have a productive day!" + memory = "" + if(src in ticker.mode.traitors) + ticker.mode.traitors -= src + special_role = null + current << "\red The nanobots in the loyalty implant remove all thoughts about being a traitor to Nanotrasen. Have a nice day!" + log_admin("[key_name_admin(usr)] has de-traitor'ed [current].") + else if (href_list["revolution"]) switch(href_list["revolution"]) if("clear") @@ -750,8 +799,8 @@ datum/mind special_role = "traitor" current << "\red You are a traitor!" log_admin("[key_name_admin(usr)] has traitor'ed [current].") - if(isAI(current)) - var/mob/living/silicon/ai/A = current + if(istype(current, /mob/living/silicon)) + var/mob/living/silicon/A = current call(/datum/game_mode/proc/add_law_zero)(A) A.show_laws() diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 361074fdd8..74cab64505 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -296,6 +296,14 @@ if(armor >= 2) return +/mob/living/carbon/human/proc/is_loyalty_implanted(mob/living/carbon/human/M) + for(var/L in M.contents) + if(istype(L, /obj/item/weapon/implant/loyalty)) + for(var/datum/organ/external/O in M.organs) + if(L in O.implants) + return 1 + return 0 + /mob/living/carbon/human/attack_slime(mob/living/carbon/slime/M as mob) if(M.Victim) return // can't attack while eating! @@ -1257,4 +1265,4 @@ mob/living/carbon/human/yank_out_object() if(species) return 1 else - return 0 \ No newline at end of file + return 0