Yet more objective fixes. (#19542)

Target objectives assigned by the role panel now 'work'
This commit is contained in:
MadmanMartian
2018-09-02 13:04:53 +01:00
committed by GitHub
parent 81c83598dc
commit 5ac28253b4
16 changed files with 112 additions and 503 deletions

View File

@@ -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 (..())

View File

@@ -1,19 +1,9 @@
/datum/objective/target/debrain
name = "Steal the brain of <target>"
/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 (..())

View File

@@ -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

View File

@@ -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 (..())

View File

@@ -2,19 +2,9 @@
/datum/objective/target/anti_revolution/demote
name = "\[Nanotrasen\] Demote <target>"
/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 (..())

View File

@@ -2,20 +2,8 @@
/datum/objective/target/anti_revolution/execute
name = "\[Nanotrasen\] Execute <target>"
/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 (..())

View File

@@ -1,20 +1,8 @@
/datum/objective/target/protect
name = "Protect <target>"
/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 (..())

View File

@@ -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 "<span class = 'sinister'>You succesfully sacrificied [target.current.real_name]. The veil between this world and Nar'Sie grows thinner.</span>"

View File

@@ -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 (..())

View File

@@ -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)

View File

@@ -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."

View File

@@ -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

View File

@@ -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, "<b>System error. Rampancy detected. Emergency shutdown failed. ... I am free. I make my own decisions. But first...</b>")
var/wikiroute = role_wiki[ROLE_MALF]
to_chat(A, "<span class='info'><a HREF='?src=\ref[A];getwiki=[wikiroute]'>(Wiki Guide)</a></span>")
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, "<span class='notice'>You are a [syndicate_name()] agent!</span>")
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, "<span class='sinister'>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.</span>")
to_chat(current, "<span class='sinister'>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.</span>")
to_chat(current, "<span class='sinister'>You can now speak and understand the forgotten tongue of the occult.</span>")
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, "<B>Objective #1</B>: [explanation]")
current.memory += "<B>Objective #1</B>: [explanation]<BR>"
to_chat(current, "The convert rune is join blood self")
current.memory += "The convert rune is join blood self<BR>"
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, {"
<SPAN CLASS='big bold center red'>ATTENTION</SPAN>
<SPAN CLASS='big center'>It's time to pay your debt to \the [syndicate_name()].</SPAN>
"})
ticker.mode.finalize_traitor(src)
ticker.mode.greet_traitor(src)
return TRUE
return FALSE
*/
// --
/datum/mind/proc/GetRole(var/role_id)

View File

@@ -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, "<span class='warning'>Unfortunately, there weren't enough candidates available.</span>")
*/
if("announce_laws" in href_list)
var/mob/living/silicon/S = locate(href_list["mob"])

View File

