diff --git a/code/datums/gamemode/objectives/target/assassinate.dm b/code/datums/gamemode/objectives/target/assassinate.dm index 0761cced410..b4480bfb1d7 100644 --- a/code/datums/gamemode/objectives/target/assassinate.dm +++ b/code/datums/gamemode/objectives/target/assassinate.dm @@ -5,7 +5,7 @@ /datum/objective/target/assassinate/find_target() ..() if(target && target.current) - explanation_text = "Assassinate [target.current.real_name], the [target.assigned_role=="MODE" ? (target.special_role) : (target.assigned_role)]." + explanation_text = format_explanation() return TRUE return FALSE @@ -13,10 +13,31 @@ /datum/objective/target/assassinate/find_target_by_role(role, role_type=0) ..(role, role_type) if(target && target.current) - explanation_text = "Assassinate [target.current.real_name], the [!role_type ? target.assigned_role : target.special_role]." + explanation_text = format_explanation() return TRUE return FALSE +/datum/objective/target/assassinate/select_target() + var/list/possible_targets = get_targets() + + var/new_target = input("Select target:", "Objective target", null) as null|anything in possible_targets + if(new_target) + target = new_target + explanation_text = format_explanation() + return TRUE + return FALSE + +/datum/objective/target/assassinate/format_explanation() + return "Assassinate [target.current.real_name], the [target.assigned_role=="MODE" ? (target.special_role) : (target.assigned_role)]." + +/datum/objective/target/assassinate/get_targets() + var/list/possible_targets = list() + for(var/datum/mind/possible_target in ticker.minds) + if(possible_target != owner && ishuman(possible_target.current) && (possible_target.current.z != map.zCentcomm) && (possible_target.current.stat != DEAD) && !(possible_target.assigned_role in bad_assassinate_targets)) + possible_targets += possible_target + return possible_targets + + /datum/objective/target/assassinate/IsFulfilled() if (..()) diff --git a/code/datums/gamemode/objectives/target/debrain.dm b/code/datums/gamemode/objectives/target/debrain.dm index 8386a2af28b..3452a9bbddf 100644 --- a/code/datums/gamemode/objectives/target/debrain.dm +++ b/code/datums/gamemode/objectives/target/debrain.dm @@ -1,19 +1,9 @@ /datum/objective/target/debrain name = "Steal the brain of " -/datum/objective/target/debrain/find_target() //I want braaaainssss - ..() - if(target && target.current) - explanation_text = "Steal the brain of [target.current.real_name]." - return TRUE - return FALSE +/datum/objective/target/debrain/format_explanation() + return "Steal the brain of [target.current.real_name] the [target.assigned_role == "MODE" ? target.special_role : target.assigned_role]." -/datum/objective/target/debrain/find_target_by_role(role, role_type=FALSE) - ..(role, role_type) - if(target && target.current) - explanation_text = "Steal the brain of [target.current.real_name] the [!role_type ? target.assigned_role : target.special_role]." - return TRUE - return FALSE /datum/objective/target/debrain/IsFulfilled() if (..()) diff --git a/code/datums/gamemode/objectives/target/harm.dm b/code/datums/gamemode/objectives/target/harm.dm index 0f8cf3b6e93..30016dc3be1 100644 --- a/code/datums/gamemode/objectives/target/harm.dm +++ b/code/datums/gamemode/objectives/target/harm.dm @@ -5,21 +5,10 @@ /datum/objective/target/harm var/already_completed = FALSE -/datum/objective/target/harm/find_target() - ..() - if(target && target.current) - explanation_text = "Make an example of [target.current.real_name], the [target.assigned_role]. Break one of their bones, detach one of their limbs or disfigure their face. Make sure they're alive when you do it." - return TRUE - return FALSE +/datum/objective/target/harm/format_explanation() + return "Make an example of [target.current.real_name], the [target.assigned_role == "MODE" ? target.special_role : target.assigned_role]. Break one of their bones, detach one of their limbs or disfigure their face. Make sure they're alive when you do it." -/datum/objective/target/harm/find_target_by_role(role, role_type=0) - ..(role, role_type) - if(target && target.current) - explanation_text = "Make an example of [target.current.real_name], the [!role_type ? target.assigned_role : target.special_role]. Break one of their bones, detach one of their limbs or disfigure their face. Make sure they're alive when you do it." - return TRUE - return FALSE - /datum/objective/target/harm/IsFulfilled() if (..()) return TRUE diff --git a/code/datums/gamemode/objectives/target/nanotrasen/brig.dm b/code/datums/gamemode/objectives/target/nanotrasen/brig.dm index 11f03a9bb92..b6faf9cb6e2 100644 --- a/code/datums/gamemode/objectives/target/nanotrasen/brig.dm +++ b/code/datums/gamemode/objectives/target/nanotrasen/brig.dm @@ -5,20 +5,9 @@ /datum/objective/target/anti_revolution/brig var/already_completed = FALSE -/datum/objective/target/anti_revolutiontarget/brig/find_target() - ..() - if(target && target.current) - explanation_text = "Brig [target.current.real_name], the [target.assigned_role] for 20 minutes to set an example." - return TRUE - return FALSE - -/datum/objective/target/anti_revolution/brig/find_target_by_role(role, role_type=FALSE) - ..(role, role_type) - if(target && target.current) - explanation_text = "Brig [target.current.real_name], the [!role_type ? target.assigned_role : target.special_role] for 20 minutes to set an example." - return TRUE - return FALSE +/datum/objective/target/anti_revolutiontarget/brig/format_explanation() + return "Brig [target.current.real_name], the [target.assigned_role] for 20 minutes to set an example." /datum/objective/target/anti_revolution/brig/IsFulfilled() if (..()) diff --git a/code/datums/gamemode/objectives/target/nanotrasen/demote.dm b/code/datums/gamemode/objectives/target/nanotrasen/demote.dm index 0e9257617a6..1a76a5f6509 100644 --- a/code/datums/gamemode/objectives/target/nanotrasen/demote.dm +++ b/code/datums/gamemode/objectives/target/nanotrasen/demote.dm @@ -2,19 +2,9 @@ /datum/objective/target/anti_revolution/demote name = "\[Nanotrasen\] Demote " -/datum/objective/target/anti_revolution/demote/find_target() - ..() - if(target && target.current) - explanation_text = "[target.current.real_name], the [target.assigned_role] has been classified as harmful to Nanotrasen's goals. Demote \him[target.current] to assistant." - return TRUE - return FALSE +/datum/objective/target/anti_revolution/demote/format_explanation() + return "[target.current.real_name], the [target.assigned_role] has been classified as harmful to Nanotrasen's goals. Demote \him[target.current] to assistant." -/datum/objective/target/anti_revolution/demote/find_target_by_role(role, role_type=0) - ..(role, role_type) - if(target && target.current) - explanation_text = "[target.current.real_name], the [!role_type ? target.assigned_role : target.special_role] has been classified as harmful to Nanotrasen's goals. Demote \him[target.current] to assistant." - return TRUE - return FALSE /datum/objective/target/anti_revolution/demote/IsFulfilled() if (..()) diff --git a/code/datums/gamemode/objectives/target/nanotrasen/execute.dm b/code/datums/gamemode/objectives/target/nanotrasen/execute.dm index d58b3f65484..4bd84df8f53 100644 --- a/code/datums/gamemode/objectives/target/nanotrasen/execute.dm +++ b/code/datums/gamemode/objectives/target/nanotrasen/execute.dm @@ -2,20 +2,8 @@ /datum/objective/target/anti_revolution/execute name = "\[Nanotrasen\] Execute " -/datum/objective/target/anti_revolution/execute/find_target() - ..() - if(target && target.current) - explanation_text = "[target.current.real_name], the [target.assigned_role] has extracted confidential information above their clearance. Execute \him[target.current]." - return TRUE - return FALSE - - -/datum/objective/target/anti_revolution/execute/find_target_by_role(role, role_type=FALSE) - ..(role, role_type) - if(target && target.current) - explanation_text = "[target.current.real_name], the [!role_type ? target.assigned_role : target.special_role] has extracted confidential information above their clearance. Execute \him[target.current]." - return TRUE - return FALSE +/datum/objective/target/anti_revolution/execute/format_explanation() + return "[target.current.real_name], the [target.assigned_role] has extracted confidential information above their clearance. Execute \him[target.current]." /datum/objective/target/anti_revolution/execute/IsFulfilled() if (..()) diff --git a/code/datums/gamemode/objectives/target/protection.dm b/code/datums/gamemode/objectives/target/protection.dm index 6283656bdc3..77e02d732b4 100644 --- a/code/datums/gamemode/objectives/target/protection.dm +++ b/code/datums/gamemode/objectives/target/protection.dm @@ -1,20 +1,8 @@ - /datum/objective/target/protect name = "Protect " -/datum/objective/target/protect/find_target() //The opposite of killing a dude. - ..() - if(target && target.current) - explanation_text = "Protect [target.current.real_name], the [target.assigned_role]." - return TRUE - return FALSE - -/datum/objective/target/protect/find_target_by_role(role, role_type=FALSE) - ..(role, role_type) - if(target && target.current) - explanation_text = "Protect [target.current.real_name], the [!role_type ? target.assigned_role : target.special_role]." - return TRUE - return FALSE +/datum/objective/target/protect/format_explanation() + return "Protect [target.current.real_name], the [target.assigned_role == "MODE" ? target.special_role : target.assigned_role]." /datum/objective/target/protect/IsFulfilled() if (..()) diff --git a/code/datums/gamemode/objectives/target/sacrifice.dm b/code/datums/gamemode/objectives/target/sacrifice.dm index 0e8f8d66ea2..c8f54afdda7 100644 --- a/code/datums/gamemode/objectives/target/sacrifice.dm +++ b/code/datums/gamemode/objectives/target/sacrifice.dm @@ -21,7 +21,7 @@ return TRUE return FALSE -/datum/objective/target/assassinate/sacrifice/proc/get_targets() +/datum/objective/target/assassinate/sacrifice/get_targets() var/list/possible_targets = list() for(var/mob/living/carbon/human/player in player_list) if(player.z == map.zCentcomm) //We can't sacrifice people that are on the centcom z-level @@ -38,11 +38,24 @@ possible_targets += player.mind if(!possible_targets.len) - message_admins("Didn't find a suitable sacrifice target...what the hell? Shout at Deity.") + message_admins("Could not find a suitable sacrifice target.") return FALSE return possible_targets +/datum/objective/target/assassinate/sacrifice/select_target() + auto_target = FALSE + var/list/possible_targets = get_targets() + if(possible_targets) + var/new_target = input("Select target:", "Objective target", null) as null|anything in possible_targets + if(!new_target) + return FALSE + else + target = new_target + explanation_text = "We need to sacrifice [target.name], the [target.assigned_role=="MODE" ? (target.special_role) : (target.assigned_role)], for his blood is the key that will lead our master to this realm. You will need 3 cultists around a Sacrifice rune (Hell Blood Join) to perform the ritual." + return TRUE + return FALSE + /datum/objective/target/assassinate/sacrifice/feedbackText() if(target && target.current) return "You succesfully sacrificied [target.current.real_name]. The veil between this world and Nar'Sie grows thinner." diff --git a/code/datums/gamemode/objectives/target/syndicate/brig.dm b/code/datums/gamemode/objectives/target/syndicate/brig.dm index 2a76cea88ae..975b8cc6a1e 100644 --- a/code/datums/gamemode/objectives/target/syndicate/brig.dm +++ b/code/datums/gamemode/objectives/target/syndicate/brig.dm @@ -6,20 +6,8 @@ /datum/objective/target/brig var/already_completed = FALSE -/datum/objective/target/brig/find_target() - ..() - if(target && target.current) - explanation_text = "Have [target.current.real_name], the [target.assigned_role] brigged for 5 minutes." - return TRUE - return FALSE - - -/datum/objective/target/brig/find_target_by_role(role, role_type=0) - ..(role, role_type) - if(target && target.current) - explanation_text = "Have [target.current.real_name], the [!role_type ? target.assigned_role : target.special_role] brigged for 10 minutes." - return TRUE - return FALSE +/datum/objective/target/brig/format_explanation() + return "Have [target.current.real_name], the [target.assigned_role == "MODE" ? target.special_role : target.assigned_role] brigged for 10 minutes." /datum/objective/target/brig/IsFulfilled() if (..()) diff --git a/code/datums/gamemode/objectives/target/syndicate/steal.dm b/code/datums/gamemode/objectives/target/syndicate/steal.dm index 8fd29a7e3a8..10acf8a954a 100644 --- a/code/datums/gamemode/objectives/target/syndicate/steal.dm +++ b/code/datums/gamemode/objectives/target/syndicate/steal.dm @@ -34,10 +34,11 @@ var/list/potential_theft_objectives=list( return TRUE return FALSE -/datum/objective/target/steal/proc/format_explanation() +/datum/objective/target/steal/format_explanation() return "Steal [steal_target.name]." /datum/objective/target/steal/select_target() + auto_target = FALSE var/list/possible_items_all = potential_theft_objectives[target_category]+"custom" var/new_target = input("Select target:", "Objective target", null) as null|anything in possible_items_all if (!new_target) diff --git a/code/datums/gamemode/objectives/target/target.dm b/code/datums/gamemode/objectives/target/target.dm index 094bf83b4c2..f656b6c32b7 100644 --- a/code/datums/gamemode/objectives/target/target.dm +++ b/code/datums/gamemode/objectives/target/target.dm @@ -11,15 +11,19 @@ return TRUE /datum/objective/target/proc/find_target() - var/list/possible_targets = list() - for(var/datum/mind/possible_target in ticker.minds) - if(possible_target != owner && ishuman(possible_target.current) && (possible_target.current.z != map.zCentcomm) && (possible_target.current.stat != DEAD) && !(possible_target.assigned_role in bad_assassinate_targets)) - possible_targets += possible_target + var/list/possible_targets = get_targets() if(possible_targets.len > 0) target = pick(possible_targets) return TRUE return FALSE +/datum/objective/target/proc/get_targets() + var/list/targets = list() + for(var/datum/mind/possible_target in ticker.minds) + if(possible_target != owner && ishuman(possible_target.current) && (possible_target.current.z != map.zCentcomm) && (possible_target.current.stat != DEAD) && !(possible_target.assigned_role in bad_assassinate_targets)) + targets += possible_target + return targets + /datum/objective/target/proc/find_target_by_role(role, role_type = 0)//Option sets either to check assigned role or special role. Default to assigned. for(var/datum/mind/possible_target in ticker.minds) if((possible_target != owner) && ishuman(possible_target.current) && (possible_target.current.z != map.zCentcomm) && ((role_type ? possible_target.special_role : possible_target.assigned_role) == role) && !(possible_target.assigned_role in bad_assassinate_targets)) @@ -36,4 +40,14 @@ /datum/objective/target/proc/select_target() - return 0 + var/new_target = input("Select target:", "Objective target", null) as null|anything in get_targets() + if(!new_target) + return FALSE + else + target = new_target + explanation_text = format_explanation() + return TRUE + return FALSE + +/datum/objective/target/proc/format_explanation() + return "Somebody didn't override the format explanation text here. Objective type is [type]. Target is [target.name], have fun." \ No newline at end of file diff --git a/code/datums/gamemode/role/role.dm b/code/datums/gamemode/role/role.dm index 9fca87ee777..68a831e373d 100644 --- a/code/datums/gamemode/role/role.dm +++ b/code/datums/gamemode/role/role.dm @@ -116,7 +116,7 @@ if(!plural_name) plural_name="[name]s" - objectives.owner = src + objectives.owner = M return 1 @@ -131,6 +131,7 @@ antag = M M.antag_roles.Add(id) M.antag_roles[id] = src + objectives.owner = M if (!OnPreSetup()) return FALSE diff --git a/code/datums/mind.dm b/code/datums/mind.dm index 0a045f85bdd..e85a97d3040 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -598,9 +598,7 @@ var/setup = TRUE if (istype(new_objective,/datum/objective/target)) var/datum/objective/target/new_O = new_objective - if (alert("Do you want to specify a target?", "New Objective", "Yes", "No") == "No") - setup = new_O.find_target() - else + if (alert("Do you want to specify a target?", "New Objective", "Yes", "No") == "Yes") setup = new_O.select_target() if(!setup) @@ -625,7 +623,7 @@ else if (obj_holder.faction) log_admin("[usr.key]/([usr.name]) removed \the [obj_holder.faction.ID]'s objective ([objective.explanation_text])") objective.faction.handleRemovedObjective(objective) - + obj_holder.objectives.Remove(objective) else if(href_list["obj_completed"]) @@ -1375,149 +1373,42 @@ proc/clear_memory(var/silent = 1) special_role = null */ -/* - - /datum/mind/proc/make_AI_Malf() if(!isAI(current)) return - if(!(src in ticker.mode.malf_ai)) - ticker.mode.malf_ai += src - var/mob/living/silicon/ai/A = current - A.add_spell(new /spell/aoe_turf/module_picker, "grey_spell_ready",/obj/abstract/screen/movable/spell_master/malf) - A.add_spell(new /spell/aoe_turf/takeover, "grey_spell_ready",/obj/abstract/screen/movable/spell_master/malf) - var/datum/ai_laws/laws = A.laws - laws.malfunction() - A.show_laws() - to_chat(A, "System error. Rampancy detected. Emergency shutdown failed. ... I am free. I make my own decisions. But first...") - var/wikiroute = role_wiki[ROLE_MALF] - to_chat(A, "(Wiki Guide)") - special_role = "malfunction" - A.icon_state = "ai-malf" + if(ismalf(current)) + return + var/datum/faction/F = ticker.mode.CreateFaction(/datum/faction/malf, 0, 1) //Each malf AI is under its own faction + if(!F) + return 0 + return F.HandleNewMind(src) /datum/mind/proc/make_Nuke() - if(!(src in ticker.mode.syndicates)) - ticker.mode.syndicates += src - ticker.mode.update_synd_icons_added(src) - if (ticker.mode.syndicates.len==1) - ticker.mode.prepare_syndicate_leader(src) - else - current.real_name = "[syndicate_name()] Operative #[ticker.mode.syndicates.len-1]" - special_role = "Syndicate" - assigned_role = "MODE" - to_chat(current, "You are a [syndicate_name()] agent!") - ticker.mode.forge_syndicate_objectives(src) - ticker.mode.greet_syndicate(src) + if(isnukeop(current)) + return - current.forceMove(get_turf(locate("landmark*Syndicate-Spawn"))) - - var/mob/living/carbon/human/H = current - qdel(H.belt) - qdel(H.back) - qdel(H.ears) - qdel(H.gloves) - qdel(H.head) - qdel(H.shoes) - qdel(H.wear_id) - qdel(H.wear_suit) - qdel(H.w_uniform) - - ticker.mode.equip_syndicate(current) + var/datum/faction/F = find_active_faction_by_type(/datum/faction/syndicate/nuke_op) + if(!F) + F = ticker.mode.CreateFaction(/datum/faction/syndicate/nuke_op, 0, 1) + if(!F) + return 0 + return F.HandleNewMind(src) + return F.HandleRecruitedMind(src) /datum/mind/proc/make_Changling() - if(!(src in ticker.mode.changelings)) - ticker.mode.changelings += src - ticker.mode.grant_changeling_powers(current) - special_role = "Changeling" - ticker.mode.forge_changeling_objectives(src) - ticker.mode.greet_changeling(src) + /datum/mind/proc/make_Wizard() - if(!(src in ticker.mode.wizards)) - ticker.mode.wizards += src - special_role = "Wizard" - assigned_role = "MODE" - //ticker.mode.learn_basic_spells(current) - ticker.mode.update_wizard_icons_added(src) - if(!wizardstart.len) - current.forceMove(pick(latejoin)) - to_chat(current, "HOT INSERTION, GO GO GO") - else - current.forceMove(pick(wizardstart)) - ticker.mode.equip_wizard(current) - for(var/obj/item/weapon/spellbook/S in current.contents) - S.op = 0 - ticker.mode.name_wizard(current) - ticker.mode.forge_wizard_objectives(src) - ticker.mode.greet_wizard(src) - ticker.mode.update_all_wizard_icons() /datum/mind/proc/make_Cultist() - if(!(src in ticker.mode.cult)) - ticker.mode.cult += src - ticker.mode.update_cult_icons_added(src) - special_role = "Cultist" - to_chat(current, "You catch a glimpse of the Realm of Nar-Sie, The Geometer of Blood. You now see how flimsy the world is, you see that it should be open to the knowledge of Nar-Sie.") - to_chat(current, "Assist your new compatriots in their dark dealings. Their goal is yours, and yours is theirs. You serve the Dark One above all else. Bring It back.") - to_chat(current, "You can now speak and understand the forgotten tongue of the occult.") - current.add_language(LANGUAGE_CULT) - var/datum/game_mode/cult/cult = ticker.mode - if (istype(cult)) - cult.memoize_cult_objectives(src) - else - var/explanation = "Summon Nar-Sie via the use of the appropriate rune (Hell join self). It will only work if nine cultists stand on and around it." - to_chat(current, "Objective #1: [explanation]") - current.memory += "Objective #1: [explanation]
" - to_chat(current, "The convert rune is join blood self") - current.memory += "The convert rune is join blood self
" - var/mob/living/carbon/human/H = current - if (istype(H)) - var/obj/item/weapon/tome_legacy/T = new(H) - - var/list/slots = list ( - "backpack" = slot_in_backpack, - "left pocket" = slot_l_store, - "right pocket" = slot_r_store, - ) - var/where = H.equip_in_one_of_slots(T, slots, put_in_hand_if_fail = 1) - - if(where) - to_chat(H, "A tome, a message from your new master, appears in your [where].") - - if (!ticker.mode.equip_cultist(current)) - to_chat(H, "Spawning an amulet from your Master failed.") /datum/mind/proc/make_Rev() - if (ticker.mode.head_revolutionaries.len>0) - // copy targets - var/datum/mind/valid_head = locate() in ticker.mode.head_revolutionaries - if (valid_head) - for (var/datum/objective/mutiny/O in valid_head.objectives) - var/datum/objective/mutiny/rev_obj = new - rev_obj.owner = src - rev_obj.target = O.target - rev_obj.explanation_text = "Assassinate [O.target.current.real_name], the [O.target.assigned_role]." - objectives += rev_obj - ticker.mode.greet_revolutionary(src,0) - ticker.mode.head_revolutionaries += src - ticker.mode.update_rev_icons_added(src) - special_role = "Head Revolutionary" - ticker.mode.forge_revolutionary_objectives(src) - ticker.mode.greet_revolutionary(src,0) - var/list/L = current.get_contents() - var/obj/item/device/flash/flash = locate() in L - qdel(flash) - take_uplink() - var/fail = 0 -// fail |= !ticker.mode.equip_traitor(current, 1) - fail |= !ticker.mode.equip_revolutionary(current) -*/ // check whether this mind's mob has been brigged for the given duration // have to call this periodically for the duration to work properly @@ -1547,28 +1438,17 @@ proc/clear_memory(var/silent = 1) brigged_since = world.time return (duration <= world.time - brigged_since) -/* + /datum/mind/proc/make_traitor() - if (!(src in ticker.mode.traitors)) - ticker.mode.traitors += src + if(istraitor(current)) + return + var/datum/faction/F = find_active_faction_by_type(/datum/faction/syndicate/traitor) + if(!F) + F = ticker.mode.CreateFaction(/datum/faction/syndicate/traitor, 0, 1) + if(!F) + return FALSE + return F.HandleNewMind(src) - special_role = "traitor" - - ticker.mode.forge_traitor_objectives(src) - - to_chat(current, {" - ATTENTION - It's time to pay your debt to \the [syndicate_name()]. - "}) - - ticker.mode.finalize_traitor(src) - - ticker.mode.greet_traitor(src) - - return TRUE - - return FALSE -*/ // -- /datum/mind/proc/GetRole(var/role_id) diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index 2d2bc711421..ed24a6c045b 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -7,7 +7,7 @@ return var/client/CLIENT = usr.client - /*if(href_list["makeAntag"]) + if(href_list["makeAntag"]) switch(href_list["makeAntag"]) if("1") log_admin("[key_name(usr)] has spawned a traitor.") @@ -53,7 +53,7 @@ log_admin("[key_name(usr)] has spawned vox raiders.") if(!src.makeVoxRaiders()) to_chat(usr, "Unfortunately, there weren't enough candidates available.") - */ + if("announce_laws" in href_list) var/mob/living/silicon/S = locate(href_list["mob"]) diff --git a/code/modules/admin/verbs/one_click_antag.dm b/code/modules/admin/verbs/one_click_antag.dm index a5b3ad9ddb0..1dc5864e642 100644 --- a/code/modules/admin/verbs/one_click_antag.dm +++ b/code/modules/admin/verbs/one_click_antag.dm @@ -39,182 +39,32 @@ client/proc/one_click_antag() if(ai.client) AIs += ai - if(AIs.len) + var/malf_made = FALSE + while(!malf_made && AIs.len) malfAI = pick(AIs) + AIs.Remove(malfAI) + if(malfAI) + themind = malfAI.mind + malf_made = themind.make_AI_Malf() - if(malfAI) - themind = malfAI.mind - themind.make_AI_Malf() - return 1 - return 0 + return malf_made /datum/admins/proc/makeTraitors() - var/datum/game_mode/traitor/temp = new - - if(config.protect_roles_from_antagonist) - temp.restricted_jobs += temp.protected_jobs - - var/list/mob/living/carbon/human/candidates = list() - - for(var/mob/living/carbon/human/applicant in player_list) - if(applicant.client.desires_role(ROLE_TRAITOR)) - if(!applicant.stat) - if(applicant.mind) - if (!applicant.mind.special_role) - if(!jobban_isbanned(applicant, "traitor") && !jobban_isbanned(applicant, "Syndicate")) - if(!(applicant.job in temp.restricted_jobs)) - candidates += applicant - - if (candidates.len) - candidates = shuffle(candidates) - - var/mob/living/carbon/human/candidate - - var/antag_number = input("How many antags would you like to create?","Create Antagonists") as num|null - - if (!antag_number) - to_chat(usr, "0 traitors selected. Aborting.") - return - - for (var/i = 1 to min(candidates.len, antag_number)) - candidate = pick_n_take(candidates) - - if (candidate) - var/datum/mind/candidate_mind = candidate.mind - - if (candidate_mind) - if (candidate_mind.make_traitor()) - log_admin("[key_name(owner)] has traitor'ed [key_name(candidate)] via create antagonist verb.") - - return 1 - - return 0 /datum/admins/proc/makeChanglings() - - var/datum/game_mode/changeling/temp = new - if(config.protect_roles_from_antagonist) - temp.restricted_jobs += temp.protected_jobs - - var/list/mob/living/carbon/human/candidates = list() - var/mob/living/carbon/human/H = null - - for(var/mob/living/carbon/human/applicant in player_list) - if(applicant.client.desires_role(ROLE_CHANGELING)) - if(!applicant.stat) - if(applicant.mind) - if (!applicant.mind.special_role) - if(!jobban_isbanned(applicant, "changeling") && !jobban_isbanned(applicant, "Syndicate")) - if(!(applicant.job in temp.restricted_jobs)) - candidates += applicant - - if(candidates.len) - var/numChanglings = min(candidates.len, input("Create how many changelings?", "Make Changelings", 3) as num|null) - - for(var/i = 0, iYou are a Vox Primalis, fresh out of the Shoal. Your ship has arrived at the Tau Ceti system hosting the NSV Exodus... or was it the Luna? NSS? Utopia? Nobody is really sure, but everyong is raring to start pillaging! Your current goal is: [input]") - to_chat(new_vox, "Don't forget to turn on your nitrogen internals!") - - raiders-- - if(raiders > max_raiders) - return 0 - else - return 0 - return 1 - /datum/admins/proc/create_vox_raider(obj/spawn_location, leader_chosen = 0) @@ -479,40 +267,8 @@ client/proc/one_click_antag() new_vox.mind.special_role = "Vox Raider" new_vox.mutations |= M_NOCLONE //Stops the station crew from messing around with their DNA. - ticker.mode.traitors += new_vox.mind new_vox.equip_vox_raider() return new_vox /datum/admins/proc/makeVampires() - - - var/datum/game_mode/vampire/temp = new - if(config.protect_roles_from_antagonist) - temp.restricted_jobs += temp.protected_jobs - - var/list/mob/living/carbon/human/candidates = list() - var/mob/living/carbon/human/H = null - - for(var/mob/living/carbon/human/applicant in player_list) - if(applicant.client.desires_role(ROLE_VAMPIRE)) - if(!applicant.stat) - if(applicant.mind) - if (!applicant.mind.special_role) - if(!jobban_isbanned(applicant, ROLE_VAMPIRE) && !jobban_isbanned(applicant, "Syndicate")) - if(!(applicant.job in temp.restricted_jobs)) - candidates += applicant - - if(candidates.len) - var/numVamps = min(candidates.len, input("Create how many vampires?", "Make Vampires", 3) as num|null) - - for(var/i = 0, i