From 889f8ddb06410365173b047d88676a15af188387 Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Mon, 16 Apr 2018 17:17:28 -0400 Subject: [PATCH 1/2] Merge pull request #37229 from vuonojenmustaturska/centcommission Add team objective support to the centcom antag datum --- code/modules/antagonists/official/official.dm | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/code/modules/antagonists/official/official.dm b/code/modules/antagonists/official/official.dm index 37260c3303..4b867585ae 100644 --- a/code/modules/antagonists/official/official.dm +++ b/code/modules/antagonists/official/official.dm @@ -3,10 +3,14 @@ show_name_in_check_antagonists = TRUE show_in_antagpanel = FALSE var/datum/objective/mission + var/datum/team/ert/ert_team /datum/antagonist/official/greet() to_chat(owner, "You are a CentCom Official.") - to_chat(owner, "Central Command is sending you to [station_name()] with the task: [mission.explanation_text]") + if (ert_team) + to_chat(owner, "Central Command is sending you to [station_name()] with the task: [ert_team.mission.explanation_text]") + else + to_chat(owner, "Central Command is sending you to [station_name()] with the task: [mission.explanation_text]") /datum/antagonist/official/proc/equip_official() var/mob/living/carbon/human/H = owner.current @@ -17,17 +21,24 @@ if(CONFIG_GET(flag/enforce_human_authority)) H.set_species(/datum/species/human) +/datum/antagonist/official/create_team(datum/team/new_team) + if(istype(new_team)) + ert_team = new_team + /datum/antagonist/official/proc/forge_objectives() - if(!mission) + if (ert_team) + objectives |= ert_team.objectives + else if (!mission) var/datum/objective/missionobj = new missionobj.owner = owner missionobj.explanation_text = "Conduct a routine preformance review of [station_name()] and its Captain." missionobj.completed = 1 mission = missionobj - objectives |= mission + objectives |= mission owner.objectives |= objectives + /datum/antagonist/official/on_gain() forge_objectives() . = ..() - equip_official() \ No newline at end of file + equip_official()