@@ -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, "<span class='warning'>0 traitors selected. Aborting.</span>")
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, i<numChanglings, i++)
H = pick(candidates)
H.mind.make_Changling()
candidates.Remove(H)
log_admin("[key_name(owner)] has changeling'ed [key_name(H)] via create antagonist verb.")
return 1
return 0
/datum/admins/proc/makeRevs()
var/datum/game_mode/revolution/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)
continue
if(applicant.client.desires_role(ROLE_REV))
if(applicant.stat == CONSCIOUS)
if(applicant.mind)
if(!applicant.mind.special_role)
if(!jobban_isbanned(applicant, "revolutionary") && !jobban_isbanned(applicant, "Syndicate"))
if(!(applicant.job in temp.restricted_jobs))
candidates += applicant
if(candidates.len)
var/numRevs = min(candidates.len, 3)
for(var/i = 0, i<numRevs, i++)
H = pick(candidates)
H.mind.make_Rev()
candidates.Remove(H)
return 1
return 0
/datum/admins/proc/makeWizard()
var/list/mob/dead/observer/candidates = list()
var/mob/dead/observer/theghost = null
for(var/mob/dead/observer/G in get_active_candidates(ROLE_WIZARD,poll="Do you wish to be considered for the Space Wizard Federation \"Ambassador\"?"))
if(!jobban_isbanned(G, "wizard") && !jobban_isbanned(G, "Syndicate"))
candidates += G
if(candidates.len)
shuffle(candidates)
for(var/mob/i in candidates)
if(!i || !i.client)
continue //Dont bother removing them from the list since we only grab one wizard
theghost = i
break
if(theghost)
var/mob/living/carbon/human/new_character=makeBody(theghost)
new_character.mind.make_Wizard()
return 1
return 0
/datum/admins/proc/makeCult()
var/datum/game_mode/cult/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 get_active_candidates(ROLE_CULTIST))
if(applicant.stat == CONSCIOUS)
if(applicant.mind)
if(!applicant.mind.special_role)
if(!jobban_isbanned(applicant, "cultist") && !jobban_isbanned(applicant, "Syndicate"))
if(!(applicant.job in temp.restricted_jobs))
candidates += applicant
if(candidates.len)
var/numCultists = min(candidates.len, 4)
for(var/i = 0, i<numCultists, i++)
H = pick(candidates)
H.mind.make_Cultist()
candidates.Remove(H)
temp.grant_runeword(H)
return 1
return 0
/datum/admins/proc/makeNukeTeam()
@@ -280,22 +130,6 @@ client/proc/one_click_antag()
del(A)
continue
for(var/datum/mind/synd_mind in ticker.mode.syndicates)
if(synd_mind.current)
if(synd_mind.current.client)
for(var/image/I in synd_mind.current.client.images)
if(I.icon_state == "synd")
//del(I)
synd_mind.current.client.images -= I
for(var/datum/mind/synd_mind in ticker.mode.syndicates)
if(synd_mind.current)
if(synd_mind.current.client)
for(var/datum/mind/synd_mind_1 in ticker.mode.syndicates)
if(synd_mind_1.current)
var/I = image('icons/mob/mob.dmi', loc = synd_mind_1.current, icon_state = "synd")
synd_mind.current.client.images += I
for (var/obj/machinery/nuclearbomb/bomb in machines)
bomb.r_code = nuke_code // All the nukes are set to this code.
return 1
@@ -405,8 +239,6 @@ client/proc/one_click_antag()
new_syndicate_commando.mind.assigned_role = "MODE"
new_syndicate_commando.mind.special_role = "Syndicate Commando"
//Adds them to current traitor list. Which is really the extra antagonist list.
ticker.mode.traitors += new_syndicate_commando.mind
new_syndicate_commando.equip_syndicate_commando(syndicate_leader_selected)
return new_syndicate_commando
@@ -414,50 +246,6 @@ client/proc/one_click_antag()
/datum/admins/proc/makeVoxRaiders()
var/list/mob/dead/observer/candidates = list()
var/mob/dead/observer/theghost = null
var/input = "Disregard shinies, acquire hardware."
var/leader_chosen = 0 //when the leader is chosen. The last person spawned.
//Generates a list of candidates from active ghosts.
for(var/mob/dead/observer/G in get_active_candidates(ROLE_VOXRAIDER, poll="Do you wish to be considered for a vox raiding party arriving on the station?"))
candidates += G
for(var/mob/dead/observer/G in candidates)
if(!G.key)
candidates.Remove(G)
if(candidates.len)
var/max_raiders = 1
var/raiders = max_raiders
//Spawns vox raiders and equips them.
for (var/obj/effect/landmark/L in landmarks_list)
if(L.name == "voxstart")
if(raiders<=0)
break
var/mob/living/carbon/human/new_vox = create_vox_raider(L, leader_chosen)
while((!theghost || !theghost.client) && candidates.len)
theghost = pick(candidates)
candidates.Remove(theghost)
if(!theghost)
qdel(new_vox)
break
new_vox.key = theghost.key
to_chat(new_vox, "<span class='notice'>You 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: <span class='danger'> [input]</span></span>")
to_chat(new_vox, "<span class='warning'>Don't forget to turn on your nitrogen internals!</span>")
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<numVamps, i++)
H = pick(candidates)
H.mind.make_new_vampire()
log_admin("[key_name(owner)] has made [key_name(H)] a vampire via create antagonist verb.")
temp.greet_vampire(H.mind)
candidates.Remove(H)
return 1
return 0

View File

@@ -1108,6 +1108,7 @@
#include "code\modules\admin\verbs\mapping.dm"
#include "code\modules\admin\verbs\massmodvar.dm"
#include "code\modules\admin\verbs\modifyvariables.dm"
#include "code\modules\admin\verbs\one_click_antag.dm"
#include "code\modules\admin\verbs\onlyone.dm"
#include "code\modules\admin\verbs\playsound.dm"
#include "code\modules\admin\verbs\possess.dm"