[MIRROR] Create ERT refactor (#5924)
* Create ERT refactor (#36321) cl Naksu admin: ERT creation has been refactored to allow for easier customization and deployment via templates and settings /cl * Create ERT refactor
This commit is contained in:
committed by
Poojawa
parent
6a65ed49d0
commit
c91006c27f
@@ -6,8 +6,10 @@
|
||||
/datum/antagonist/ert
|
||||
name = "Emergency Response Officer"
|
||||
var/datum/team/ert/ert_team
|
||||
var/role = ERT_SEC
|
||||
var/high_alert = FALSE
|
||||
var/leader = FALSE
|
||||
var/datum/outfit/outfit = /datum/outfit/ert/security
|
||||
var/role = "Security Officer"
|
||||
var/list/name_source
|
||||
show_in_antagpanel = FALSE
|
||||
antag_moodlet = /datum/mood_event/focused
|
||||
|
||||
@@ -20,25 +22,76 @@
|
||||
/datum/antagonist/ert/get_team()
|
||||
return ert_team
|
||||
|
||||
/datum/antagonist/ert/New()
|
||||
. = ..()
|
||||
name_source = GLOB.last_names
|
||||
|
||||
/datum/antagonist/ert/proc/update_name()
|
||||
var/new_name
|
||||
switch(role)
|
||||
if(ERT_ENG)
|
||||
new_name = "Engineer [pick(GLOB.last_names)]"
|
||||
if(ERT_MED)
|
||||
new_name = "Medical Officer [pick(GLOB.last_names)]"
|
||||
if(ERT_SEC)
|
||||
new_name = "Security Officer [pick(GLOB.last_names)]"
|
||||
if(ERT_LEADER)
|
||||
new_name = "Commander [pick(GLOB.last_names)]"
|
||||
name = "Emergency Response Commander"
|
||||
if(DEATHSQUAD)
|
||||
new_name = "Trooper [pick(GLOB.commando_names)]"
|
||||
name = "Deathsquad Trooper"
|
||||
if(DEATHSQUAD_LEADER)
|
||||
new_name = "Officer [pick(GLOB.commando_names)]"
|
||||
name = "Deathsquad Officer"
|
||||
owner.current.fully_replace_character_name(owner.current.real_name,new_name)
|
||||
owner.current.fully_replace_character_name(owner.current.real_name,"[role] [pick(name_source)]")
|
||||
|
||||
/datum/antagonist/ert/deathsquad/New()
|
||||
. = ..()
|
||||
name_source = GLOB.commando_names
|
||||
|
||||
/datum/antagonist/ert/security // kinda handled by the base template but here for completion
|
||||
|
||||
/datum/antagonist/ert/security/red
|
||||
outfit = /datum/outfit/ert/security/alert
|
||||
|
||||
/datum/antagonist/ert/engineer
|
||||
role = "Engineer"
|
||||
outfit = /datum/outfit/ert/engineer
|
||||
|
||||
/datum/antagonist/ert/engineer/red
|
||||
outfit = /datum/outfit/ert/engineer/alert
|
||||
|
||||
/datum/antagonist/ert/medic
|
||||
role = "Medical Officer"
|
||||
outfit = /datum/outfit/ert/medic
|
||||
|
||||
/datum/antagonist/ert/medic/red
|
||||
outfit = /datum/outfit/ert/medic/alert
|
||||
|
||||
/datum/antagonist/ert/commander
|
||||
role = "Commander"
|
||||
outfit = /datum/outfit/ert/commander
|
||||
|
||||
/datum/antagonist/ert/commander/red
|
||||
outfit = /datum/outfit/ert/commander/alert
|
||||
|
||||
/datum/antagonist/ert/deathsquad
|
||||
name = "Deathsquad Trooper"
|
||||
outfit = /datum/outfit/death_commando
|
||||
role = "Trooper"
|
||||
|
||||
/datum/antagonist/ert/medic/inquisitor
|
||||
outfit = /datum/outfit/ert/medic/inquisitor
|
||||
|
||||
/datum/antagonist/ert/security/inquisitor
|
||||
outfit = /datum/outfit/ert/security/inquisitor
|
||||
|
||||
/datum/antagonist/ert/chaplain
|
||||
role = "Chaplain"
|
||||
outfit = /datum/outfit/ert/chaplain
|
||||
|
||||
/datum/antagonist/ert/chaplain/inquisitor
|
||||
outfit = /datum/outfit/ert/chaplain/inquisitor
|
||||
|
||||
/datum/antagonist/ert/chaplain/on_gain()
|
||||
. = ..()
|
||||
owner.isholy = TRUE
|
||||
|
||||
/datum/antagonist/ert/commander/inquisitor
|
||||
outfit = /datum/outfit/ert/commander/inquisitor
|
||||
|
||||
/datum/antagonist/ert/commander/inquisitor/on_gain()
|
||||
. = ..()
|
||||
owner.isholy = TRUE
|
||||
|
||||
/datum/antagonist/ert/deathsquad/leader
|
||||
name = "Deathsquad Officer"
|
||||
outfit = /datum/outfit/death_commando
|
||||
role = "Officer"
|
||||
|
||||
/datum/antagonist/ert/create_team(datum/team/ert/new_team)
|
||||
if(istype(new_team))
|
||||
@@ -53,28 +106,12 @@
|
||||
var/mob/living/carbon/human/H = owner.current
|
||||
if(!istype(H))
|
||||
return
|
||||
var/outfit
|
||||
switch(role)
|
||||
if(ERT_LEADER)
|
||||
outfit = high_alert ? /datum/outfit/ert/commander/alert : /datum/outfit/ert/commander
|
||||
if(ERT_ENG)
|
||||
outfit = high_alert ? /datum/outfit/ert/engineer/alert : /datum/outfit/ert/engineer
|
||||
if(ERT_MED)
|
||||
outfit = high_alert ? /datum/outfit/ert/medic/alert : /datum/outfit/ert/medic
|
||||
if(ERT_SEC)
|
||||
outfit = high_alert ? /datum/outfit/ert/security/alert : /datum/outfit/ert/security
|
||||
if(DEATHSQUAD)
|
||||
outfit = /datum/outfit/death_commando/officer
|
||||
if(DEATHSQUAD_LEADER)
|
||||
outfit = /datum/outfit/death_commando
|
||||
H.equipOutfit(outfit)
|
||||
|
||||
/datum/antagonist/ert/greet()
|
||||
if(!ert_team)
|
||||
return
|
||||
|
||||
var/leader = role == ERT_LEADER || role == DEATHSQUAD_LEADER
|
||||
|
||||
to_chat(owner, "<B><font size=3 color=red>You are the [name].</font></B>")
|
||||
|
||||
var/missiondesc = "Your squad is being sent on a mission to [station_name()] by Nanotrasen's Security Division."
|
||||
@@ -82,8 +119,23 @@
|
||||
missiondesc += " Lead your squad to ensure the completion of the mission. Board the shuttle when your team is ready."
|
||||
else
|
||||
missiondesc += " Follow orders given to you by your squad leader."
|
||||
if(role != DEATHSQUAD && role != DEATHSQUAD_LEADER)
|
||||
|
||||
missiondesc += "Avoid civilian casualites when possible."
|
||||
|
||||
missiondesc += "<BR><B>Your Mission</B> : [ert_team.mission.explanation_text]"
|
||||
to_chat(owner,missiondesc)
|
||||
|
||||
/datum/antagonist/ert/deathsquad/greet()
|
||||
if(!ert_team)
|
||||
return
|
||||
|
||||
to_chat(owner, "<B><font size=3 color=red>You are the [name].</font></B>")
|
||||
|
||||
var/missiondesc = "Your squad is being sent on a mission to [station_name()] by Nanotrasen's Security Division."
|
||||
if(leader) //If Squad Leader
|
||||
missiondesc += " Lead your squad to ensure the completion of the mission. Board the shuttle when your team is ready."
|
||||
else
|
||||
missiondesc += " Follow orders given to you by your squad leader."
|
||||
|
||||
missiondesc += "<BR><B>Your Mission</B> : [ert_team.mission.explanation_text]"
|
||||
to_chat(owner,missiondesc)
|
||||
|
||||
Reference in New Issue
Block a user