From 13709a7d348891f9f91111ad2d53458894658eb3 Mon Sep 17 00:00:00 2001 From: CitadelStationBot Date: Sat, 17 Mar 2018 05:23:21 -0500 Subject: [PATCH] [MIRROR] Simple xeno antagonist (#5961) * Simple xeno antagonist * Merge pull request #36397 from AnturK/xeno_antag Simple xeno antagonist --- code/datums/mind.dm | 5 ---- code/modules/antagonists/xeno/xeno.dm | 37 +++++++++++++++++++++++++++ tgstation.dme | 1 + 3 files changed, 38 insertions(+), 5 deletions(-) create mode 100644 code/modules/antagonists/xeno/xeno.dm diff --git a/code/datums/mind.dm b/code/datums/mind.dm index 45152ee8b4..fff0db4c92 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -813,11 +813,6 @@ if(!mind.assigned_role) mind.assigned_role = "Unassigned" //default -//XENO -/mob/living/carbon/alien/mind_initialize() - ..() - mind.special_role = ROLE_ALIEN - //AI /mob/living/silicon/ai/mind_initialize() ..() diff --git a/code/modules/antagonists/xeno/xeno.dm b/code/modules/antagonists/xeno/xeno.dm new file mode 100644 index 0000000000..b8f9927bc4 --- /dev/null +++ b/code/modules/antagonists/xeno/xeno.dm @@ -0,0 +1,37 @@ +/datum/team/xeno + name = "Aliens" + +//Simply lists them. +/datum/team/xeno/roundend_report() + var/list/parts = list() + parts += "The [name] were:" + parts += printplayerlist(members) + return "
[parts.Join("
")]
" + +/datum/antagonist/xeno + name = "Xenomorph" + job_rank = ROLE_ALIEN + show_in_antagpanel = FALSE + var/datum/team/xeno/xeno_team + +/datum/antagonist/xeno/create_team(datum/team/xeno/new_team) + if(!new_team) + for(var/datum/antagonist/xeno/X in GLOB.antagonists) + if(!X.owner || !X.xeno_team) + continue + xeno_team = X.xeno_team + return + xeno_team = new + else + if(!istype(new_team)) + CRASH("Wrong xeno team type provided to create_team") + xeno_team = new_team + +/datum/antagonist/xeno/get_team() + return xeno_team + +//XENO +/mob/living/carbon/alien/mind_initialize() + ..() + if(!mind.has_antag_datum(/datum/antagonist/xeno)) + mind.add_antag_datum(/datum/antagonist/xeno) \ No newline at end of file diff --git a/tgstation.dme b/tgstation.dme index 295a352612..b8e037701f 100755 --- a/tgstation.dme +++ b/tgstation.dme @@ -1238,6 +1238,7 @@ #include "code\modules\antagonists\wizard\equipment\artefact.dm" #include "code\modules\antagonists\wizard\equipment\soulstone.dm" #include "code\modules\antagonists\wizard\equipment\spellbook.dm" +#include "code\modules\antagonists\xeno\xeno.dm" #include "code\modules\assembly\assembly.dm" #include "code\modules\assembly\bomb.dm" #include "code\modules\assembly\doorcontrol.dm"