Merge pull request #9716 from Ghommie/Ghommie-cit317
Porting objective code refactor (ergo fixing abductors/abductees objective by updating the code)
This commit is contained in:
@@ -96,7 +96,6 @@ GLOBAL_LIST_EMPTY(antagonists)
|
||||
LAZYREMOVE(owner.antag_datums, src)
|
||||
if(!silent && owner.current)
|
||||
farewell()
|
||||
owner.objectives -= objectives
|
||||
var/datum/team/team = get_team()
|
||||
if(team)
|
||||
team.remove_member(owner)
|
||||
@@ -132,14 +131,14 @@ GLOBAL_LIST_EMPTY(antagonists)
|
||||
report += printplayer(owner)
|
||||
|
||||
var/objectives_complete = TRUE
|
||||
if(owner.objectives.len)
|
||||
report += printobjectives(owner)
|
||||
for(var/datum/objective/objective in owner.objectives)
|
||||
if(objectives.len)
|
||||
report += printobjectives(objectives)
|
||||
for(var/datum/objective/objective in objectives)
|
||||
if(!objective.check_completion())
|
||||
objectives_complete = FALSE
|
||||
break
|
||||
|
||||
if(owner.objectives.len == 0 || objectives_complete)
|
||||
if(objectives.len == 0 || objectives_complete)
|
||||
report += "<span class='greentext big'>The [name] was successful!</span>"
|
||||
else
|
||||
report += "<span class='redtext big'>The [name] has failed!</span>"
|
||||
@@ -216,25 +215,6 @@ GLOBAL_LIST_EMPTY(antagonists)
|
||||
return
|
||||
antag_memory = new_memo
|
||||
|
||||
//This datum will autofill the name with special_role
|
||||
//Used as placeholder for minor antagonists, please create proper datums for these
|
||||
/datum/antagonist/auto_custom
|
||||
show_in_antagpanel = FALSE
|
||||
antagpanel_category = "Other"
|
||||
show_name_in_check_antagonists = TRUE
|
||||
|
||||
/datum/antagonist/auto_custom/on_gain()
|
||||
..()
|
||||
name = owner.special_role
|
||||
//Add all objectives not already owned by other datums to this one.
|
||||
var/list/already_registered_objectives = list()
|
||||
for(var/datum/antagonist/A in owner.antag_datums)
|
||||
if(A == src)
|
||||
continue
|
||||
else
|
||||
already_registered_objectives |= A.objectives
|
||||
objectives = owner.objectives - already_registered_objectives
|
||||
|
||||
//This one is created by admin tools for custom objectives
|
||||
/datum/antagonist/custom
|
||||
antagpanel_category = "Custom"
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
var/datum/objective/blob_takeover/main = new
|
||||
main.owner = owner
|
||||
objectives += main
|
||||
owner.objectives |= objectives
|
||||
|
||||
/datum/antagonist/blob/apply_innate_effects(mob/living/mob_override)
|
||||
if(!isovermind(owner.current))
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
|
||||
/datum/antagonist/blood_contract
|
||||
name = "Blood Contract Target"
|
||||
show_in_roundend = FALSE
|
||||
show_in_antagpanel = FALSE
|
||||
|
||||
/datum/antagonist/blood_contract/on_gain()
|
||||
. = ..()
|
||||
give_objective()
|
||||
start_the_hunt()
|
||||
|
||||
/datum/antagonist/blood_contract/proc/give_objective()
|
||||
var/datum/objective/survive/survive = new
|
||||
survive.owner = owner
|
||||
objectives += survive
|
||||
|
||||
/datum/antagonist/blood_contract/greet()
|
||||
. = ..()
|
||||
to_chat(owner, "<span class='userdanger'>You've been marked for death! Don't let the demons get you! KILL THEM ALL!</span>")
|
||||
|
||||
/datum/antagonist/blood_contract/proc/start_the_hunt()
|
||||
var/mob/living/carbon/human/H = owner.current
|
||||
if(!istype(H))
|
||||
return
|
||||
H.add_atom_colour("#FF0000", ADMIN_COLOUR_PRIORITY)
|
||||
var/obj/effect/mine/pickup/bloodbath/B = new(H)
|
||||
INVOKE_ASYNC(B, /obj/effect/mine/pickup/bloodbath/.proc/mineEffect, H) //could use moving out from the mine
|
||||
|
||||
for(var/mob/living/carbon/human/P in GLOB.player_list)
|
||||
if(P == H)
|
||||
continue
|
||||
to_chat(P, "<span class='userdanger'>You have an overwhelming desire to kill [H]. [H.p_theyve(TRUE)] been marked red! Whoever [H.p_they()] [H.p_were()], friend or foe, go kill [H.p_them()]!</span>")
|
||||
P.put_in_hands(new /obj/item/kitchen/knife/butcher(P), TRUE)
|
||||
@@ -9,7 +9,6 @@
|
||||
for(var/O in directives)
|
||||
var/datum/objective/brainwashing/objective = new(O)
|
||||
B.objectives += objective
|
||||
M.objectives += objective
|
||||
B.greet()
|
||||
else
|
||||
B = new()
|
||||
@@ -32,10 +31,6 @@
|
||||
antagpanel_category = "Other"
|
||||
show_name_in_check_antagonists = TRUE
|
||||
|
||||
/datum/antagonist/brainwashed/on_gain()
|
||||
owner.objectives |= objectives
|
||||
. = ..()
|
||||
|
||||
/datum/antagonist/brainwashed/greet()
|
||||
to_chat(owner, "<span class='warning'>Your mind reels as it begins focusing on a single purpose...</span>")
|
||||
to_chat(owner, "<big><span class='warning'><b>Follow the Directives, at any cost!</b></span></big>")
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
/datum/antagonist/brother/on_gain()
|
||||
SSticker.mode.brothers += owner
|
||||
objectives += team.objectives
|
||||
owner.objectives += objectives
|
||||
owner.special_role = special_role
|
||||
finalize_brother()
|
||||
return ..()
|
||||
|
||||
@@ -459,8 +459,6 @@
|
||||
objectives += identity_theft
|
||||
escape_objective_possible = FALSE
|
||||
|
||||
owner.objectives |= objectives
|
||||
|
||||
/datum/antagonist/changeling/proc/update_changeling_icons_added()
|
||||
var/datum/atom_hud/antag/hud = GLOB.huds[ANTAG_HUD_CHANGELING]
|
||||
hud.join_hud(owner.current)
|
||||
|
||||
@@ -35,7 +35,6 @@
|
||||
|
||||
/datum/antagonist/cult/proc/add_objectives()
|
||||
objectives |= cult_team.objectives
|
||||
owner.objectives |= objectives
|
||||
|
||||
/datum/antagonist/cult/Destroy()
|
||||
QDEL_NULL(communion)
|
||||
|
||||
@@ -549,7 +549,7 @@ GLOBAL_LIST_INIT(devil_suffix, list(" the Red", " the Soulless", " the Master",
|
||||
var/list/parts = list()
|
||||
parts += printplayer(owner)
|
||||
parts += printdevilinfo()
|
||||
parts += printobjectives(owner)
|
||||
parts += printobjectives(objectives)
|
||||
return parts.Join("<br>")
|
||||
|
||||
//A simple super light weight datum for the codex gigas.
|
||||
|
||||
@@ -57,3 +57,18 @@
|
||||
visible_message("<span class='danger'>[src] screams in agony as it sublimates into a sulfurous smoke.</span>")
|
||||
ghostize()
|
||||
qdel(src)
|
||||
|
||||
/datum/antagonist/imp
|
||||
name = "Imp"
|
||||
antagpanel_category = "Devil"
|
||||
show_in_roundend = FALSE
|
||||
|
||||
/datum/antagonist/imp/on_gain()
|
||||
. = ..()
|
||||
give_objectives()
|
||||
|
||||
/datum/antagonist/imp/proc/give_objectives()
|
||||
var/datum/objective/newobjective = new
|
||||
newobjective.explanation_text = "Try to get a promotion to a higher devilic rank."
|
||||
newobjective.owner = owner
|
||||
objectives += newobjective
|
||||
@@ -147,13 +147,8 @@
|
||||
if(ascended || user.mind.soulOwner == src.mind)
|
||||
var/mob/living/simple_animal/imp/S = new(get_turf(loc))
|
||||
user.transfer_ckey(S, FALSE)
|
||||
S.mind.assigned_role = "Imp"
|
||||
S.mind.special_role = "Imp"
|
||||
var/datum/objective/newobjective = new
|
||||
newobjective.explanation_text = "Try to get a promotion to a higher devilic rank."
|
||||
S.mind.objectives += newobjective
|
||||
to_chat(S, S.playstyle_string)
|
||||
to_chat(S, "<B>Objective #[1]</B>: [newobjective.explanation_text]")
|
||||
var/datum/antagonist/imp/A = new()
|
||||
S.mind.add_antag_datum(A)
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -10,12 +10,10 @@
|
||||
var/datum/objective/O = new /datum/objective/disease_infect()
|
||||
O.owner = owner
|
||||
objectives += O
|
||||
owner.objectives += O
|
||||
|
||||
O = new /datum/objective/disease_infect_centcom()
|
||||
O.owner = owner
|
||||
objectives += O
|
||||
owner.objectives += O
|
||||
|
||||
. = ..()
|
||||
|
||||
|
||||
@@ -113,7 +113,6 @@
|
||||
/datum/antagonist/ert/proc/forge_objectives()
|
||||
if(ert_team)
|
||||
objectives |= ert_team.objectives
|
||||
owner.objectives |= objectives
|
||||
|
||||
/datum/antagonist/ert/proc/equipERT()
|
||||
var/mob/living/carbon/human/H = owner.current
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
O.completed = TRUE //YES!
|
||||
O.owner = owner
|
||||
objectives += O
|
||||
owner.objectives += objectives
|
||||
|
||||
/datum/antagonist/greentext/on_gain()
|
||||
forge_objectives()
|
||||
|
||||
@@ -24,8 +24,6 @@
|
||||
hijack_objective.owner = owner
|
||||
objectives += hijack_objective
|
||||
|
||||
owner.objectives |= objectives
|
||||
|
||||
/datum/antagonist/highlander/on_gain()
|
||||
forge_objectives()
|
||||
owner.special_role = "highlander"
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
/datum/antagonist/magic_servant
|
||||
name = "Magic Servant"
|
||||
show_in_roundend = FALSE
|
||||
show_in_antagpanel = FALSE
|
||||
|
||||
/datum/antagonist/magic_servant/proc/setup_master(mob/M)
|
||||
var/datum/objective/O = new("Serve [M.real_name].")
|
||||
O.owner = owner
|
||||
objectives |= O
|
||||
@@ -63,7 +63,6 @@
|
||||
|
||||
/datum/antagonist/monkey/proc/forge_objectives()
|
||||
objectives |= monkey_team.objectives
|
||||
owner.objectives |= objectives
|
||||
|
||||
/datum/antagonist/monkey/admin_remove(mob/admin)
|
||||
var/mob/living/carbon/monkey/M = owner.current
|
||||
|
||||
@@ -96,7 +96,6 @@
|
||||
var/datum/objective/O = new /datum/objective/survive()
|
||||
O.owner = owner
|
||||
objectives += O
|
||||
owner.objectives |= objectives
|
||||
|
||||
/proc/remove_ninja(mob/living/L)
|
||||
if(!L || !L.mind)
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
|
||||
/datum/antagonist/nukeop/proc/forge_objectives()
|
||||
if(nuke_team)
|
||||
owner.objectives |= nuke_team.objectives
|
||||
objectives |= nuke_team.objectives
|
||||
|
||||
/datum/antagonist/nukeop/proc/move_to_spawnpoint()
|
||||
var/team_number = 1
|
||||
|
||||
@@ -36,8 +36,6 @@
|
||||
missionobj.completed = 1
|
||||
mission = missionobj
|
||||
objectives |= mission
|
||||
owner.objectives |= objectives
|
||||
|
||||
|
||||
/datum/antagonist/official/on_gain()
|
||||
forge_objectives()
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
// Sets objectives, equips all antags with the storage implant.
|
||||
/datum/antagonist/overthrow/on_gain()
|
||||
objectives += team.objectives
|
||||
owner.objectives += objectives
|
||||
..()
|
||||
owner.announce_objectives()
|
||||
equip_overthrow()
|
||||
@@ -34,7 +33,6 @@
|
||||
|
||||
/datum/antagonist/overthrow/on_removal()
|
||||
owner.special_role = null
|
||||
owner.objectives -= objectives
|
||||
..()
|
||||
|
||||
// Creates the overthrow team, or sets it. The objectives are static for all the team members.
|
||||
|
||||
@@ -35,7 +35,9 @@
|
||||
objectives += heads_obj
|
||||
for(var/i in members)
|
||||
var/datum/mind/M = i
|
||||
M.objectives += heads_obj
|
||||
var/datum/antagonist/overthrow/O = M.has_antag_datum(/datum/antagonist/overthrow)
|
||||
if(O)
|
||||
O.objectives += heads_obj
|
||||
heads_obj.find_targets()
|
||||
|
||||
addtimer(CALLBACK(src,.proc/update_objectives),OBJECTIVE_UPDATING_TIME,TIMER_UNIQUE)
|
||||
|
||||
@@ -31,12 +31,7 @@
|
||||
|
||||
/datum/antagonist/pirate/on_gain()
|
||||
if(crew)
|
||||
owner.objectives |= crew.objectives
|
||||
. = ..()
|
||||
|
||||
/datum/antagonist/pirate/on_removal()
|
||||
if(crew)
|
||||
owner.objectives -= crew.objectives
|
||||
objectives |= crew.objectives
|
||||
. = ..()
|
||||
|
||||
/datum/team/pirate
|
||||
@@ -53,7 +48,9 @@
|
||||
getbooty.update_explanation_text()
|
||||
objectives += getbooty
|
||||
for(var/datum/mind/M in members)
|
||||
M.objectives |= objectives
|
||||
var/datum/antagonist/pirate/P = M.has_antag_datum(/datum/antagonist/pirate)
|
||||
if(P)
|
||||
P.objectives |= objectives
|
||||
|
||||
|
||||
/datum/objective/loot
|
||||
|
||||
@@ -14,8 +14,6 @@
|
||||
objective2.owner = owner
|
||||
objectives += objective2
|
||||
|
||||
owner.objectives |= objectives
|
||||
|
||||
/datum/antagonist/revenant/on_gain()
|
||||
forge_objectives()
|
||||
. = ..()
|
||||
|
||||
@@ -66,10 +66,10 @@
|
||||
return rev_team
|
||||
|
||||
/datum/antagonist/rev/proc/create_objectives()
|
||||
owner.objectives |= rev_team.objectives
|
||||
objectives |= rev_team.objectives
|
||||
|
||||
/datum/antagonist/rev/proc/remove_objectives()
|
||||
owner.objectives -= rev_team.objectives
|
||||
objectives -= rev_team.objectives
|
||||
|
||||
//Bump up to head_rev
|
||||
/datum/antagonist/rev/proc/promote()
|
||||
@@ -265,7 +265,8 @@
|
||||
new_target.update_explanation_text()
|
||||
objectives += new_target
|
||||
for(var/datum/mind/M in members)
|
||||
M.objectives |= objectives
|
||||
var/datum/antagonist/rev/R = M.has_antag_datum(/datum/antagonist/rev)
|
||||
R.objectives |= objectives
|
||||
|
||||
addtimer(CALLBACK(src,.proc/update_objectives),HEAD_UPDATE_PERIOD,TIMER_UNIQUE)
|
||||
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
/datum/antagonist/santa
|
||||
name = "Santa"
|
||||
show_in_antagpanel = FALSE
|
||||
|
||||
/datum/antagonist/santa/on_gain()
|
||||
. = ..()
|
||||
give_equipment()
|
||||
give_objective()
|
||||
|
||||
/datum/antagonist/santa/greet()
|
||||
. = ..()
|
||||
to_chat(owner, "<span class='boldannounce'>You are Santa! Your objective is to bring joy to the people on this station. You can conjure more presents using a spell, and there are several presents in your bag.</span>")
|
||||
|
||||
/datum/antagonist/santa/proc/give_equipment()
|
||||
var/mob/living/carbon/human/H = owner.current
|
||||
if(istype(H))
|
||||
H.equipOutfit(/datum/outfit/santa)
|
||||
|
||||
owner.AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/conjure/presents)
|
||||
var/obj/effect/proc_holder/spell/targeted/area_teleport/teleport/telespell = new
|
||||
telespell.clothes_req = 0 //santa robes aren't actually magical.
|
||||
owner.AddSpell(telespell) //does the station have chimneys? WHO KNOWS!
|
||||
|
||||
/datum/antagonist/santa/proc/give_objective()
|
||||
var/datum/objective/santa_objective = new()
|
||||
santa_objective.explanation_text = "Bring joy and presents to the station!"
|
||||
santa_objective.completed = 1 //lets cut our santas some slack.
|
||||
santa_objective.owner = owner
|
||||
objectives |= santa_objective
|
||||
@@ -26,8 +26,6 @@
|
||||
new_objective2.explanation_text = "[objective_verb] everyone[summoner ? " else while you're at it":""]."
|
||||
objectives += new_objective2
|
||||
|
||||
owner.objectives |= objectives
|
||||
|
||||
/datum/antagonist/slaughter/laughter
|
||||
name = "Laughter demon"
|
||||
objective_verb = "Hug and Tickle"
|
||||
@@ -8,7 +8,6 @@
|
||||
var/datum/objective/survive/survive = new
|
||||
survive.owner = owner
|
||||
objectives += survive
|
||||
owner.objectives |= objectives
|
||||
|
||||
/datum/antagonist/survivalist/on_gain()
|
||||
owner.special_role = "survivalist"
|
||||
|
||||
@@ -78,15 +78,14 @@
|
||||
scan_target = null
|
||||
if(owner)
|
||||
if(owner.mind)
|
||||
if(owner.mind.objectives)
|
||||
for(var/datum/objective/objective_ in owner.mind.objectives)
|
||||
if(!is_internal_objective(objective_))
|
||||
continue
|
||||
var/datum/objective/assassinate/internal/objective = objective_
|
||||
var/mob/current = objective.target.current
|
||||
if(current&¤t.stat!=DEAD)
|
||||
scan_target = current
|
||||
break
|
||||
for(var/datum/objective/objective_ in owner.mind.get_all_objectives())
|
||||
if(!is_internal_objective(objective_))
|
||||
continue
|
||||
var/datum/objective/assassinate/internal/objective = objective_
|
||||
var/mob/current = objective.target.current
|
||||
if(current&¤t.stat!=DEAD)
|
||||
scan_target = current
|
||||
break
|
||||
|
||||
/datum/status_effect/agent_pinpointer/tick()
|
||||
if(!owner)
|
||||
@@ -100,9 +99,9 @@
|
||||
return (istype(O, /datum/objective/assassinate/internal)||istype(O, /datum/objective/destroy/internal))
|
||||
|
||||
/datum/antagonist/traitor/proc/replace_escape_objective()
|
||||
if(!owner||!owner.objectives)
|
||||
if(!owner || !objectives.len)
|
||||
return
|
||||
for (var/objective_ in owner.objectives)
|
||||
for (var/objective_ in objectives)
|
||||
if(!(istype(objective_, /datum/objective/escape)||istype(objective_, /datum/objective/survive)))
|
||||
continue
|
||||
remove_objective(objective_)
|
||||
@@ -112,9 +111,9 @@
|
||||
add_objective(martyr_objective)
|
||||
|
||||
/datum/antagonist/traitor/proc/reinstate_escape_objective()
|
||||
if(!owner||!owner.objectives)
|
||||
if(!owner||!objectives.len)
|
||||
return
|
||||
for (var/objective_ in owner.objectives)
|
||||
for (var/objective_ in objectives)
|
||||
if(!istype(objective_, /datum/objective/martyr))
|
||||
continue
|
||||
remove_objective(objective_)
|
||||
@@ -131,7 +130,7 @@
|
||||
return
|
||||
to_chat(owner.current, "<span class='userdanger'> Target eliminated: [victim.name]</span>")
|
||||
LAZYINITLIST(targets_stolen)
|
||||
for(var/objective_ in victim.objectives)
|
||||
for(var/objective_ in victim.get_all_objectives())
|
||||
if(istype(objective_, /datum/objective/assassinate/internal))
|
||||
var/datum/objective/assassinate/internal/objective = objective_
|
||||
if(objective.target==owner)
|
||||
@@ -159,7 +158,7 @@
|
||||
var/status_text = objective.check_completion() ? "neutralised" : "active"
|
||||
to_chat(owner.current, "<span class='userdanger'> New target added to database: [objective.target.name] ([status_text]) </span>")
|
||||
last_man_standing = TRUE
|
||||
for(var/objective_ in owner.objectives)
|
||||
for(var/objective_ in objectives)
|
||||
if(!is_internal_objective(objective_))
|
||||
continue
|
||||
var/datum/objective/assassinate/internal/objective = objective_
|
||||
@@ -175,7 +174,7 @@
|
||||
|
||||
/datum/antagonist/traitor/internal_affairs/proc/iaa_process()
|
||||
if(owner&&owner.current&&owner.current.stat!=DEAD)
|
||||
for(var/objective_ in owner.objectives)
|
||||
for(var/objective_ in objectives)
|
||||
if(!is_internal_objective(objective_))
|
||||
continue
|
||||
var/datum/objective/assassinate/internal/objective = objective_
|
||||
|
||||
@@ -55,12 +55,10 @@
|
||||
owner.special_role = null
|
||||
..()
|
||||
|
||||
/datum/antagonist/traitor/proc/add_objective(var/datum/objective/O)
|
||||
owner.objectives += O
|
||||
/datum/antagonist/traitor/proc/add_objective(datum/objective/O)
|
||||
objectives += O
|
||||
|
||||
/datum/antagonist/traitor/proc/remove_objective(var/datum/objective/O)
|
||||
owner.objectives -= O
|
||||
/datum/antagonist/traitor/proc/remove_objective(datum/objective/O)
|
||||
objectives -= O
|
||||
|
||||
/datum/antagonist/traitor/proc/forge_traitor_objectives()
|
||||
@@ -89,7 +87,7 @@
|
||||
forge_single_objective()
|
||||
|
||||
if(is_hijacker && objective_count <= toa) //Don't assign hijack if it would exceed the number of objectives set in config.traitor_objectives_amount
|
||||
if (!(locate(/datum/objective/hijack) in owner.objectives))
|
||||
if (!(locate(/datum/objective/hijack) in objectives))
|
||||
var/datum/objective/hijack/hijack_objective = new
|
||||
hijack_objective.owner = owner
|
||||
add_objective(hijack_objective)
|
||||
@@ -97,7 +95,7 @@
|
||||
|
||||
|
||||
var/martyr_compatibility = 1 //You can't succeed in stealing if you're dead.
|
||||
for(var/datum/objective/O in owner.objectives)
|
||||
for(var/datum/objective/O in objectives)
|
||||
if(!O.martyr_compatible)
|
||||
martyr_compatibility = 0
|
||||
break
|
||||
@@ -109,7 +107,7 @@
|
||||
return
|
||||
|
||||
else
|
||||
if(!(locate(/datum/objective/escape) in owner.objectives))
|
||||
if(!(locate(/datum/objective/escape) in objectives))
|
||||
var/datum/objective/escape/escape_objective = new
|
||||
escape_objective.owner = owner
|
||||
add_objective(escape_objective)
|
||||
@@ -159,7 +157,7 @@
|
||||
kill_objective.find_target()
|
||||
add_objective(kill_objective)
|
||||
else
|
||||
if(prob(15) && !(locate(/datum/objective/download) in owner.objectives) && !(owner.assigned_role in list("Research Director", "Scientist", "Roboticist")))
|
||||
if(prob(15) && !(locate(/datum/objective/download) in objectives) && !(owner.assigned_role in list("Research Director", "Scientist", "Roboticist")))
|
||||
var/datum/objective/download/download_objective = new
|
||||
download_objective.owner = owner
|
||||
download_objective.gen_amount_goal()
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
var/datum/objective/martyr/normiesgetout = new
|
||||
normiesgetout.owner = owner
|
||||
objectives += normiesgetout
|
||||
owner.objectives += objectives
|
||||
|
||||
/datum/antagonist/heartbreaker/on_gain()
|
||||
forge_objectives()
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
protect_objective.human_check = FALSE
|
||||
protect_objective.explanation_text = "Protect [date.name], your date."
|
||||
objectives += protect_objective
|
||||
owner.objectives += objectives
|
||||
|
||||
/datum/antagonist/valentine/on_gain()
|
||||
forge_objectives()
|
||||
@@ -34,8 +33,8 @@
|
||||
//Squashed up a bit
|
||||
/datum/antagonist/valentine/roundend_report()
|
||||
var/objectives_complete = TRUE
|
||||
if(owner.objectives.len)
|
||||
for(var/datum/objective/objective in owner.objectives)
|
||||
if(objectives.len)
|
||||
for(var/datum/objective/objective in objectives)
|
||||
if(!objective.check_completion())
|
||||
objectives_complete = FALSE
|
||||
break
|
||||
@@ -51,8 +50,8 @@
|
||||
|
||||
/datum/antagonist/valentine/chem/roundend_report()
|
||||
var/objectives_complete = TRUE
|
||||
if(owner.objectives.len)
|
||||
for(var/datum/objective/objective in owner.objectives)
|
||||
if(objectives.len)
|
||||
for(var/datum/objective/objective in objectives)
|
||||
if(!objective.check_completion())
|
||||
objectives_complete = FALSE
|
||||
break
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
var/datum/objective/hijack/hijack = new
|
||||
hijack.owner = owner
|
||||
objectives += hijack
|
||||
owner.objectives |= objectives
|
||||
|
||||
/datum/antagonist/wishgranter/on_gain()
|
||||
owner.special_role = "Avatar of the Wish Granter"
|
||||
|
||||
@@ -57,19 +57,19 @@
|
||||
if(!GLOB.wizardstart.len)
|
||||
SSjob.SendToLateJoin(owner.current)
|
||||
to_chat(owner, "HOT INSERTION, GO GO GO")
|
||||
owner.current.forceMove(pick(GLOB.wizardstart))
|
||||
else
|
||||
owner.current.forceMove(pick(GLOB.wizardstart))
|
||||
|
||||
/datum/antagonist/wizard/proc/create_objectives()
|
||||
var/datum/objective/new_objective = new("Cause as much creative mayhem as you can aboard the station! The more outlandish your methods of achieving this, the better! Make sure there's a decent amount of crew alive to tell of your tale.")
|
||||
new_objective.completed = TRUE //So they can greentext without admin intervention.
|
||||
new_objective.owner = owner
|
||||
objectives += new_objective
|
||||
|
||||
var/datum/objective/escape/escape_objective = new
|
||||
escape_objective.owner = owner
|
||||
objectives += escape_objective
|
||||
|
||||
for(var/datum/objective/O in objectives)
|
||||
owner.objectives += O
|
||||
if (!(locate(/datum/objective/escape) in objectives))
|
||||
var/datum/objective/escape/escape_objective = new
|
||||
escape_objective.owner = owner
|
||||
objectives += escape_objective
|
||||
|
||||
/datum/antagonist/wizard/on_removal()
|
||||
unregister()
|
||||
@@ -183,7 +183,6 @@
|
||||
new_objective.owner = owner
|
||||
new_objective.target = master
|
||||
new_objective.explanation_text = "Protect [master.current.real_name], the wizard."
|
||||
owner.objectives += new_objective
|
||||
objectives += new_objective
|
||||
|
||||
//Random event wizard
|
||||
@@ -251,7 +250,6 @@
|
||||
/datum/antagonist/wizard/academy/create_objectives()
|
||||
var/datum/objective/new_objective = new("Protect Wizard Academy from the intruders")
|
||||
new_objective.owner = owner
|
||||
owner.objectives += new_objective
|
||||
objectives += new_objective
|
||||
|
||||
//Solo wizard report
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
var/faction = null
|
||||
var/permanent = FALSE //If true, the spawner will not disappear upon running out of uses.
|
||||
var/random = FALSE //Don't set a name or gender, just go random
|
||||
var/antagonist_type
|
||||
var/objectives = null
|
||||
var/uses = 1 //how many times can we spawn from it. set to -1 for infinite.
|
||||
var/brute_damage = 0
|
||||
@@ -111,9 +112,16 @@
|
||||
if(show_flavour)
|
||||
to_chat(M, "[flavour_text]")
|
||||
var/datum/mind/MM = M.mind
|
||||
var/datum/antagonist/A
|
||||
if(antagonist_type)
|
||||
A = MM.add_antag_datum(antagonist_type)
|
||||
if(objectives)
|
||||
if(!A)
|
||||
A = MM.add_antag_datum(/datum/antagonist/custom)
|
||||
for(var/objective in objectives)
|
||||
MM.objectives += new/datum/objective(objective)
|
||||
var/datum/objective/O = new/datum/objective(objective)
|
||||
O.owner = MM
|
||||
A.objectives += O
|
||||
if(assignedrole)
|
||||
M.mind.assigned_role = assignedrole
|
||||
special(M, name)
|
||||
|
||||
@@ -264,8 +264,9 @@
|
||||
var/mob/living/carbon/human/H = new(drop_location())
|
||||
H.equipOutfit(/datum/outfit/butler)
|
||||
var/datum/mind/servant_mind = new /datum/mind()
|
||||
var/datum/objective/O = new("Serve [user.real_name].")
|
||||
servant_mind.objectives += O
|
||||
var/datum/antagonist/magic_servant/A = new
|
||||
servant_mind.add_antag_datum(A)
|
||||
A.setup_master(user)
|
||||
servant_mind.transfer_to(H)
|
||||
|
||||
var/list/mob/dead/observer/candidates = pollCandidatesForMob("Do you want to play as [user.real_name] Servant?", ROLE_WIZARD, null, ROLE_WIZARD, 50, H)
|
||||
|
||||
@@ -79,17 +79,5 @@
|
||||
santa = new /mob/living/carbon/human(pick(GLOB.blobstart))
|
||||
C.transfer_ckey(santa, FALSE)
|
||||
|
||||
santa.equipOutfit(/datum/outfit/santa)
|
||||
santa.update_icons()
|
||||
|
||||
var/datum/objective/santa_objective = new()
|
||||
santa_objective.explanation_text = "Bring joy and presents to the station!"
|
||||
santa_objective.completed = 1 //lets cut our santas some slack.
|
||||
santa_objective.owner = santa.mind
|
||||
santa.mind.objectives += santa_objective
|
||||
santa.mind.AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/conjure/presents)
|
||||
var/obj/effect/proc_holder/spell/targeted/area_teleport/teleport/telespell = new(santa)
|
||||
telespell.clothes_req = 0 //santa robes aren't actually magical.
|
||||
santa.mind.AddSpell(telespell) //does the station have chimneys? WHO KNOWS!
|
||||
|
||||
to_chat(santa, "<span class='boldannounce'>You are Santa! Your objective is to bring joy to the people on this station. You can conjure more presents using a spell, and there are several presents in your bag.</span>")
|
||||
var/datum/antagonist/santa/A = new
|
||||
santa.mind.add_antag_datum(A)
|
||||
|
||||
@@ -40,7 +40,8 @@
|
||||
|
||||
/obj/item/greentext/equipped(mob/living/user as mob)
|
||||
to_chat(user, "<font color='green'>So long as you leave this place with greentext in hand you know will be happy...</font>")
|
||||
if(user.mind && user.mind.objectives.len > 0)
|
||||
var/list/other_objectives = user.mind.get_all_objectives()
|
||||
if(user.mind && other_objectives.len > 0)
|
||||
to_chat(user, "<span class='warning'>... so long as you still perform your other objectives that is!</span>")
|
||||
new_holder = user
|
||||
if(!last_holder)
|
||||
|
||||
@@ -1022,21 +1022,10 @@
|
||||
|
||||
message_admins("<span class='adminnotice'>[ADMIN_LOOKUPFLW(L)] has been marked for death by [ADMIN_LOOKUPFLW(user)]!</span>")
|
||||
|
||||
var/datum/objective/survive/survive = new
|
||||
survive.owner = L.mind
|
||||
L.mind.objectives += survive
|
||||
var/datum/antagonist/blood_contract/A = new
|
||||
L.mind.add_antag_datum(A)
|
||||
|
||||
log_combat(user, L, "took out a blood contract on", src)
|
||||
to_chat(L, "<span class='userdanger'>You've been marked for death! Don't let the demons get you! KILL THEM ALL!</span>")
|
||||
L.add_atom_colour("#FF0000", ADMIN_COLOUR_PRIORITY)
|
||||
var/obj/effect/mine/pickup/bloodbath/B = new(L)
|
||||
INVOKE_ASYNC(B, /obj/effect/mine/pickup/bloodbath/.proc/mineEffect, L)
|
||||
|
||||
for(var/mob/living/carbon/human/H in GLOB.player_list)
|
||||
if(H == L)
|
||||
continue
|
||||
to_chat(H, "<span class='userdanger'>You have an overwhelming desire to kill [L]. [L.p_theyve(TRUE)] been marked red! Whoever [L.p_they()] [L.p_were()], friend or foe, go kill [L.p_them()]!</span>")
|
||||
H.put_in_hands(new /obj/item/kitchen/knife/butcher(H), TRUE)
|
||||
|
||||
qdel(src)
|
||||
|
||||
//Colossus
|
||||
|
||||
@@ -864,7 +864,7 @@ GLOBAL_VAR_INIT(exploit_warn_spam_prevention, 0)
|
||||
replace_identification_name(oldname,newname)
|
||||
|
||||
for(var/datum/mind/T in SSticker.minds)
|
||||
for(var/datum/objective/obj in T.objectives)
|
||||
for(var/datum/objective/obj in T.get_all_objectives())
|
||||
// Only update if this player is a target
|
||||
if(obj.target && obj.target.current && obj.target.current.real_name == name)
|
||||
obj.update_explanation_text()
|
||||
|
||||
Reference in New Issue
Block a user