mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-10 18:02:57 +00:00
Porting objective code refactor
This commit is contained in:
@@ -534,10 +534,12 @@
|
|||||||
return parts.Join()
|
return parts.Join()
|
||||||
|
|
||||||
|
|
||||||
/proc/printobjectives(datum/mind/ply)
|
/proc/printobjectives(list/objectives)
|
||||||
|
if(!objectives || !objectives.len)
|
||||||
|
return
|
||||||
var/list/objective_parts = list()
|
var/list/objective_parts = list()
|
||||||
var/count = 1
|
var/count = 1
|
||||||
for(var/datum/objective/objective in ply.objectives)
|
for(var/datum/objective/objective in objectives)
|
||||||
if(objective.check_completion())
|
if(objective.check_completion())
|
||||||
objective_parts += "<b>Objective #[count]</b>: [objective.explanation_text] <span class='greentext'>Success!</span>"
|
objective_parts += "<b>Objective #[count]</b>: [objective.explanation_text] <span class='greentext'>Success!</span>"
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -41,8 +41,6 @@
|
|||||||
var/special_role
|
var/special_role
|
||||||
var/list/restricted_roles = list()
|
var/list/restricted_roles = list()
|
||||||
|
|
||||||
var/list/datum/objective/objectives = list()
|
|
||||||
|
|
||||||
var/list/spell_list = list() // Wizard mode & "Give Spell" badmin button.
|
var/list/spell_list = list() // Wizard mode & "Give Spell" badmin button.
|
||||||
|
|
||||||
var/linglink
|
var/linglink
|
||||||
@@ -360,13 +358,15 @@
|
|||||||
output += memory
|
output += memory
|
||||||
|
|
||||||
|
|
||||||
|
var/list/all_objectives = list()
|
||||||
for(var/datum/antagonist/A in antag_datums)
|
for(var/datum/antagonist/A in antag_datums)
|
||||||
output += A.antag_memory
|
output += A.antag_memory
|
||||||
|
all_objectives |= A.objectives
|
||||||
|
|
||||||
if(objectives.len)
|
if(all_objectives.len)
|
||||||
output += "<B>Objectives:</B>"
|
output += "<B>Objectives:</B>"
|
||||||
var/obj_count = 1
|
var/obj_count = 1
|
||||||
for(var/datum/objective/objective in objectives)
|
for(var/datum/objective/objective in all_objectives)
|
||||||
output += "<br><B>Objective #[obj_count++]</B>: [objective.explanation_text]"
|
output += "<br><B>Objective #[obj_count++]</B>: [objective.explanation_text]"
|
||||||
var/list/datum/mind/other_owners = objective.get_owners() - src
|
var/list/datum/mind/other_owners = objective.get_owners() - src
|
||||||
if(other_owners.len)
|
if(other_owners.len)
|
||||||
@@ -377,7 +377,7 @@
|
|||||||
|
|
||||||
if(window)
|
if(window)
|
||||||
recipient << browse(output,"window=memory")
|
recipient << browse(output,"window=memory")
|
||||||
else if(objectives.len || memory)
|
else if(all_objectives.len || memory)
|
||||||
to_chat(recipient, "<i>[output]</i>")
|
to_chat(recipient, "<i>[output]</i>")
|
||||||
|
|
||||||
/datum/mind/Topic(href, href_list)
|
/datum/mind/Topic(href, href_list)
|
||||||
@@ -408,34 +408,24 @@
|
|||||||
memory = new_memo
|
memory = new_memo
|
||||||
|
|
||||||
else if (href_list["obj_edit"] || href_list["obj_add"])
|
else if (href_list["obj_edit"] || href_list["obj_add"])
|
||||||
var/datum/objective/objective
|
var/objective_pos //Edited objectives need to keep same order in antag objective list
|
||||||
var/objective_pos
|
|
||||||
var/def_value
|
var/def_value
|
||||||
|
|
||||||
var/datum/antagonist/target_antag
|
var/datum/antagonist/target_antag
|
||||||
|
var/datum/objective/old_objective //The old objective we're replacing/editing
|
||||||
|
var/datum/objective/new_objective //New objective we're be adding
|
||||||
|
|
||||||
if(href_list["obj_edit"])
|
if(href_list["obj_edit"])
|
||||||
objective = locate(href_list["obj_edit"])
|
for(var/datum/antagonist/A in antag_datums)
|
||||||
if (!objective)
|
old_objective = locate(href_list["obj_edit"]) in A.objectives
|
||||||
|
if(old_objective)
|
||||||
|
target_antag = A
|
||||||
|
objective_pos = A.objectives.Find(old_objective)
|
||||||
|
break
|
||||||
|
if(!old_objective)
|
||||||
|
to_chat(usr,"Invalid objective.")
|
||||||
return
|
return
|
||||||
|
|
||||||
for(var/datum/antagonist/A in antag_datums)
|
|
||||||
if(objective in A.objectives)
|
|
||||||
target_antag = A
|
|
||||||
objective_pos = A.objectives.Find(objective)
|
|
||||||
break
|
|
||||||
|
|
||||||
if(!target_antag) //Shouldn't happen anymore
|
|
||||||
stack_trace("objective without antagonist found")
|
|
||||||
objective_pos = objectives.Find(objective)
|
|
||||||
|
|
||||||
//Text strings are easy to manipulate. Revised for simplicity.
|
|
||||||
var/temp_obj_type = "[objective.type]"//Convert path into a text string.
|
|
||||||
def_value = copytext(temp_obj_type, 19)//Convert last part of path into an objective keyword.
|
|
||||||
if(!def_value)//If it's a custom objective, it will be an empty string.
|
|
||||||
def_value = "custom"
|
|
||||||
else
|
else
|
||||||
//We're adding this objective
|
|
||||||
if(href_list["target_antag"])
|
if(href_list["target_antag"])
|
||||||
var/datum/antagonist/X = locate(href_list["target_antag"]) in antag_datums
|
var/datum/antagonist/X = locate(href_list["target_antag"]) in antag_datums
|
||||||
if(X)
|
if(X)
|
||||||
@@ -447,7 +437,7 @@
|
|||||||
if(1)
|
if(1)
|
||||||
target_antag = antag_datums[1]
|
target_antag = antag_datums[1]
|
||||||
else
|
else
|
||||||
var/datum/antagonist/target = input("Which antagonist gets the objective:", "Antagonist", def_value) as null|anything in antag_datums + "(new custom antag)"
|
var/datum/antagonist/target = input("Which antagonist gets the objective:", "Antagonist", "(new custom antag)") as null|anything in antag_datums + "(new custom antag)"
|
||||||
if (QDELETED(target))
|
if (QDELETED(target))
|
||||||
return
|
return
|
||||||
else if(target == "(new custom antag)")
|
else if(target == "(new custom antag)")
|
||||||
@@ -455,149 +445,88 @@
|
|||||||
else
|
else
|
||||||
target_antag = target
|
target_antag = target
|
||||||
|
|
||||||
var/new_obj_type = input("Select objective type:", "Objective type", def_value) as null|anything in list("assassinate", "maroon", "debrain", "protect", "destroy", "prevent", "hijack", "escape", "survive", "martyr", "steal", "download", "nuclear", "capture", "absorb", "custom")
|
var/static/list/choices
|
||||||
if (!new_obj_type)
|
if(!choices)
|
||||||
|
choices = list()
|
||||||
|
|
||||||
|
var/list/allowed_types = list(
|
||||||
|
/datum/objective/assassinate,
|
||||||
|
/datum/objective/maroon,
|
||||||
|
/datum/objective/debrain,
|
||||||
|
/datum/objective/protect,
|
||||||
|
/datum/objective/destroy,
|
||||||
|
/datum/objective/hijack,
|
||||||
|
/datum/objective/escape,
|
||||||
|
/datum/objective/survive,
|
||||||
|
/datum/objective/martyr,
|
||||||
|
/datum/objective/steal,
|
||||||
|
/datum/objective/download,
|
||||||
|
/datum/objective/nuclear,
|
||||||
|
/datum/objective/capture,
|
||||||
|
/datum/objective/absorb,
|
||||||
|
/datum/objective/custom
|
||||||
|
)
|
||||||
|
|
||||||
|
for(var/T in allowed_types)
|
||||||
|
var/datum/objective/X = T
|
||||||
|
choices[initial(X.name)] = T
|
||||||
|
|
||||||
|
if(old_objective)
|
||||||
|
if(old_objective.name in choices)
|
||||||
|
def_value = old_objective.name
|
||||||
|
|
||||||
|
var/selected_type = input("Select objective type:", "Objective type", def_value) as null|anything in choices
|
||||||
|
selected_type = choices[selected_type]
|
||||||
|
if (!selected_type)
|
||||||
return
|
return
|
||||||
|
|
||||||
var/datum/objective/new_objective = null
|
if(!old_objective)
|
||||||
|
//Add new one
|
||||||
switch (new_obj_type)
|
new_objective = new selected_type
|
||||||
if ("assassinate","protect","debrain","maroon")
|
|
||||||
var/list/possible_targets = list("Free objective")
|
|
||||||
for(var/datum/mind/possible_target in SSticker.minds)
|
|
||||||
if ((possible_target != src) && ishuman(possible_target.current))
|
|
||||||
possible_targets += possible_target.current
|
|
||||||
|
|
||||||
var/mob/def_target = null
|
|
||||||
var/list/objective_list = typecacheof(list(/datum/objective/assassinate, /datum/objective/protect, /datum/objective/debrain, /datum/objective/maroon))
|
|
||||||
if (is_type_in_typecache(objective, objective_list) && objective.target)
|
|
||||||
def_target = objective.target.current
|
|
||||||
|
|
||||||
var/mob/new_target = input("Select target:", "Objective target", def_target) as null|anything in possible_targets
|
|
||||||
if (!new_target)
|
|
||||||
return
|
|
||||||
|
|
||||||
var/objective_path = text2path("/datum/objective/[new_obj_type]")
|
|
||||||
if (new_target == "Free objective")
|
|
||||||
new_objective = new objective_path
|
|
||||||
new_objective.owner = src
|
new_objective.owner = src
|
||||||
new_objective.target = null
|
new_objective.admin_edit(usr)
|
||||||
new_objective.explanation_text = "Free objective"
|
target_antag.objectives += new_objective
|
||||||
|
|
||||||
|
message_admins("[key_name_admin(usr)] added a new objective for [current]: [new_objective.explanation_text]")
|
||||||
|
log_admin("[key_name(usr)] added a new objective for [current]: [new_objective.explanation_text]")
|
||||||
else
|
else
|
||||||
new_objective = new objective_path
|
if(old_objective.type == selected_type)
|
||||||
new_objective.owner = src
|
//Edit the old
|
||||||
new_objective.target = new_target.mind
|
old_objective.admin_edit(usr)
|
||||||
//Will display as special role if the target is set as MODE. Ninjas/commandos/nuke ops.
|
new_objective = old_objective
|
||||||
new_objective.update_explanation_text()
|
|
||||||
|
|
||||||
if ("destroy")
|
|
||||||
var/list/possible_targets = active_ais(1)
|
|
||||||
if(possible_targets.len)
|
|
||||||
var/mob/new_target = input("Select target:", "Objective target") as null|anything in possible_targets
|
|
||||||
new_objective = new /datum/objective/destroy
|
|
||||||
new_objective.target = new_target.mind
|
|
||||||
new_objective.owner = src
|
|
||||||
new_objective.update_explanation_text()
|
|
||||||
else
|
else
|
||||||
to_chat(usr, "No active AIs with minds")
|
//Replace the old
|
||||||
|
new_objective = new selected_type
|
||||||
if ("prevent")
|
|
||||||
new_objective = new /datum/objective/block
|
|
||||||
new_objective.owner = src
|
new_objective.owner = src
|
||||||
|
new_objective.admin_edit(usr)
|
||||||
if ("hijack")
|
target_antag.objectives -= old_objective
|
||||||
new_objective = new /datum/objective/hijack
|
|
||||||
new_objective.owner = src
|
|
||||||
|
|
||||||
if ("escape")
|
|
||||||
new_objective = new /datum/objective/escape
|
|
||||||
new_objective.owner = src
|
|
||||||
|
|
||||||
if ("survive")
|
|
||||||
new_objective = new /datum/objective/survive
|
|
||||||
new_objective.owner = src
|
|
||||||
|
|
||||||
if("martyr")
|
|
||||||
new_objective = new /datum/objective/martyr
|
|
||||||
new_objective.owner = src
|
|
||||||
|
|
||||||
if ("nuclear")
|
|
||||||
new_objective = new /datum/objective/nuclear
|
|
||||||
new_objective.owner = src
|
|
||||||
|
|
||||||
if ("steal")
|
|
||||||
if (!istype(objective, /datum/objective/steal))
|
|
||||||
new_objective = new /datum/objective/steal
|
|
||||||
new_objective.owner = src
|
|
||||||
else
|
|
||||||
new_objective = objective
|
|
||||||
var/datum/objective/steal/steal = new_objective
|
|
||||||
if (!steal.select_target())
|
|
||||||
return
|
|
||||||
|
|
||||||
if("download","capture","absorb")
|
|
||||||
var/def_num
|
|
||||||
if(objective&&objective.type==text2path("/datum/objective/[new_obj_type]"))
|
|
||||||
def_num = objective.target_amount
|
|
||||||
|
|
||||||
var/target_number = input("Input target number:", "Objective", def_num) as num | null
|
|
||||||
if (isnull(target_number))//Ordinarily, you wouldn't need isnull. In this case, the value may already exist.
|
|
||||||
return
|
|
||||||
|
|
||||||
switch(new_obj_type)
|
|
||||||
if("download")
|
|
||||||
new_objective = new /datum/objective/download
|
|
||||||
new_objective.explanation_text = "Download [target_number] research node\s."
|
|
||||||
if("capture")
|
|
||||||
new_objective = new /datum/objective/capture
|
|
||||||
new_objective.explanation_text = "Capture [target_number] lifeforms with an energy net. Live, rare specimens are worth more."
|
|
||||||
if("absorb")
|
|
||||||
new_objective = new /datum/objective/absorb
|
|
||||||
new_objective.explanation_text = "Absorb [target_number] compatible genomes."
|
|
||||||
new_objective.owner = src
|
|
||||||
new_objective.target_amount = target_number
|
|
||||||
|
|
||||||
if ("custom")
|
|
||||||
var/expl = stripped_input(usr, "Custom objective:", "Objective", objective ? objective.explanation_text : "")
|
|
||||||
if (!expl)
|
|
||||||
return
|
|
||||||
new_objective = new /datum/objective
|
|
||||||
new_objective.owner = src
|
|
||||||
new_objective.explanation_text = expl
|
|
||||||
|
|
||||||
if (!new_objective)
|
|
||||||
return
|
|
||||||
|
|
||||||
if (objective)
|
|
||||||
if(target_antag)
|
|
||||||
target_antag.objectives -= objective
|
|
||||||
objectives -= objective
|
|
||||||
target_antag.objectives.Insert(objective_pos, new_objective)
|
target_antag.objectives.Insert(objective_pos, new_objective)
|
||||||
message_admins("[key_name_admin(usr)] edited [current]'s objective to [new_objective.explanation_text]")
|
message_admins("[key_name_admin(usr)] edited [current]'s objective to [new_objective.explanation_text]")
|
||||||
log_admin("[key_name(usr)] edited [current]'s objective to [new_objective.explanation_text]")
|
log_admin("[key_name(usr)] edited [current]'s objective to [new_objective.explanation_text]")
|
||||||
else
|
|
||||||
if(target_antag)
|
|
||||||
target_antag.objectives += new_objective
|
|
||||||
objectives += new_objective
|
|
||||||
message_admins("[key_name_admin(usr)] added a new objective for [current]: [new_objective.explanation_text]")
|
|
||||||
log_admin("[key_name(usr)] added a new objective for [current]: [new_objective.explanation_text]")
|
|
||||||
|
|
||||||
else if (href_list["obj_delete"])
|
else if (href_list["obj_delete"])
|
||||||
var/datum/objective/objective = locate(href_list["obj_delete"])
|
var/datum/objective/objective
|
||||||
if(!istype(objective))
|
|
||||||
return
|
|
||||||
|
|
||||||
for(var/datum/antagonist/A in antag_datums)
|
for(var/datum/antagonist/A in antag_datums)
|
||||||
if(objective in A.objectives)
|
objective = locate(href_list["obj_delete"]) in A.objectives
|
||||||
A.objectives -= objective
|
if(istype(objective))
|
||||||
break
|
break
|
||||||
objectives -= objective
|
if(!objective)
|
||||||
|
to_chat(usr,"Invalid objective.")
|
||||||
|
return
|
||||||
|
//qdel(objective) Needs cleaning objective destroys
|
||||||
message_admins("[key_name_admin(usr)] removed an objective for [current]: [objective.explanation_text]")
|
message_admins("[key_name_admin(usr)] removed an objective for [current]: [objective.explanation_text]")
|
||||||
log_admin("[key_name(usr)] removed an objective for [current]: [objective.explanation_text]")
|
log_admin("[key_name(usr)] removed an objective for [current]: [objective.explanation_text]")
|
||||||
|
|
||||||
else if(href_list["obj_completed"])
|
else if(href_list["obj_completed"])
|
||||||
var/datum/objective/objective = locate(href_list["obj_completed"])
|
var/datum/objective/objective
|
||||||
if(!istype(objective))
|
for(var/datum/antagonist/A in antag_datums)
|
||||||
|
objective = locate(href_list["obj_completed"]) in A.objectives
|
||||||
|
if(istype(objective))
|
||||||
|
objective = objective
|
||||||
|
break
|
||||||
|
if(!objective)
|
||||||
|
to_chat(usr,"Invalid objective.")
|
||||||
return
|
return
|
||||||
objective.completed = !objective.completed
|
objective.completed = !objective.completed
|
||||||
log_admin("[key_name(usr)] toggled the win state for [current]'s objective: [objective.explanation_text]")
|
log_admin("[key_name(usr)] toggled the win state for [current]'s objective: [objective.explanation_text]")
|
||||||
@@ -652,10 +581,16 @@
|
|||||||
usr = current
|
usr = current
|
||||||
traitor_panel()
|
traitor_panel()
|
||||||
|
|
||||||
|
/datum/mind/proc/get_all_objectives()
|
||||||
|
var/list/all_objectives = list()
|
||||||
|
for(var/datum/antagonist/A in antag_datums)
|
||||||
|
all_objectives |= A.objectives
|
||||||
|
return all_objectives
|
||||||
|
|
||||||
/datum/mind/proc/announce_objectives()
|
/datum/mind/proc/announce_objectives()
|
||||||
var/obj_count = 1
|
var/obj_count = 1
|
||||||
to_chat(current, "<span class='notice'>Your current objectives:</span>")
|
to_chat(current, "<span class='notice'>Your current objectives:</span>")
|
||||||
for(var/objective in objectives)
|
for(var/objective in get_all_objectives())
|
||||||
var/datum/objective/O = objective
|
var/datum/objective/O = objective
|
||||||
to_chat(current, "<B>Objective #[obj_count]</B>: [O.explanation_text]")
|
to_chat(current, "<B>Objective #[obj_count]</B>: [O.explanation_text]")
|
||||||
obj_count++
|
obj_count++
|
||||||
|
|||||||
@@ -34,11 +34,12 @@
|
|||||||
//If you override this method, have it return the number of objectives added.
|
//If you override this method, have it return the number of objectives added.
|
||||||
if(devil_target_list.len && devil_target_list[devil]) // Is a double agent
|
if(devil_target_list.len && devil_target_list[devil]) // Is a double agent
|
||||||
var/datum/mind/target_mind = devil_target_list[devil]
|
var/datum/mind/target_mind = devil_target_list[devil]
|
||||||
|
var/datum/antagonist/devil/D = target_mind.has_antag_datum(/datum/antagonist/devil)
|
||||||
var/datum/objective/devil/outsell/outsellobjective = new
|
var/datum/objective/devil/outsell/outsellobjective = new
|
||||||
outsellobjective.owner = devil
|
outsellobjective.owner = devil
|
||||||
outsellobjective.target = target_mind
|
outsellobjective.target = target_mind
|
||||||
outsellobjective.update_explanation_text()
|
outsellobjective.update_explanation_text()
|
||||||
devil.objectives += outsellobjective
|
D.objectives += outsellobjective
|
||||||
return 1
|
return 1
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
|||||||
@@ -4,11 +4,12 @@
|
|||||||
|
|
||||||
/datum/game_mode/proc/add_devil_objectives(datum/mind/devil_mind, quantity)
|
/datum/game_mode/proc/add_devil_objectives(datum/mind/devil_mind, quantity)
|
||||||
var/list/validtypes = list(/datum/objective/devil/soulquantity, /datum/objective/devil/soulquality, /datum/objective/devil/sintouch, /datum/objective/devil/buy_target)
|
var/list/validtypes = list(/datum/objective/devil/soulquantity, /datum/objective/devil/soulquality, /datum/objective/devil/sintouch, /datum/objective/devil/buy_target)
|
||||||
|
var/datum/antagonist/devil/D = devil_mind.has_antag_datum(/datum/antagonist/devil)
|
||||||
for(var/i = 1 to quantity)
|
for(var/i = 1 to quantity)
|
||||||
var/type = pick(validtypes)
|
var/type = pick(validtypes)
|
||||||
var/datum/objective/devil/objective = new type(null)
|
var/datum/objective/devil/objective = new type(null)
|
||||||
objective.owner = devil_mind
|
objective.owner = devil_mind
|
||||||
devil_mind.objectives += objective
|
D.objectives += objective
|
||||||
if(!istype(objective, /datum/objective/devil/buy_target))
|
if(!istype(objective, /datum/objective/devil/buy_target))
|
||||||
validtypes -= type //prevent duplicate objectives, EXCEPT for buy_target.
|
validtypes -= type //prevent duplicate objectives, EXCEPT for buy_target.
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ GLOBAL_LIST_EMPTY(objectives)
|
|||||||
/datum/objective
|
/datum/objective
|
||||||
var/datum/mind/owner //The primary owner of the objective. !!SOMEWHAT DEPRECATED!! Prefer using 'team' for new code.
|
var/datum/mind/owner //The primary owner of the objective. !!SOMEWHAT DEPRECATED!! Prefer using 'team' for new code.
|
||||||
var/datum/team/team //An alternative to 'owner': a team. Use this when writing new code.
|
var/datum/team/team //An alternative to 'owner': a team. Use this when writing new code.
|
||||||
|
var/name = "generic objective" //Name for admin prompts
|
||||||
var/explanation_text = "Nothing" //What that person is supposed to do.
|
var/explanation_text = "Nothing" //What that person is supposed to do.
|
||||||
var/team_explanation_text //For when there are multiple owners.
|
var/team_explanation_text //For when there are multiple owners.
|
||||||
var/datum/mind/target = null //If they are focused on a particular person.
|
var/datum/mind/target = null //If they are focused on a particular person.
|
||||||
@@ -22,6 +23,32 @@ GLOBAL_LIST_EMPTY(objectives)
|
|||||||
if(owner)
|
if(owner)
|
||||||
. += owner
|
. += owner
|
||||||
|
|
||||||
|
/datum/objective/proc/admin_edit(mob/admin)
|
||||||
|
return
|
||||||
|
|
||||||
|
//Shared by few objective types
|
||||||
|
/datum/objective/proc/admin_simple_target_pick(mob/admin)
|
||||||
|
var/list/possible_targets = list("Free objective")
|
||||||
|
var/def_value
|
||||||
|
for(var/datum/mind/possible_target in SSticker.minds)
|
||||||
|
if ((possible_target != src) && ishuman(possible_target.current))
|
||||||
|
possible_targets += possible_target.current
|
||||||
|
|
||||||
|
|
||||||
|
if(target && target.current)
|
||||||
|
def_value = target.current
|
||||||
|
|
||||||
|
var/mob/new_target = input(admin,"Select target:", "Objective target", def_value) as null|anything in possible_targets
|
||||||
|
if (!new_target)
|
||||||
|
return
|
||||||
|
|
||||||
|
if (new_target == "Free objective")
|
||||||
|
target = null
|
||||||
|
else
|
||||||
|
target = new_target.mind
|
||||||
|
|
||||||
|
update_explanation_text()
|
||||||
|
|
||||||
/datum/objective/proc/considered_escaped(datum/mind/M)
|
/datum/objective/proc/considered_escaped(datum/mind/M)
|
||||||
if(!considered_alive(M))
|
if(!considered_alive(M))
|
||||||
return FALSE
|
return FALSE
|
||||||
@@ -42,7 +69,7 @@ GLOBAL_LIST_EMPTY(objectives)
|
|||||||
/datum/objective/proc/is_unique_objective(possible_target)
|
/datum/objective/proc/is_unique_objective(possible_target)
|
||||||
var/list/datum/mind/owners = get_owners()
|
var/list/datum/mind/owners = get_owners()
|
||||||
for(var/datum/mind/M in owners)
|
for(var/datum/mind/M in owners)
|
||||||
for(var/datum/objective/O in M.objectives)
|
for(var/datum/objective/O in M.get_all_objectives()) //This scope is debatable, probably should be passed in by caller.
|
||||||
if(istype(O, type) && O.get_target() == possible_target)
|
if(istype(O, type) && O.get_target() == possible_target)
|
||||||
return FALSE
|
return FALSE
|
||||||
return TRUE
|
return TRUE
|
||||||
@@ -122,6 +149,7 @@ GLOBAL_LIST_EMPTY(objectives)
|
|||||||
H.equip_in_one_of_slots(O, slots)
|
H.equip_in_one_of_slots(O, slots)
|
||||||
|
|
||||||
/datum/objective/assassinate
|
/datum/objective/assassinate
|
||||||
|
name = "assasinate"
|
||||||
var/target_role_type=0
|
var/target_role_type=0
|
||||||
martyr_compatible = 1
|
martyr_compatible = 1
|
||||||
|
|
||||||
@@ -141,6 +169,9 @@ GLOBAL_LIST_EMPTY(objectives)
|
|||||||
else
|
else
|
||||||
explanation_text = "Free Objective"
|
explanation_text = "Free Objective"
|
||||||
|
|
||||||
|
/datum/objective/assassinate/admin_edit(mob/admin)
|
||||||
|
admin_simple_target_pick(admin)
|
||||||
|
|
||||||
/datum/objective/assassinate/internal
|
/datum/objective/assassinate/internal
|
||||||
var/stolen = 0 //Have we already eliminated this target?
|
var/stolen = 0 //Have we already eliminated this target?
|
||||||
|
|
||||||
@@ -150,6 +181,7 @@ GLOBAL_LIST_EMPTY(objectives)
|
|||||||
explanation_text = "Assassinate [target.name], who was obliterated"
|
explanation_text = "Assassinate [target.name], who was obliterated"
|
||||||
|
|
||||||
/datum/objective/mutiny
|
/datum/objective/mutiny
|
||||||
|
name = "mutiny"
|
||||||
var/target_role_type=0
|
var/target_role_type=0
|
||||||
martyr_compatible = 1
|
martyr_compatible = 1
|
||||||
|
|
||||||
@@ -173,6 +205,7 @@ GLOBAL_LIST_EMPTY(objectives)
|
|||||||
explanation_text = "Free Objective"
|
explanation_text = "Free Objective"
|
||||||
|
|
||||||
/datum/objective/maroon
|
/datum/objective/maroon
|
||||||
|
name = "maroon"
|
||||||
var/target_role_type=0
|
var/target_role_type=0
|
||||||
martyr_compatible = 1
|
martyr_compatible = 1
|
||||||
|
|
||||||
@@ -191,7 +224,11 @@ GLOBAL_LIST_EMPTY(objectives)
|
|||||||
else
|
else
|
||||||
explanation_text = "Free Objective"
|
explanation_text = "Free Objective"
|
||||||
|
|
||||||
|
/datum/objective/maroon/admin_edit(mob/admin)
|
||||||
|
admin_simple_target_pick(admin)
|
||||||
|
|
||||||
/datum/objective/debrain
|
/datum/objective/debrain
|
||||||
|
name = "debrain"
|
||||||
var/target_role_type=0
|
var/target_role_type=0
|
||||||
|
|
||||||
/datum/objective/debrain/find_target_by_role(role, role_type=0, invert=0)
|
/datum/objective/debrain/find_target_by_role(role, role_type=0, invert=0)
|
||||||
@@ -222,7 +259,11 @@ GLOBAL_LIST_EMPTY(objectives)
|
|||||||
else
|
else
|
||||||
explanation_text = "Free Objective"
|
explanation_text = "Free Objective"
|
||||||
|
|
||||||
|
/datum/objective/debrain/admin_edit(mob/admin)
|
||||||
|
admin_simple_target_pick(admin)
|
||||||
|
|
||||||
/datum/objective/protect//The opposite of killing a dude.
|
/datum/objective/protect//The opposite of killing a dude.
|
||||||
|
name = "protect"
|
||||||
martyr_compatible = 1
|
martyr_compatible = 1
|
||||||
var/target_role_type = 0
|
var/target_role_type = 0
|
||||||
var/human_check = TRUE
|
var/human_check = TRUE
|
||||||
@@ -243,10 +284,15 @@ GLOBAL_LIST_EMPTY(objectives)
|
|||||||
else
|
else
|
||||||
explanation_text = "Free Objective"
|
explanation_text = "Free Objective"
|
||||||
|
|
||||||
|
/datum/objective/protect/admin_edit(mob/admin)
|
||||||
|
admin_simple_target_pick(admin)
|
||||||
|
|
||||||
/datum/objective/protect/nonhuman
|
/datum/objective/protect/nonhuman
|
||||||
|
name = "protect nonhuman"
|
||||||
human_check = FALSE
|
human_check = FALSE
|
||||||
|
|
||||||
/datum/objective/hijack
|
/datum/objective/hijack
|
||||||
|
name = "hijack"
|
||||||
explanation_text = "Hijack the shuttle to ensure no loyalist Nanotrasen crew escape alive and out of custody."
|
explanation_text = "Hijack the shuttle to ensure no loyalist Nanotrasen crew escape alive and out of custody."
|
||||||
team_explanation_text = "Hijack the shuttle to ensure no loyalist Nanotrasen crew escape alive and out of custody. Leave no team member behind."
|
team_explanation_text = "Hijack the shuttle to ensure no loyalist Nanotrasen crew escape alive and out of custody. Leave no team member behind."
|
||||||
martyr_compatible = 0 //Technically you won't get both anyway.
|
martyr_compatible = 0 //Technically you won't get both anyway.
|
||||||
@@ -261,6 +307,7 @@ GLOBAL_LIST_EMPTY(objectives)
|
|||||||
return SSshuttle.emergency.is_hijacked()
|
return SSshuttle.emergency.is_hijacked()
|
||||||
|
|
||||||
/datum/objective/block
|
/datum/objective/block
|
||||||
|
name = "no organics on shuttle"
|
||||||
explanation_text = "Do not allow any organic lifeforms to escape on the shuttle alive."
|
explanation_text = "Do not allow any organic lifeforms to escape on the shuttle alive."
|
||||||
martyr_compatible = 1
|
martyr_compatible = 1
|
||||||
|
|
||||||
@@ -274,6 +321,7 @@ GLOBAL_LIST_EMPTY(objectives)
|
|||||||
return TRUE
|
return TRUE
|
||||||
|
|
||||||
/datum/objective/purge
|
/datum/objective/purge
|
||||||
|
name = "no mutants on shuttle"
|
||||||
explanation_text = "Ensure no mutant humanoid species are present aboard the escape shuttle."
|
explanation_text = "Ensure no mutant humanoid species are present aboard the escape shuttle."
|
||||||
martyr_compatible = 1
|
martyr_compatible = 1
|
||||||
|
|
||||||
@@ -288,6 +336,7 @@ GLOBAL_LIST_EMPTY(objectives)
|
|||||||
return TRUE
|
return TRUE
|
||||||
|
|
||||||
/datum/objective/robot_army
|
/datum/objective/robot_army
|
||||||
|
name = "robot army"
|
||||||
explanation_text = "Have at least eight active cyborgs synced to you."
|
explanation_text = "Have at least eight active cyborgs synced to you."
|
||||||
martyr_compatible = 0
|
martyr_compatible = 0
|
||||||
|
|
||||||
@@ -304,6 +353,7 @@ GLOBAL_LIST_EMPTY(objectives)
|
|||||||
return counter >= 8
|
return counter >= 8
|
||||||
|
|
||||||
/datum/objective/escape
|
/datum/objective/escape
|
||||||
|
name = "escape"
|
||||||
explanation_text = "Escape on the shuttle or an escape pod alive and without being in custody."
|
explanation_text = "Escape on the shuttle or an escape pod alive and without being in custody."
|
||||||
team_explanation_text = "Have all members of your team escape on a shuttle or pod alive, without being in custody."
|
team_explanation_text = "Have all members of your team escape on a shuttle or pod alive, without being in custody."
|
||||||
|
|
||||||
@@ -316,6 +366,7 @@ GLOBAL_LIST_EMPTY(objectives)
|
|||||||
return TRUE
|
return TRUE
|
||||||
|
|
||||||
/datum/objective/escape/escape_with_identity
|
/datum/objective/escape/escape_with_identity
|
||||||
|
name = "escape with identity"
|
||||||
var/target_real_name // Has to be stored because the target's real_name can change over the course of the round
|
var/target_real_name // Has to be stored because the target's real_name can change over the course of the round
|
||||||
var/target_missing_id
|
var/target_missing_id
|
||||||
|
|
||||||
@@ -351,7 +402,11 @@ GLOBAL_LIST_EMPTY(objectives)
|
|||||||
return TRUE
|
return TRUE
|
||||||
return FALSE
|
return FALSE
|
||||||
|
|
||||||
|
/datum/objective/escape/escape_with_identity/admin_edit(mob/admin)
|
||||||
|
admin_simple_target_pick(admin)
|
||||||
|
|
||||||
/datum/objective/survive
|
/datum/objective/survive
|
||||||
|
name = "survive"
|
||||||
explanation_text = "Stay alive until the end."
|
explanation_text = "Stay alive until the end."
|
||||||
|
|
||||||
/datum/objective/survive/check_completion()
|
/datum/objective/survive/check_completion()
|
||||||
@@ -362,6 +417,7 @@ GLOBAL_LIST_EMPTY(objectives)
|
|||||||
return TRUE
|
return TRUE
|
||||||
|
|
||||||
/datum/objective/survive/exist //Like survive, but works for silicons and zombies and such.
|
/datum/objective/survive/exist //Like survive, but works for silicons and zombies and such.
|
||||||
|
name = "survive nonhuman"
|
||||||
|
|
||||||
/datum/objective/survive/exist/check_completion()
|
/datum/objective/survive/exist/check_completion()
|
||||||
var/list/datum/mind/owners = get_owners()
|
var/list/datum/mind/owners = get_owners()
|
||||||
@@ -371,6 +427,7 @@ GLOBAL_LIST_EMPTY(objectives)
|
|||||||
return TRUE
|
return TRUE
|
||||||
|
|
||||||
/datum/objective/martyr
|
/datum/objective/martyr
|
||||||
|
name = "martyr"
|
||||||
explanation_text = "Die a glorious death."
|
explanation_text = "Die a glorious death."
|
||||||
|
|
||||||
/datum/objective/martyr/check_completion()
|
/datum/objective/martyr/check_completion()
|
||||||
@@ -383,6 +440,7 @@ GLOBAL_LIST_EMPTY(objectives)
|
|||||||
return TRUE
|
return TRUE
|
||||||
|
|
||||||
/datum/objective/nuclear
|
/datum/objective/nuclear
|
||||||
|
name = "nuclear"
|
||||||
explanation_text = "Destroy the station with a nuclear device."
|
explanation_text = "Destroy the station with a nuclear device."
|
||||||
martyr_compatible = 1
|
martyr_compatible = 1
|
||||||
|
|
||||||
@@ -393,6 +451,7 @@ GLOBAL_LIST_EMPTY(objectives)
|
|||||||
|
|
||||||
GLOBAL_LIST_EMPTY(possible_items)
|
GLOBAL_LIST_EMPTY(possible_items)
|
||||||
/datum/objective/steal
|
/datum/objective/steal
|
||||||
|
name = "steal"
|
||||||
var/datum/objective_item/targetinfo = null //Save the chosen item datum so we can access it later.
|
var/datum/objective_item/targetinfo = null //Save the chosen item datum so we can access it later.
|
||||||
var/obj/item/steal_target = null //Needed for custom objectives (they're just items, not datums).
|
var/obj/item/steal_target = null //Needed for custom objectives (they're just items, not datums).
|
||||||
martyr_compatible = 0
|
martyr_compatible = 0
|
||||||
@@ -430,18 +489,19 @@ GLOBAL_LIST_EMPTY(possible_items)
|
|||||||
explanation_text = "Free objective"
|
explanation_text = "Free objective"
|
||||||
return
|
return
|
||||||
|
|
||||||
/datum/objective/steal/proc/select_target() //For admins setting objectives manually.
|
/datum/objective/steal/admin_edit(mob/admin)
|
||||||
var/list/possible_items_all = GLOB.possible_items+"custom"
|
var/list/possible_items_all = GLOB.possible_items+"custom"
|
||||||
var/new_target = input("Select target:", "Objective target", steal_target) as null|anything in possible_items_all
|
var/new_target = input(admin,"Select target:", "Objective target", steal_target) as null|anything in possible_items_all
|
||||||
if (!new_target)
|
if (!new_target)
|
||||||
return
|
return
|
||||||
|
|
||||||
if (new_target == "custom") //Can set custom items.
|
if (new_target == "custom") //Can set custom items.
|
||||||
var/obj/item/custom_target = input("Select type:","Type") as null|anything in typesof(/obj/item)
|
var/custom_path = input(admin,"Search for target item type:","Type") as null|text
|
||||||
if (!custom_target)
|
if (!custom_path)
|
||||||
return
|
return
|
||||||
|
var/obj/item/custom_target = pick_closest_path(custom_path, make_types_fancy(subtypesof(/obj/item)))
|
||||||
var/custom_name = initial(custom_target.name)
|
var/custom_name = initial(custom_target.name)
|
||||||
custom_name = stripped_input("Enter target name:", "Objective target", custom_name)
|
custom_name = stripped_input(admin,"Enter target name:", "Objective target", custom_name)
|
||||||
if (!custom_name)
|
if (!custom_name)
|
||||||
return
|
return
|
||||||
steal_target = custom_target
|
steal_target = custom_target
|
||||||
@@ -449,7 +509,6 @@ GLOBAL_LIST_EMPTY(possible_items)
|
|||||||
|
|
||||||
else
|
else
|
||||||
set_target(new_target)
|
set_target(new_target)
|
||||||
return steal_target
|
|
||||||
|
|
||||||
/datum/objective/steal/check_completion()
|
/datum/objective/steal/check_completion()
|
||||||
var/list/datum/mind/owners = get_owners()
|
var/list/datum/mind/owners = get_owners()
|
||||||
@@ -476,6 +535,7 @@ GLOBAL_LIST_EMPTY(possible_items)
|
|||||||
|
|
||||||
GLOBAL_LIST_EMPTY(possible_items_special)
|
GLOBAL_LIST_EMPTY(possible_items_special)
|
||||||
/datum/objective/steal/special //ninjas are so special they get their own subtype good for them
|
/datum/objective/steal/special //ninjas are so special they get their own subtype good for them
|
||||||
|
name = "steal special"
|
||||||
|
|
||||||
/datum/objective/steal/special/New()
|
/datum/objective/steal/special/New()
|
||||||
..()
|
..()
|
||||||
@@ -487,8 +547,12 @@ GLOBAL_LIST_EMPTY(possible_items_special)
|
|||||||
return set_target(pick(GLOB.possible_items_special))
|
return set_target(pick(GLOB.possible_items_special))
|
||||||
|
|
||||||
/datum/objective/steal/exchange
|
/datum/objective/steal/exchange
|
||||||
|
name = "exchange"
|
||||||
martyr_compatible = 0
|
martyr_compatible = 0
|
||||||
|
|
||||||
|
/datum/objective/steal/exchange/admin_edit(mob/admin)
|
||||||
|
return
|
||||||
|
|
||||||
/datum/objective/steal/exchange/proc/set_faction(faction,otheragent)
|
/datum/objective/steal/exchange/proc/set_faction(faction,otheragent)
|
||||||
target = otheragent
|
target = otheragent
|
||||||
if(faction == "red")
|
if(faction == "red")
|
||||||
@@ -508,6 +572,7 @@ GLOBAL_LIST_EMPTY(possible_items_special)
|
|||||||
|
|
||||||
|
|
||||||
/datum/objective/steal/exchange/backstab
|
/datum/objective/steal/exchange/backstab
|
||||||
|
name = "prevent exchange"
|
||||||
|
|
||||||
/datum/objective/steal/exchange/backstab/set_faction(faction)
|
/datum/objective/steal/exchange/backstab/set_faction(faction)
|
||||||
if(faction == "red")
|
if(faction == "red")
|
||||||
@@ -519,12 +584,17 @@ GLOBAL_LIST_EMPTY(possible_items_special)
|
|||||||
|
|
||||||
|
|
||||||
/datum/objective/download
|
/datum/objective/download
|
||||||
|
name = "download"
|
||||||
|
|
||||||
/datum/objective/download/proc/gen_amount_goal()
|
/datum/objective/download/proc/gen_amount_goal()
|
||||||
target_amount = rand(20,40)
|
target_amount = rand(20,40)
|
||||||
explanation_text = "Download [target_amount] research node\s."
|
update_explanation_text()
|
||||||
return target_amount
|
return target_amount
|
||||||
|
|
||||||
|
/datum/objective/download/update_explanation_text()
|
||||||
|
..()
|
||||||
|
explanation_text = "Download [target_amount] research node\s."
|
||||||
|
|
||||||
/datum/objective/download/check_completion()
|
/datum/objective/download/check_completion()
|
||||||
var/datum/techweb/checking = new
|
var/datum/techweb/checking = new
|
||||||
var/list/datum/mind/owners = get_owners()
|
var/list/datum/mind/owners = get_owners()
|
||||||
@@ -541,7 +611,14 @@ GLOBAL_LIST_EMPTY(possible_items_special)
|
|||||||
TD.stored_research.copy_research_to(checking)
|
TD.stored_research.copy_research_to(checking)
|
||||||
return checking.researched_nodes.len >= target_amount
|
return checking.researched_nodes.len >= target_amount
|
||||||
|
|
||||||
|
/datum/objective/download/admin_edit(mob/admin)
|
||||||
|
var/count = input(admin,"How many nodes ?","Nodes",target_amount) as num|null
|
||||||
|
if(count)
|
||||||
|
target_amount = count
|
||||||
|
update_explanation_text()
|
||||||
|
|
||||||
/datum/objective/capture
|
/datum/objective/capture
|
||||||
|
name = "capture"
|
||||||
var/captured_amount = 0
|
var/captured_amount = 0
|
||||||
|
|
||||||
/datum/objective/capture/proc/gen_amount_goal()
|
/datum/objective/capture/proc/gen_amount_goal()
|
||||||
@@ -549,6 +626,10 @@ GLOBAL_LIST_EMPTY(possible_items_special)
|
|||||||
explanation_text = "Capture [target_amount] lifeform\s with an energy net. Live, rare specimens are worth more."
|
explanation_text = "Capture [target_amount] lifeform\s with an energy net. Live, rare specimens are worth more."
|
||||||
return target_amount
|
return target_amount
|
||||||
|
|
||||||
|
/datum/objective/capture/update_explanation_text()
|
||||||
|
. = ..()
|
||||||
|
explanation_text = "Capture [target_amount] lifeform\s with an energy net. Live, rare specimens are worth more."
|
||||||
|
|
||||||
/datum/objective/capture/check_completion()//Basically runs through all the mobs in the area to determine how much they are worth.
|
/datum/objective/capture/check_completion()//Basically runs through all the mobs in the area to determine how much they are worth.
|
||||||
/*var/area/centcom/holding/A = GLOB.areas_by_type[/area/centcom/holding]
|
/*var/area/centcom/holding/A = GLOB.areas_by_type[/area/centcom/holding]
|
||||||
for(var/mob/living/carbon/human/M in A)//Humans.
|
for(var/mob/living/carbon/human/M in A)//Humans.
|
||||||
@@ -576,10 +657,16 @@ GLOBAL_LIST_EMPTY(possible_items_special)
|
|||||||
captured_amount+=2*/ //Removed in favour of adding points on capture, in energy_net_nets.dm
|
captured_amount+=2*/ //Removed in favour of adding points on capture, in energy_net_nets.dm
|
||||||
return captured_amount >= target_amount
|
return captured_amount >= target_amount
|
||||||
|
|
||||||
|
/datum/objective/capture/admin_edit(mob/admin)
|
||||||
|
var/count = input(admin,"How many mobs to capture ?","capture",target_amount) as num|null
|
||||||
|
if(count)
|
||||||
|
target_amount = count
|
||||||
|
update_explanation_text()
|
||||||
|
|
||||||
//Changeling Objectives
|
//Changeling Objectives
|
||||||
|
|
||||||
/datum/objective/absorb
|
/datum/objective/absorb
|
||||||
|
name = "absorb"
|
||||||
|
|
||||||
/datum/objective/absorb/proc/gen_amount_goal(lowbound = 4, highbound = 6)
|
/datum/objective/absorb/proc/gen_amount_goal(lowbound = 4, highbound = 6)
|
||||||
target_amount = rand (lowbound,highbound)
|
target_amount = rand (lowbound,highbound)
|
||||||
@@ -595,9 +682,19 @@ GLOBAL_LIST_EMPTY(possible_items_special)
|
|||||||
n_p ++
|
n_p ++
|
||||||
target_amount = min(target_amount, n_p)
|
target_amount = min(target_amount, n_p)
|
||||||
|
|
||||||
explanation_text = "Extract [target_amount] compatible genome\s."
|
update_explanation_text()
|
||||||
return target_amount
|
return target_amount
|
||||||
|
|
||||||
|
/datum/objective/absorb/update_explanation_text()
|
||||||
|
. = ..()
|
||||||
|
explanation_text = "Extract [target_amount] compatible genome\s."
|
||||||
|
|
||||||
|
/datum/objective/absorb/admin_edit(mob/admin)
|
||||||
|
var/count = input(admin,"How many people to absorb?","absorb",target_amount) as num|null
|
||||||
|
if(count)
|
||||||
|
target_amount = count
|
||||||
|
update_explanation_text()
|
||||||
|
|
||||||
/datum/objective/absorb/check_completion()
|
/datum/objective/absorb/check_completion()
|
||||||
var/list/datum/mind/owners = get_owners()
|
var/list/datum/mind/owners = get_owners()
|
||||||
var/absorbedcount = 0
|
var/absorbedcount = 0
|
||||||
@@ -611,6 +708,7 @@ GLOBAL_LIST_EMPTY(possible_items_special)
|
|||||||
return absorbedcount >= target_amount
|
return absorbedcount >= target_amount
|
||||||
|
|
||||||
/datum/objective/absorb_most
|
/datum/objective/absorb_most
|
||||||
|
name = "absorb most"
|
||||||
explanation_text = "Extract more compatible genomes than any other Changeling."
|
explanation_text = "Extract more compatible genomes than any other Changeling."
|
||||||
|
|
||||||
/datum/objective/absorb_most/check_completion()
|
/datum/objective/absorb_most/check_completion()
|
||||||
@@ -631,6 +729,7 @@ GLOBAL_LIST_EMPTY(possible_items_special)
|
|||||||
return TRUE
|
return TRUE
|
||||||
|
|
||||||
/datum/objective/absorb_changeling
|
/datum/objective/absorb_changeling
|
||||||
|
name = "absorb changeling"
|
||||||
explanation_text = "Absorb another Changeling."
|
explanation_text = "Absorb another Changeling."
|
||||||
|
|
||||||
/datum/objective/absorb_changeling/check_completion()
|
/datum/objective/absorb_changeling/check_completion()
|
||||||
@@ -653,6 +752,7 @@ GLOBAL_LIST_EMPTY(possible_items_special)
|
|||||||
//End Changeling Objectives
|
//End Changeling Objectives
|
||||||
|
|
||||||
/datum/objective/destroy
|
/datum/objective/destroy
|
||||||
|
name = "destroy AI"
|
||||||
martyr_compatible = 1
|
martyr_compatible = 1
|
||||||
|
|
||||||
/datum/objective/destroy/find_target()
|
/datum/objective/destroy/find_target()
|
||||||
@@ -674,10 +774,20 @@ GLOBAL_LIST_EMPTY(possible_items_special)
|
|||||||
else
|
else
|
||||||
explanation_text = "Free Objective"
|
explanation_text = "Free Objective"
|
||||||
|
|
||||||
|
/datum/objective/destroy/admin_edit(mob/admin)
|
||||||
|
var/list/possible_targets = active_ais(1)
|
||||||
|
if(possible_targets.len)
|
||||||
|
var/mob/new_target = input(admin,"Select target:", "Objective target") as null|anything in possible_targets
|
||||||
|
target = new_target.mind
|
||||||
|
else
|
||||||
|
to_chat(admin, "No active AIs with minds")
|
||||||
|
update_explanation_text()
|
||||||
|
|
||||||
/datum/objective/destroy/internal
|
/datum/objective/destroy/internal
|
||||||
var/stolen = FALSE //Have we already eliminated this target?
|
var/stolen = FALSE //Have we already eliminated this target?
|
||||||
|
|
||||||
/datum/objective/steal_five_of_type
|
/datum/objective/steal_five_of_type
|
||||||
|
name = "steal five of"
|
||||||
explanation_text = "Steal at least five items!"
|
explanation_text = "Steal at least five items!"
|
||||||
var/list/wanted_items = list(/obj/item)
|
var/list/wanted_items = list(/obj/item)
|
||||||
|
|
||||||
@@ -686,10 +796,12 @@ GLOBAL_LIST_EMPTY(possible_items_special)
|
|||||||
wanted_items = typecacheof(wanted_items)
|
wanted_items = typecacheof(wanted_items)
|
||||||
|
|
||||||
/datum/objective/steal_five_of_type/summon_guns
|
/datum/objective/steal_five_of_type/summon_guns
|
||||||
|
name = "steal guns"
|
||||||
explanation_text = "Steal at least five guns!"
|
explanation_text = "Steal at least five guns!"
|
||||||
wanted_items = list(/obj/item/gun)
|
wanted_items = list(/obj/item/gun)
|
||||||
|
|
||||||
/datum/objective/steal_five_of_type/summon_magic
|
/datum/objective/steal_five_of_type/summon_magic
|
||||||
|
name = "steal magic"
|
||||||
explanation_text = "Steal at least five magical artefacts!"
|
explanation_text = "Steal at least five magical artefacts!"
|
||||||
wanted_items = list(/obj/item/spellbook, /obj/item/gun/magic, /obj/item/clothing/suit/space/hardsuit/wizard, /obj/item/scrying, /obj/item/antag_spawner/contract, /obj/item/necromantic_stone)
|
wanted_items = list(/obj/item/spellbook, /obj/item/gun/magic, /obj/item/clothing/suit/space/hardsuit/wizard, /obj/item/scrying, /obj/item/antag_spawner/contract, /obj/item/necromantic_stone)
|
||||||
|
|
||||||
@@ -705,6 +817,14 @@ GLOBAL_LIST_EMPTY(possible_items_special)
|
|||||||
stolen_count++
|
stolen_count++
|
||||||
return stolen_count >= 5
|
return stolen_count >= 5
|
||||||
|
|
||||||
|
//Created by admin tools
|
||||||
|
/datum/objective/custom
|
||||||
|
name = "custom"
|
||||||
|
|
||||||
|
/datum/objective/custom/admin_edit(mob/admin)
|
||||||
|
var/expl = stripped_input(admin, "Custom objective:", "Objective", explanation_text)
|
||||||
|
if(expl)
|
||||||
|
explanation_text = expl
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
// Changeling team objectives //
|
// Changeling team objectives //
|
||||||
|
|||||||
@@ -370,15 +370,13 @@
|
|||||||
O.find_target()
|
O.find_target()
|
||||||
O.update_explanation_text()
|
O.update_explanation_text()
|
||||||
if(!(O.target))
|
if(!(O.target))
|
||||||
O.owner.objectives -= O
|
|
||||||
qdel(O)
|
qdel(O)
|
||||||
|
|
||||||
if(mob_occupant.mind && mob_occupant.mind.assigned_role)
|
if(mob_occupant.mind)
|
||||||
//Handle job slot/tater cleanup.
|
//Handle job slot/tater cleanup.
|
||||||
|
if(mob_occupant.mind.assigned_role)
|
||||||
var/job = mob_occupant.mind.assigned_role
|
var/job = mob_occupant.mind.assigned_role
|
||||||
SSjob.FreeRole(job)
|
SSjob.FreeRole(job)
|
||||||
if(mob_occupant.mind.objectives.len)
|
|
||||||
mob_occupant.mind.objectives.Cut()
|
|
||||||
mob_occupant.mind.special_role = null
|
mob_occupant.mind.special_role = null
|
||||||
|
|
||||||
// Delete them from datacore.
|
// Delete them from datacore.
|
||||||
|
|||||||
@@ -96,7 +96,6 @@ GLOBAL_LIST_EMPTY(antagonists)
|
|||||||
LAZYREMOVE(owner.antag_datums, src)
|
LAZYREMOVE(owner.antag_datums, src)
|
||||||
if(!silent && owner.current)
|
if(!silent && owner.current)
|
||||||
farewell()
|
farewell()
|
||||||
owner.objectives -= objectives
|
|
||||||
var/datum/team/team = get_team()
|
var/datum/team/team = get_team()
|
||||||
if(team)
|
if(team)
|
||||||
team.remove_member(owner)
|
team.remove_member(owner)
|
||||||
@@ -132,14 +131,14 @@ GLOBAL_LIST_EMPTY(antagonists)
|
|||||||
report += printplayer(owner)
|
report += printplayer(owner)
|
||||||
|
|
||||||
var/objectives_complete = TRUE
|
var/objectives_complete = TRUE
|
||||||
if(owner.objectives.len)
|
if(objectives.len)
|
||||||
report += printobjectives(owner)
|
report += printobjectives(objectives)
|
||||||
for(var/datum/objective/objective in owner.objectives)
|
for(var/datum/objective/objective in objectives)
|
||||||
if(!objective.check_completion())
|
if(!objective.check_completion())
|
||||||
objectives_complete = FALSE
|
objectives_complete = FALSE
|
||||||
break
|
break
|
||||||
|
|
||||||
if(owner.objectives.len == 0 || objectives_complete)
|
if(objectives.len == 0 || objectives_complete)
|
||||||
report += "<span class='greentext big'>The [name] was successful!</span>"
|
report += "<span class='greentext big'>The [name] was successful!</span>"
|
||||||
else
|
else
|
||||||
report += "<span class='redtext big'>The [name] has failed!</span>"
|
report += "<span class='redtext big'>The [name] has failed!</span>"
|
||||||
@@ -216,25 +215,6 @@ GLOBAL_LIST_EMPTY(antagonists)
|
|||||||
return
|
return
|
||||||
antag_memory = new_memo
|
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
|
//This one is created by admin tools for custom objectives
|
||||||
/datum/antagonist/custom
|
/datum/antagonist/custom
|
||||||
antagpanel_category = "Custom"
|
antagpanel_category = "Custom"
|
||||||
|
|||||||
@@ -30,7 +30,6 @@
|
|||||||
var/datum/objective/blob_takeover/main = new
|
var/datum/objective/blob_takeover/main = new
|
||||||
main.owner = owner
|
main.owner = owner
|
||||||
objectives += main
|
objectives += main
|
||||||
owner.objectives |= objectives
|
|
||||||
|
|
||||||
/datum/antagonist/blob/apply_innate_effects(mob/living/mob_override)
|
/datum/antagonist/blob/apply_innate_effects(mob/living/mob_override)
|
||||||
if(!isovermind(owner.current))
|
if(!isovermind(owner.current))
|
||||||
|
|||||||
33
code/modules/antagonists/blood_contract/blood_contract.dm
Normal file
33
code/modules/antagonists/blood_contract/blood_contract.dm
Normal file
@@ -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)
|
for(var/O in directives)
|
||||||
var/datum/objective/brainwashing/objective = new(O)
|
var/datum/objective/brainwashing/objective = new(O)
|
||||||
B.objectives += objective
|
B.objectives += objective
|
||||||
M.objectives += objective
|
|
||||||
B.greet()
|
B.greet()
|
||||||
else
|
else
|
||||||
B = new()
|
B = new()
|
||||||
@@ -32,10 +31,6 @@
|
|||||||
antagpanel_category = "Other"
|
antagpanel_category = "Other"
|
||||||
show_name_in_check_antagonists = TRUE
|
show_name_in_check_antagonists = TRUE
|
||||||
|
|
||||||
/datum/antagonist/brainwashed/on_gain()
|
|
||||||
owner.objectives |= objectives
|
|
||||||
. = ..()
|
|
||||||
|
|
||||||
/datum/antagonist/brainwashed/greet()
|
/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, "<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>")
|
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()
|
/datum/antagonist/brother/on_gain()
|
||||||
SSticker.mode.brothers += owner
|
SSticker.mode.brothers += owner
|
||||||
objectives += team.objectives
|
objectives += team.objectives
|
||||||
owner.objectives += objectives
|
|
||||||
owner.special_role = special_role
|
owner.special_role = special_role
|
||||||
finalize_brother()
|
finalize_brother()
|
||||||
return ..()
|
return ..()
|
||||||
|
|||||||
@@ -459,8 +459,6 @@
|
|||||||
objectives += identity_theft
|
objectives += identity_theft
|
||||||
escape_objective_possible = FALSE
|
escape_objective_possible = FALSE
|
||||||
|
|
||||||
owner.objectives |= objectives
|
|
||||||
|
|
||||||
/datum/antagonist/changeling/proc/update_changeling_icons_added()
|
/datum/antagonist/changeling/proc/update_changeling_icons_added()
|
||||||
var/datum/atom_hud/antag/hud = GLOB.huds[ANTAG_HUD_CHANGELING]
|
var/datum/atom_hud/antag/hud = GLOB.huds[ANTAG_HUD_CHANGELING]
|
||||||
hud.join_hud(owner.current)
|
hud.join_hud(owner.current)
|
||||||
|
|||||||
@@ -35,7 +35,6 @@
|
|||||||
|
|
||||||
/datum/antagonist/cult/proc/add_objectives()
|
/datum/antagonist/cult/proc/add_objectives()
|
||||||
objectives |= cult_team.objectives
|
objectives |= cult_team.objectives
|
||||||
owner.objectives |= objectives
|
|
||||||
|
|
||||||
/datum/antagonist/cult/Destroy()
|
/datum/antagonist/cult/Destroy()
|
||||||
QDEL_NULL(communion)
|
QDEL_NULL(communion)
|
||||||
|
|||||||
@@ -549,7 +549,7 @@ GLOBAL_LIST_INIT(devil_suffix, list(" the Red", " the Soulless", " the Master",
|
|||||||
var/list/parts = list()
|
var/list/parts = list()
|
||||||
parts += printplayer(owner)
|
parts += printplayer(owner)
|
||||||
parts += printdevilinfo()
|
parts += printdevilinfo()
|
||||||
parts += printobjectives(owner)
|
parts += printobjectives(objectives)
|
||||||
return parts.Join("<br>")
|
return parts.Join("<br>")
|
||||||
|
|
||||||
//A simple super light weight datum for the codex gigas.
|
//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>")
|
visible_message("<span class='danger'>[src] screams in agony as it sublimates into a sulfurous smoke.</span>")
|
||||||
ghostize()
|
ghostize()
|
||||||
qdel(src)
|
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)
|
if(ascended || user.mind.soulOwner == src.mind)
|
||||||
var/mob/living/simple_animal/imp/S = new(get_turf(loc))
|
var/mob/living/simple_animal/imp/S = new(get_turf(loc))
|
||||||
user.transfer_ckey(S, FALSE)
|
user.transfer_ckey(S, FALSE)
|
||||||
S.mind.assigned_role = "Imp"
|
var/datum/antagonist/imp/A = new()
|
||||||
S.mind.special_role = "Imp"
|
S.mind.add_antag_datum(A)
|
||||||
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]")
|
|
||||||
else
|
else
|
||||||
return ..()
|
return ..()
|
||||||
|
|
||||||
|
|||||||
@@ -10,12 +10,10 @@
|
|||||||
var/datum/objective/O = new /datum/objective/disease_infect()
|
var/datum/objective/O = new /datum/objective/disease_infect()
|
||||||
O.owner = owner
|
O.owner = owner
|
||||||
objectives += O
|
objectives += O
|
||||||
owner.objectives += O
|
|
||||||
|
|
||||||
O = new /datum/objective/disease_infect_centcom()
|
O = new /datum/objective/disease_infect_centcom()
|
||||||
O.owner = owner
|
O.owner = owner
|
||||||
objectives += O
|
objectives += O
|
||||||
owner.objectives += O
|
|
||||||
|
|
||||||
. = ..()
|
. = ..()
|
||||||
|
|
||||||
|
|||||||
@@ -113,7 +113,6 @@
|
|||||||
/datum/antagonist/ert/proc/forge_objectives()
|
/datum/antagonist/ert/proc/forge_objectives()
|
||||||
if(ert_team)
|
if(ert_team)
|
||||||
objectives |= ert_team.objectives
|
objectives |= ert_team.objectives
|
||||||
owner.objectives |= objectives
|
|
||||||
|
|
||||||
/datum/antagonist/ert/proc/equipERT()
|
/datum/antagonist/ert/proc/equipERT()
|
||||||
var/mob/living/carbon/human/H = owner.current
|
var/mob/living/carbon/human/H = owner.current
|
||||||
|
|||||||
@@ -8,7 +8,6 @@
|
|||||||
O.completed = TRUE //YES!
|
O.completed = TRUE //YES!
|
||||||
O.owner = owner
|
O.owner = owner
|
||||||
objectives += O
|
objectives += O
|
||||||
owner.objectives += objectives
|
|
||||||
|
|
||||||
/datum/antagonist/greentext/on_gain()
|
/datum/antagonist/greentext/on_gain()
|
||||||
forge_objectives()
|
forge_objectives()
|
||||||
|
|||||||
@@ -24,8 +24,6 @@
|
|||||||
hijack_objective.owner = owner
|
hijack_objective.owner = owner
|
||||||
objectives += hijack_objective
|
objectives += hijack_objective
|
||||||
|
|
||||||
owner.objectives |= objectives
|
|
||||||
|
|
||||||
/datum/antagonist/highlander/on_gain()
|
/datum/antagonist/highlander/on_gain()
|
||||||
forge_objectives()
|
forge_objectives()
|
||||||
owner.special_role = "highlander"
|
owner.special_role = "highlander"
|
||||||
|
|||||||
9
code/modules/antagonists/magic_servant/magic_servant.dm
Normal file
9
code/modules/antagonists/magic_servant/magic_servant.dm
Normal file
@@ -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()
|
/datum/antagonist/monkey/proc/forge_objectives()
|
||||||
objectives |= monkey_team.objectives
|
objectives |= monkey_team.objectives
|
||||||
owner.objectives |= objectives
|
|
||||||
|
|
||||||
/datum/antagonist/monkey/admin_remove(mob/admin)
|
/datum/antagonist/monkey/admin_remove(mob/admin)
|
||||||
var/mob/living/carbon/monkey/M = owner.current
|
var/mob/living/carbon/monkey/M = owner.current
|
||||||
|
|||||||
@@ -96,7 +96,6 @@
|
|||||||
var/datum/objective/O = new /datum/objective/survive()
|
var/datum/objective/O = new /datum/objective/survive()
|
||||||
O.owner = owner
|
O.owner = owner
|
||||||
objectives += O
|
objectives += O
|
||||||
owner.objectives |= objectives
|
|
||||||
|
|
||||||
/proc/remove_ninja(mob/living/L)
|
/proc/remove_ninja(mob/living/L)
|
||||||
if(!L || !L.mind)
|
if(!L || !L.mind)
|
||||||
|
|||||||
@@ -87,7 +87,7 @@
|
|||||||
|
|
||||||
/datum/antagonist/nukeop/proc/forge_objectives()
|
/datum/antagonist/nukeop/proc/forge_objectives()
|
||||||
if(nuke_team)
|
if(nuke_team)
|
||||||
owner.objectives |= nuke_team.objectives
|
objectives |= nuke_team.objectives
|
||||||
|
|
||||||
/datum/antagonist/nukeop/proc/move_to_spawnpoint()
|
/datum/antagonist/nukeop/proc/move_to_spawnpoint()
|
||||||
var/team_number = 1
|
var/team_number = 1
|
||||||
|
|||||||
@@ -36,8 +36,6 @@
|
|||||||
missionobj.completed = 1
|
missionobj.completed = 1
|
||||||
mission = missionobj
|
mission = missionobj
|
||||||
objectives |= mission
|
objectives |= mission
|
||||||
owner.objectives |= objectives
|
|
||||||
|
|
||||||
|
|
||||||
/datum/antagonist/official/on_gain()
|
/datum/antagonist/official/on_gain()
|
||||||
forge_objectives()
|
forge_objectives()
|
||||||
|
|||||||
@@ -26,7 +26,6 @@
|
|||||||
// Sets objectives, equips all antags with the storage implant.
|
// Sets objectives, equips all antags with the storage implant.
|
||||||
/datum/antagonist/overthrow/on_gain()
|
/datum/antagonist/overthrow/on_gain()
|
||||||
objectives += team.objectives
|
objectives += team.objectives
|
||||||
owner.objectives += objectives
|
|
||||||
..()
|
..()
|
||||||
owner.announce_objectives()
|
owner.announce_objectives()
|
||||||
equip_overthrow()
|
equip_overthrow()
|
||||||
@@ -34,7 +33,6 @@
|
|||||||
|
|
||||||
/datum/antagonist/overthrow/on_removal()
|
/datum/antagonist/overthrow/on_removal()
|
||||||
owner.special_role = null
|
owner.special_role = null
|
||||||
owner.objectives -= objectives
|
|
||||||
..()
|
..()
|
||||||
|
|
||||||
// Creates the overthrow team, or sets it. The objectives are static for all the team members.
|
// Creates the overthrow team, or sets it. The objectives are static for all the team members.
|
||||||
|
|||||||
@@ -35,7 +35,9 @@
|
|||||||
objectives += heads_obj
|
objectives += heads_obj
|
||||||
for(var/i in members)
|
for(var/i in members)
|
||||||
var/datum/mind/M = i
|
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()
|
heads_obj.find_targets()
|
||||||
|
|
||||||
addtimer(CALLBACK(src,.proc/update_objectives),OBJECTIVE_UPDATING_TIME,TIMER_UNIQUE)
|
addtimer(CALLBACK(src,.proc/update_objectives),OBJECTIVE_UPDATING_TIME,TIMER_UNIQUE)
|
||||||
|
|||||||
@@ -31,12 +31,7 @@
|
|||||||
|
|
||||||
/datum/antagonist/pirate/on_gain()
|
/datum/antagonist/pirate/on_gain()
|
||||||
if(crew)
|
if(crew)
|
||||||
owner.objectives |= crew.objectives
|
objectives |= crew.objectives
|
||||||
. = ..()
|
|
||||||
|
|
||||||
/datum/antagonist/pirate/on_removal()
|
|
||||||
if(crew)
|
|
||||||
owner.objectives -= crew.objectives
|
|
||||||
. = ..()
|
. = ..()
|
||||||
|
|
||||||
/datum/team/pirate
|
/datum/team/pirate
|
||||||
@@ -53,7 +48,9 @@
|
|||||||
getbooty.update_explanation_text()
|
getbooty.update_explanation_text()
|
||||||
objectives += getbooty
|
objectives += getbooty
|
||||||
for(var/datum/mind/M in members)
|
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
|
/datum/objective/loot
|
||||||
|
|||||||
@@ -14,8 +14,6 @@
|
|||||||
objective2.owner = owner
|
objective2.owner = owner
|
||||||
objectives += objective2
|
objectives += objective2
|
||||||
|
|
||||||
owner.objectives |= objectives
|
|
||||||
|
|
||||||
/datum/antagonist/revenant/on_gain()
|
/datum/antagonist/revenant/on_gain()
|
||||||
forge_objectives()
|
forge_objectives()
|
||||||
. = ..()
|
. = ..()
|
||||||
|
|||||||
@@ -66,10 +66,10 @@
|
|||||||
return rev_team
|
return rev_team
|
||||||
|
|
||||||
/datum/antagonist/rev/proc/create_objectives()
|
/datum/antagonist/rev/proc/create_objectives()
|
||||||
owner.objectives |= rev_team.objectives
|
objectives |= rev_team.objectives
|
||||||
|
|
||||||
/datum/antagonist/rev/proc/remove_objectives()
|
/datum/antagonist/rev/proc/remove_objectives()
|
||||||
owner.objectives -= rev_team.objectives
|
objectives -= rev_team.objectives
|
||||||
|
|
||||||
//Bump up to head_rev
|
//Bump up to head_rev
|
||||||
/datum/antagonist/rev/proc/promote()
|
/datum/antagonist/rev/proc/promote()
|
||||||
@@ -265,7 +265,8 @@
|
|||||||
new_target.update_explanation_text()
|
new_target.update_explanation_text()
|
||||||
objectives += new_target
|
objectives += new_target
|
||||||
for(var/datum/mind/M in members)
|
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)
|
addtimer(CALLBACK(src,.proc/update_objectives),HEAD_UPDATE_PERIOD,TIMER_UNIQUE)
|
||||||
|
|
||||||
|
|||||||
29
code/modules/antagonists/santa/santa.dm
Normal file
29
code/modules/antagonists/santa/santa.dm
Normal file
@@ -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":""]."
|
new_objective2.explanation_text = "[objective_verb] everyone[summoner ? " else while you're at it":""]."
|
||||||
objectives += new_objective2
|
objectives += new_objective2
|
||||||
|
|
||||||
owner.objectives |= objectives
|
|
||||||
|
|
||||||
/datum/antagonist/slaughter/laughter
|
/datum/antagonist/slaughter/laughter
|
||||||
name = "Laughter demon"
|
name = "Laughter demon"
|
||||||
objective_verb = "Hug and Tickle"
|
objective_verb = "Hug and Tickle"
|
||||||
@@ -8,7 +8,6 @@
|
|||||||
var/datum/objective/survive/survive = new
|
var/datum/objective/survive/survive = new
|
||||||
survive.owner = owner
|
survive.owner = owner
|
||||||
objectives += survive
|
objectives += survive
|
||||||
owner.objectives |= objectives
|
|
||||||
|
|
||||||
/datum/antagonist/survivalist/on_gain()
|
/datum/antagonist/survivalist/on_gain()
|
||||||
owner.special_role = "survivalist"
|
owner.special_role = "survivalist"
|
||||||
|
|||||||
@@ -78,8 +78,7 @@
|
|||||||
scan_target = null
|
scan_target = null
|
||||||
if(owner)
|
if(owner)
|
||||||
if(owner.mind)
|
if(owner.mind)
|
||||||
if(owner.mind.objectives)
|
for(var/datum/objective/objective_ in owner.mind.get_all_objectives())
|
||||||
for(var/datum/objective/objective_ in owner.mind.objectives)
|
|
||||||
if(!is_internal_objective(objective_))
|
if(!is_internal_objective(objective_))
|
||||||
continue
|
continue
|
||||||
var/datum/objective/assassinate/internal/objective = objective_
|
var/datum/objective/assassinate/internal/objective = objective_
|
||||||
@@ -100,9 +99,9 @@
|
|||||||
return (istype(O, /datum/objective/assassinate/internal)||istype(O, /datum/objective/destroy/internal))
|
return (istype(O, /datum/objective/assassinate/internal)||istype(O, /datum/objective/destroy/internal))
|
||||||
|
|
||||||
/datum/antagonist/traitor/proc/replace_escape_objective()
|
/datum/antagonist/traitor/proc/replace_escape_objective()
|
||||||
if(!owner||!owner.objectives)
|
if(!owner || !objectives.len)
|
||||||
return
|
return
|
||||||
for (var/objective_ in owner.objectives)
|
for (var/objective_ in objectives)
|
||||||
if(!(istype(objective_, /datum/objective/escape)||istype(objective_, /datum/objective/survive)))
|
if(!(istype(objective_, /datum/objective/escape)||istype(objective_, /datum/objective/survive)))
|
||||||
continue
|
continue
|
||||||
remove_objective(objective_)
|
remove_objective(objective_)
|
||||||
@@ -112,9 +111,9 @@
|
|||||||
add_objective(martyr_objective)
|
add_objective(martyr_objective)
|
||||||
|
|
||||||
/datum/antagonist/traitor/proc/reinstate_escape_objective()
|
/datum/antagonist/traitor/proc/reinstate_escape_objective()
|
||||||
if(!owner||!owner.objectives)
|
if(!owner||!objectives.len)
|
||||||
return
|
return
|
||||||
for (var/objective_ in owner.objectives)
|
for (var/objective_ in objectives)
|
||||||
if(!istype(objective_, /datum/objective/martyr))
|
if(!istype(objective_, /datum/objective/martyr))
|
||||||
continue
|
continue
|
||||||
remove_objective(objective_)
|
remove_objective(objective_)
|
||||||
@@ -131,7 +130,7 @@
|
|||||||
return
|
return
|
||||||
to_chat(owner.current, "<span class='userdanger'> Target eliminated: [victim.name]</span>")
|
to_chat(owner.current, "<span class='userdanger'> Target eliminated: [victim.name]</span>")
|
||||||
LAZYINITLIST(targets_stolen)
|
LAZYINITLIST(targets_stolen)
|
||||||
for(var/objective_ in victim.objectives)
|
for(var/objective_ in victim.get_all_objectives())
|
||||||
if(istype(objective_, /datum/objective/assassinate/internal))
|
if(istype(objective_, /datum/objective/assassinate/internal))
|
||||||
var/datum/objective/assassinate/internal/objective = objective_
|
var/datum/objective/assassinate/internal/objective = objective_
|
||||||
if(objective.target==owner)
|
if(objective.target==owner)
|
||||||
@@ -159,7 +158,7 @@
|
|||||||
var/status_text = objective.check_completion() ? "neutralised" : "active"
|
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>")
|
to_chat(owner.current, "<span class='userdanger'> New target added to database: [objective.target.name] ([status_text]) </span>")
|
||||||
last_man_standing = TRUE
|
last_man_standing = TRUE
|
||||||
for(var/objective_ in owner.objectives)
|
for(var/objective_ in objectives)
|
||||||
if(!is_internal_objective(objective_))
|
if(!is_internal_objective(objective_))
|
||||||
continue
|
continue
|
||||||
var/datum/objective/assassinate/internal/objective = objective_
|
var/datum/objective/assassinate/internal/objective = objective_
|
||||||
@@ -175,7 +174,7 @@
|
|||||||
|
|
||||||
/datum/antagonist/traitor/internal_affairs/proc/iaa_process()
|
/datum/antagonist/traitor/internal_affairs/proc/iaa_process()
|
||||||
if(owner&&owner.current&&owner.current.stat!=DEAD)
|
if(owner&&owner.current&&owner.current.stat!=DEAD)
|
||||||
for(var/objective_ in owner.objectives)
|
for(var/objective_ in objectives)
|
||||||
if(!is_internal_objective(objective_))
|
if(!is_internal_objective(objective_))
|
||||||
continue
|
continue
|
||||||
var/datum/objective/assassinate/internal/objective = objective_
|
var/datum/objective/assassinate/internal/objective = objective_
|
||||||
|
|||||||
@@ -55,12 +55,10 @@
|
|||||||
owner.special_role = null
|
owner.special_role = null
|
||||||
..()
|
..()
|
||||||
|
|
||||||
/datum/antagonist/traitor/proc/add_objective(var/datum/objective/O)
|
/datum/antagonist/traitor/proc/add_objective(datum/objective/O)
|
||||||
owner.objectives += O
|
|
||||||
objectives += O
|
objectives += O
|
||||||
|
|
||||||
/datum/antagonist/traitor/proc/remove_objective(var/datum/objective/O)
|
/datum/antagonist/traitor/proc/remove_objective(datum/objective/O)
|
||||||
owner.objectives -= O
|
|
||||||
objectives -= O
|
objectives -= O
|
||||||
|
|
||||||
/datum/antagonist/traitor/proc/forge_traitor_objectives()
|
/datum/antagonist/traitor/proc/forge_traitor_objectives()
|
||||||
@@ -89,7 +87,7 @@
|
|||||||
forge_single_objective()
|
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(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
|
var/datum/objective/hijack/hijack_objective = new
|
||||||
hijack_objective.owner = owner
|
hijack_objective.owner = owner
|
||||||
add_objective(hijack_objective)
|
add_objective(hijack_objective)
|
||||||
@@ -97,7 +95,7 @@
|
|||||||
|
|
||||||
|
|
||||||
var/martyr_compatibility = 1 //You can't succeed in stealing if you're dead.
|
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)
|
if(!O.martyr_compatible)
|
||||||
martyr_compatibility = 0
|
martyr_compatibility = 0
|
||||||
break
|
break
|
||||||
@@ -109,7 +107,7 @@
|
|||||||
return
|
return
|
||||||
|
|
||||||
else
|
else
|
||||||
if(!(locate(/datum/objective/escape) in owner.objectives))
|
if(!(locate(/datum/objective/escape) in objectives))
|
||||||
var/datum/objective/escape/escape_objective = new
|
var/datum/objective/escape/escape_objective = new
|
||||||
escape_objective.owner = owner
|
escape_objective.owner = owner
|
||||||
add_objective(escape_objective)
|
add_objective(escape_objective)
|
||||||
@@ -159,7 +157,7 @@
|
|||||||
kill_objective.find_target()
|
kill_objective.find_target()
|
||||||
add_objective(kill_objective)
|
add_objective(kill_objective)
|
||||||
else
|
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
|
var/datum/objective/download/download_objective = new
|
||||||
download_objective.owner = owner
|
download_objective.owner = owner
|
||||||
download_objective.gen_amount_goal()
|
download_objective.gen_amount_goal()
|
||||||
|
|||||||
@@ -9,7 +9,6 @@
|
|||||||
var/datum/objective/martyr/normiesgetout = new
|
var/datum/objective/martyr/normiesgetout = new
|
||||||
normiesgetout.owner = owner
|
normiesgetout.owner = owner
|
||||||
objectives += normiesgetout
|
objectives += normiesgetout
|
||||||
owner.objectives += objectives
|
|
||||||
|
|
||||||
/datum/antagonist/heartbreaker/on_gain()
|
/datum/antagonist/heartbreaker/on_gain()
|
||||||
forge_objectives()
|
forge_objectives()
|
||||||
|
|||||||
@@ -12,7 +12,6 @@
|
|||||||
protect_objective.human_check = FALSE
|
protect_objective.human_check = FALSE
|
||||||
protect_objective.explanation_text = "Protect [date.name], your date."
|
protect_objective.explanation_text = "Protect [date.name], your date."
|
||||||
objectives += protect_objective
|
objectives += protect_objective
|
||||||
owner.objectives += objectives
|
|
||||||
|
|
||||||
/datum/antagonist/valentine/on_gain()
|
/datum/antagonist/valentine/on_gain()
|
||||||
forge_objectives()
|
forge_objectives()
|
||||||
@@ -34,8 +33,8 @@
|
|||||||
//Squashed up a bit
|
//Squashed up a bit
|
||||||
/datum/antagonist/valentine/roundend_report()
|
/datum/antagonist/valentine/roundend_report()
|
||||||
var/objectives_complete = TRUE
|
var/objectives_complete = TRUE
|
||||||
if(owner.objectives.len)
|
if(objectives.len)
|
||||||
for(var/datum/objective/objective in owner.objectives)
|
for(var/datum/objective/objective in objectives)
|
||||||
if(!objective.check_completion())
|
if(!objective.check_completion())
|
||||||
objectives_complete = FALSE
|
objectives_complete = FALSE
|
||||||
break
|
break
|
||||||
@@ -51,8 +50,8 @@
|
|||||||
|
|
||||||
/datum/antagonist/valentine/chem/roundend_report()
|
/datum/antagonist/valentine/chem/roundend_report()
|
||||||
var/objectives_complete = TRUE
|
var/objectives_complete = TRUE
|
||||||
if(owner.objectives.len)
|
if(objectives.len)
|
||||||
for(var/datum/objective/objective in owner.objectives)
|
for(var/datum/objective/objective in objectives)
|
||||||
if(!objective.check_completion())
|
if(!objective.check_completion())
|
||||||
objectives_complete = FALSE
|
objectives_complete = FALSE
|
||||||
break
|
break
|
||||||
|
|||||||
@@ -8,7 +8,6 @@
|
|||||||
var/datum/objective/hijack/hijack = new
|
var/datum/objective/hijack/hijack = new
|
||||||
hijack.owner = owner
|
hijack.owner = owner
|
||||||
objectives += hijack
|
objectives += hijack
|
||||||
owner.objectives |= objectives
|
|
||||||
|
|
||||||
/datum/antagonist/wishgranter/on_gain()
|
/datum/antagonist/wishgranter/on_gain()
|
||||||
owner.special_role = "Avatar of the Wish Granter"
|
owner.special_role = "Avatar of the Wish Granter"
|
||||||
|
|||||||
@@ -57,20 +57,20 @@
|
|||||||
if(!GLOB.wizardstart.len)
|
if(!GLOB.wizardstart.len)
|
||||||
SSjob.SendToLateJoin(owner.current)
|
SSjob.SendToLateJoin(owner.current)
|
||||||
to_chat(owner, "HOT INSERTION, GO GO GO")
|
to_chat(owner, "HOT INSERTION, GO GO GO")
|
||||||
|
else
|
||||||
owner.current.forceMove(pick(GLOB.wizardstart))
|
owner.current.forceMove(pick(GLOB.wizardstart))
|
||||||
|
|
||||||
/datum/antagonist/wizard/proc/create_objectives()
|
/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.")
|
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
|
new_objective.owner = owner
|
||||||
objectives += new_objective
|
objectives += new_objective
|
||||||
|
|
||||||
|
if (!(locate(/datum/objective/escape) in objectives))
|
||||||
var/datum/objective/escape/escape_objective = new
|
var/datum/objective/escape/escape_objective = new
|
||||||
escape_objective.owner = owner
|
escape_objective.owner = owner
|
||||||
objectives += escape_objective
|
objectives += escape_objective
|
||||||
|
|
||||||
for(var/datum/objective/O in objectives)
|
|
||||||
owner.objectives += O
|
|
||||||
|
|
||||||
/datum/antagonist/wizard/on_removal()
|
/datum/antagonist/wizard/on_removal()
|
||||||
unregister()
|
unregister()
|
||||||
owner.RemoveAllSpells() // TODO keep track which spells are wizard spells which innate stuff
|
owner.RemoveAllSpells() // TODO keep track which spells are wizard spells which innate stuff
|
||||||
@@ -183,7 +183,6 @@
|
|||||||
new_objective.owner = owner
|
new_objective.owner = owner
|
||||||
new_objective.target = master
|
new_objective.target = master
|
||||||
new_objective.explanation_text = "Protect [master.current.real_name], the wizard."
|
new_objective.explanation_text = "Protect [master.current.real_name], the wizard."
|
||||||
owner.objectives += new_objective
|
|
||||||
objectives += new_objective
|
objectives += new_objective
|
||||||
|
|
||||||
//Random event wizard
|
//Random event wizard
|
||||||
@@ -251,7 +250,6 @@
|
|||||||
/datum/antagonist/wizard/academy/create_objectives()
|
/datum/antagonist/wizard/academy/create_objectives()
|
||||||
var/datum/objective/new_objective = new("Protect Wizard Academy from the intruders")
|
var/datum/objective/new_objective = new("Protect Wizard Academy from the intruders")
|
||||||
new_objective.owner = owner
|
new_objective.owner = owner
|
||||||
owner.objectives += new_objective
|
|
||||||
objectives += new_objective
|
objectives += new_objective
|
||||||
|
|
||||||
//Solo wizard report
|
//Solo wizard report
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
var/faction = null
|
var/faction = null
|
||||||
var/permanent = FALSE //If true, the spawner will not disappear upon running out of uses.
|
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/random = FALSE //Don't set a name or gender, just go random
|
||||||
|
var/antagonist_type
|
||||||
var/objectives = null
|
var/objectives = null
|
||||||
var/uses = 1 //how many times can we spawn from it. set to -1 for infinite.
|
var/uses = 1 //how many times can we spawn from it. set to -1 for infinite.
|
||||||
var/brute_damage = 0
|
var/brute_damage = 0
|
||||||
@@ -111,9 +112,16 @@
|
|||||||
if(show_flavour)
|
if(show_flavour)
|
||||||
to_chat(M, "[flavour_text]")
|
to_chat(M, "[flavour_text]")
|
||||||
var/datum/mind/MM = M.mind
|
var/datum/mind/MM = M.mind
|
||||||
|
var/datum/antagonist/A
|
||||||
|
if(antagonist_type)
|
||||||
|
A = MM.add_antag_datum(antagonist_type)
|
||||||
if(objectives)
|
if(objectives)
|
||||||
|
if(!A)
|
||||||
|
A = MM.add_antag_datum(/datum/antagonist/custom)
|
||||||
for(var/objective in objectives)
|
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)
|
if(assignedrole)
|
||||||
M.mind.assigned_role = assignedrole
|
M.mind.assigned_role = assignedrole
|
||||||
special(M, name)
|
special(M, name)
|
||||||
|
|||||||
@@ -264,8 +264,9 @@
|
|||||||
var/mob/living/carbon/human/H = new(drop_location())
|
var/mob/living/carbon/human/H = new(drop_location())
|
||||||
H.equipOutfit(/datum/outfit/butler)
|
H.equipOutfit(/datum/outfit/butler)
|
||||||
var/datum/mind/servant_mind = new /datum/mind()
|
var/datum/mind/servant_mind = new /datum/mind()
|
||||||
var/datum/objective/O = new("Serve [user.real_name].")
|
var/datum/antagonist/magic_servant/A = new
|
||||||
servant_mind.objectives += O
|
servant_mind.add_antag_datum(A)
|
||||||
|
A.setup_master(user)
|
||||||
servant_mind.transfer_to(H)
|
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)
|
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))
|
santa = new /mob/living/carbon/human(pick(GLOB.blobstart))
|
||||||
C.transfer_ckey(santa, FALSE)
|
C.transfer_ckey(santa, FALSE)
|
||||||
|
|
||||||
santa.equipOutfit(/datum/outfit/santa)
|
var/datum/antagonist/santa/A = new
|
||||||
santa.update_icons()
|
santa.mind.add_antag_datum(A)
|
||||||
|
|
||||||
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>")
|
|
||||||
|
|||||||
@@ -40,7 +40,8 @@
|
|||||||
|
|
||||||
/obj/item/greentext/equipped(mob/living/user as mob)
|
/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>")
|
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>")
|
to_chat(user, "<span class='warning'>... so long as you still perform your other objectives that is!</span>")
|
||||||
new_holder = user
|
new_holder = user
|
||||||
if(!last_holder)
|
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>")
|
message_admins("<span class='adminnotice'>[ADMIN_LOOKUPFLW(L)] has been marked for death by [ADMIN_LOOKUPFLW(user)]!</span>")
|
||||||
|
|
||||||
var/datum/objective/survive/survive = new
|
var/datum/antagonist/blood_contract/A = new
|
||||||
survive.owner = L.mind
|
L.mind.add_antag_datum(A)
|
||||||
L.mind.objectives += survive
|
|
||||||
log_combat(user, L, "took out a blood contract on", src)
|
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)
|
qdel(src)
|
||||||
|
|
||||||
//Colossus
|
//Colossus
|
||||||
|
|||||||
@@ -864,7 +864,7 @@ GLOBAL_VAR_INIT(exploit_warn_spam_prevention, 0)
|
|||||||
replace_identification_name(oldname,newname)
|
replace_identification_name(oldname,newname)
|
||||||
|
|
||||||
for(var/datum/mind/T in SSticker.minds)
|
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
|
// Only update if this player is a target
|
||||||
if(obj.target && obj.target.current && obj.target.current.real_name == name)
|
if(obj.target && obj.target.current && obj.target.current.real_name == name)
|
||||||
obj.update_explanation_text()
|
obj.update_explanation_text()
|
||||||
|
|||||||
@@ -1204,6 +1204,7 @@
|
|||||||
#include "code\modules\antagonists\blob\blob\blobs\node.dm"
|
#include "code\modules\antagonists\blob\blob\blobs\node.dm"
|
||||||
#include "code\modules\antagonists\blob\blob\blobs\resource.dm"
|
#include "code\modules\antagonists\blob\blob\blobs\resource.dm"
|
||||||
#include "code\modules\antagonists\blob\blob\blobs\shield.dm"
|
#include "code\modules\antagonists\blob\blob\blobs\shield.dm"
|
||||||
|
#include "code\modules\antagonists\blood_contract\blood_contract.dm"
|
||||||
#include "code\modules\antagonists\brainwashing\brainwashing.dm"
|
#include "code\modules\antagonists\brainwashing\brainwashing.dm"
|
||||||
#include "code\modules\antagonists\brother\brother.dm"
|
#include "code\modules\antagonists\brother\brother.dm"
|
||||||
#include "code\modules\antagonists\changeling\cellular_emporium.dm"
|
#include "code\modules\antagonists\changeling\cellular_emporium.dm"
|
||||||
@@ -1314,6 +1315,7 @@
|
|||||||
#include "code\modules\antagonists\greentext\greentext.dm"
|
#include "code\modules\antagonists\greentext\greentext.dm"
|
||||||
#include "code\modules\antagonists\greybois\greybois.dm"
|
#include "code\modules\antagonists\greybois\greybois.dm"
|
||||||
#include "code\modules\antagonists\highlander\highlander.dm"
|
#include "code\modules\antagonists\highlander\highlander.dm"
|
||||||
|
#include "code\modules\antagonists\magic_servant\magic_servant.dm"
|
||||||
#include "code\modules\antagonists\monkey\monkey.dm"
|
#include "code\modules\antagonists\monkey\monkey.dm"
|
||||||
#include "code\modules\antagonists\morph\morph.dm"
|
#include "code\modules\antagonists\morph\morph.dm"
|
||||||
#include "code\modules\antagonists\morph\morph_antag.dm"
|
#include "code\modules\antagonists\morph\morph_antag.dm"
|
||||||
@@ -1335,6 +1337,7 @@
|
|||||||
#include "code\modules\antagonists\revenant\revenant_blight.dm"
|
#include "code\modules\antagonists\revenant\revenant_blight.dm"
|
||||||
#include "code\modules\antagonists\revenant\revenant_spawn_event.dm"
|
#include "code\modules\antagonists\revenant\revenant_spawn_event.dm"
|
||||||
#include "code\modules\antagonists\revolution\revolution.dm"
|
#include "code\modules\antagonists\revolution\revolution.dm"
|
||||||
|
#include "code\modules\antagonists\santa\santa.dm"
|
||||||
#include "code\modules\antagonists\separatist\separatist.dm"
|
#include "code\modules\antagonists\separatist\separatist.dm"
|
||||||
#include "code\modules\antagonists\slaughter\slaughter.dm"
|
#include "code\modules\antagonists\slaughter\slaughter.dm"
|
||||||
#include "code\modules\antagonists\slaughter\slaughter_antag.dm"
|
#include "code\modules\antagonists\slaughter\slaughter_antag.dm"
|
||||||
|
|||||||
Reference in New Issue
Block a user