Skip to content

Commit

Permalink
antag + job fluff (#1207)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kapu1178 authored Feb 13, 2025
1 parent 3cc8b97 commit 4e04925
Show file tree
Hide file tree
Showing 13 changed files with 73 additions and 26 deletions.
2 changes: 1 addition & 1 deletion code/modules/admin/verbs/ert.dm
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@
ert_operative.mind.set_assigned_role(SSjob.GetJobType(ert_antag.ert_job_path))

//Logging and cleanup
log_game("[key_name(ert_operative)] has been selected as an [ert_antag.name]")
log_game("[key_name(ert_operative)] has been selected as [ert_antag.get_name()]")
numagents--
teamSpawned++

Expand Down
42 changes: 35 additions & 7 deletions code/modules/antagonists/_common/antag_datum.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ GLOBAL_LIST_EMPTY(antagonists)
/datum/antagonist
///Public name for this antagonist. Appears for player prompts and round-end reports.
var/name = "\improper Antagonist"
/// Prefix before the "name"
var/name_prefix = "a"

/// LORE AND MECHANICAL INFO THINHIGGGESS
var/description = "This role has no defined description, so probably no lore implications."

///Section of roundend report, datums with same category will be displayed together, also default header for the section
var/roundend_category = "other antagonists"
///Set to false to hide the antagonists from roundend report
Expand Down Expand Up @@ -192,7 +198,7 @@ GLOBAL_LIST_EMPTY(antagonists)
/datum/antagonist/proc/replace_banned_player()
set waitfor = FALSE

var/list/mob/dead/observer/candidates = poll_candidates_for_mob("Do you want to play as a [name]?", "[name]", job_rank, 5 SECONDS, owner.current)
var/list/mob/dead/observer/candidates = poll_candidates_for_mob("Do you want to play as [get_name()]?", "[get_name(TRUE)]", job_rank, 5 SECONDS, owner.current)
if(LAZYLEN(candidates))
var/mob/dead/observer/C = pick(candidates)
to_chat(owner, "Your mob has been taken over by a ghost! Appeal your job ban if you want to avoid this in the future!")
Expand Down Expand Up @@ -236,28 +242,50 @@ GLOBAL_LIST_EMPTY(antagonists)
log_game("ANTAGS: [key_name(owner.current)] lost their [type].")
qdel(src)

/// Returns the name including the prefix if there is one.
/datum/antagonist/proc/get_name(capitalize = FALSE)
if(name_prefix)
return "[capitalize ? capitalize(name_prefix) : name_prefix] [name]"
return name

/**
* Proc that sends fluff or instructional messages to the player when they are given this antag datum.
* Use this proc for playing sounds, sending alerts, or helping to setup non-gameplay influencing aspects of the antagonist type.
*/
/datum/antagonist/proc/greet()
var/list/greeting = "[greeting_header()]<br>[jointext(build_greeting(), "<br>")]"
var/list/greeting = list(
greeting_header(),
)

var/greeting_body = jointext(build_greeting(), "<br>")
if(greeting_body)
greeting += greeting_body

if(length(objectives))
if(greeting_body)
greeting += "<br><br>"

greeting += "You have the following objectives:<br>"

var/list/objective_strings = list()
var/objective_tally = 0
for(var/datum/objective/O as anything in objectives)
objective_tally++
objective_strings += "<b>[objective_tally].) [O.objective_name]</b>: [O.explanation_text]"
objective_strings += "[FOURSPACES]<b>[objective_tally].) [O.objective_name]</b>: [O.explanation_text]"

greeting += jointext(objective_strings, "<br><br>")

if(length(greeting) > 1)
greeting.Insert(2, "<hr>")

to_chat(owner.current, examine_block(jointext(greeting, "")))

/datum/antagonist/proc/greeting_header()
return "<u><span style='font-size: 200%'>You are the [span_alert("[src]")]</span></u>"
var/list/out = list()
out += "<div style='font-size: 200%;text-align: center'>You are [name_prefix ? "[name_prefix] " : ""][span_alert(name)]</div>"
if(description)
out += "<div style='text-align: center'>[description]</div>"
return jointext(out, "")

/// Builds a list of strings to print out in greet().
/datum/antagonist/proc/build_greeting()
Expand All @@ -269,7 +297,7 @@ GLOBAL_LIST_EMPTY(antagonists)
* Use this proc for playing sounds, sending alerts, or otherwise informing the player that they're no longer a specific antagonist type.
*/
/datum/antagonist/proc/farewell()
to_chat(owner.current, span_userdanger("You are no longer \the [src]!"))
to_chat(owner.current, span_userdanger("You are no longer [get_name()]!"))
owner.announce_objectives()

/**
Expand Down Expand Up @@ -327,8 +355,8 @@ GLOBAL_LIST_EMPTY(antagonists)

///Called when using admin tools to give antag status
/datum/antagonist/proc/admin_add(datum/mind/new_owner,mob/admin)
message_admins("[key_name_admin(admin)] made [key_name_admin(new_owner)] into [name].")
log_admin("[key_name(admin)] made [key_name(new_owner)] into [name].")
message_admins("[key_name_admin(admin)] made [key_name_admin(new_owner)] into [get_name()].")
log_admin("[key_name(admin)] made [key_name(new_owner)] into [get_name()].")
new_owner.add_antag_datum(src)

///Called when removing antagonist using admin tools
Expand Down
4 changes: 3 additions & 1 deletion code/modules/antagonists/abductor/abductor.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
GLOBAL_LIST_INIT(possible_abductor_names, list("Alpha","Beta","Gamma","Delta","Epsilon","Zeta","Eta","Theta","Iota","Kappa","Lambda","Mu","Nu","Xi","Omicron","Pi","Rho","Sigma","Tau","Upsilon","Phi","Chi","Psi","Omega"))

/datum/antagonist/abductor
name = "\improper Abductor"
name = "Abductor"
name_prefix = "an"

roundend_category = "abductors"
antagpanel_category = "Abductor"
job_rank = ROLE_ABDUCTOR
Expand Down
3 changes: 2 additions & 1 deletion code/modules/antagonists/brother/brother.dm
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/datum/antagonist/brother
name = "\improper Brother"
name = "Blood Brother"

antagpanel_category = "Brother"
job_rank = ROLE_BROTHER
var/special_role = ROLE_BROTHER
Expand Down
12 changes: 6 additions & 6 deletions code/modules/antagonists/changeling/changeling.dm
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
#define FORMAT_CHEM_CHARGES_TEXT(charges) MAPTEXT("<div align='center' valign='middle' style='position:relative; top:0px; left:6px'><font color='#dd66dd'>[round(charges)]</font></div>")

/datum/antagonist/changeling
name = "\improper Changeling"
name = "Changeling"

roundend_category = "changelings"
antagpanel_category = "Changeling"
job_rank = ROLE_CHANGELING
Expand Down Expand Up @@ -865,7 +866,10 @@

// Changelings spawned from non-changeling headslugs (IE, due to being transformed into a headslug as a non-ling). Weaker than a normal changeling.
/datum/antagonist/changeling/headslug
name = "\improper Headslug Changeling"
name = "Headslug Changeling"
name_prefix = "a"
description = "You are a fresh changeling birthed from a headslug! You aren't as strong as a normal changeling, as you are newly born."

show_in_antagpanel = FALSE
give_objectives = FALSE
soft_antag = TRUE
Expand All @@ -881,10 +885,6 @@
if(policy)
to_chat(owner, policy)

/datum/antagonist/changeling/headslug/build_greeting()
. = ..()
. += "You are a fresh changeling birthed from a headslug! You aren't as strong as a normal changeling, as you are newly born."

/datum/outfit/changeling
name = "Changeling"

Expand Down
4 changes: 4 additions & 0 deletions code/modules/antagonists/cult/cult.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

/datum/antagonist/cult
name = "Cultist"

roundend_category = "cultists"
antagpanel_category = "Cult"
suicide_cry = "FOR NAR'SIE!!"
Expand Down Expand Up @@ -197,6 +198,9 @@
qdel(o)

/datum/antagonist/cult/master
name = "Cult Leader"
name_prefix = "the"

ignore_implant = TRUE
show_in_antagpanel = FALSE //Feel free to add this later
hud_icon = 'icons/mob/huds/antag_hud.dmi'
Expand Down
4 changes: 2 additions & 2 deletions code/modules/antagonists/ert/ert.dm
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@
if(!ert_team)
return

to_chat(owner, "<span class='warningplain'><B><font size=3 color=red>You are the [name].</font></B></span>")
to_chat(owner, "<span class='warningplain'><B><font size=3 color=red>You are [get_name()].</font></B></span>")

var/missiondesc = "Your squad is being sent on a mission to [station_name()] by Nanotrasen's Security Division."
if(leader) //If Squad Leader
Expand Down Expand Up @@ -316,7 +316,7 @@


/datum/antagonist/ert/families/undercover_cop/greet()
var/missiondesc = "<span class='warningplain'><B><font size=3 color=red>You are the [name].</font></B>"
var/missiondesc = "<span class='warningplain'><B><font size=3 color=red>You are [get_name()].</font></B>"
missiondesc += "<BR><B><font size=3 color=red>You are NOT a Nanotrasen Employee. You work for the local government.</font></B>"
missiondesc += "<BR>You are an undercover police officer on board [station_name()]. You've been sent here by the Spinward Stellar Coalition because of suspected abusive behavior by the security department, and to keep tabs on a potential criminal organization operation."
missiondesc += "<BR><B>Your Mission</B>:"
Expand Down
6 changes: 4 additions & 2 deletions code/modules/antagonists/revolution/revolution.dm
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
#define HEAD_UPDATE_PERIOD 300

/datum/antagonist/rev
name = "\improper Mutineer"
name = "Mutineer"
name_prefix = "a"
description = "Help your cause. Do not harm your fellow freedom fighters. You can identify them using memorized <span class='blue'>code words</span>. Help them destroy the government to win the revolution!"

roundend_category = "mutineers" // if by some miracle revolutionaries without revolution happen
antagpanel_category = "Revolution"
job_rank = ROLE_REV
Expand Down Expand Up @@ -57,7 +60,6 @@

/datum/antagonist/rev/build_greeting()
. = ..()
. += "Help your cause. Do not harm your fellow freedom fighters. You can identify them using memorized <span class='blue'>code words</span>. Help them destroy the government to win the revolution!"
. += "Your companions have devised this list of words to identify eachother: <span class='blue'>[jointext(GLOB.revolution_code_phrase, ", ")]</span>"

/datum/antagonist/rev/create_team(datum/team/revolution/new_team)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/antagonists/traitor/datum_traitor.dm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/datum/antagonist/traitor
name = "\improper Traitor"
name = "Traitor"
roundend_category = "traitors"
antagpanel_category = "Traitor"
job_rank = ROLE_TRAITOR
Expand Down
8 changes: 6 additions & 2 deletions code/modules/antagonists/vampire/vampire.dm
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
/datum/antagonist/vampire
name = "\improper Sanguine Plague Victim"
name = "Afflicted"
name_prefix = "an"
description = "You are infected with the Sanguine Plague, and have developed supernatural abilities alongside a thirst for human blood."

roundend_category = "vampires"
antagpanel_category = "Vampire"
job_rank = ROLE_VAMPIRE
antag_hud_name = "traitor"
antag_hud_name = "vampire"
ui_name = null

/// The thirst!
var/datum/point_holder/thirst_level = 0
Expand Down
10 changes: 8 additions & 2 deletions code/modules/jobs/job_types/_job.dm
Original file line number Diff line number Diff line change
Expand Up @@ -606,9 +606,15 @@ GLOBAL_LIST_INIT(job_display_order, list(

/// Called by SSjob when a player joins the round as this job.
/datum/job/proc/on_join_message(client/C, job_title_pref)
var/job_header = "<u><span style='font-size: 200%'>You are the <span style='color:[selection_color]'>[job_title_pref]</span></span></u>."
var/completed_title = "<span style='color:[selection_color]'>[job_title_pref]</span>"
var/prefix
if(spawn_positions == 1)
prefix = "the"
else
prefix = (uppertext(title[1]) in GLOB.vowels_upper) ? "an" : "a"

var/job_info = list("<br><br>[description]")
var/job_header = "<div style='font-size: 200%;text-align: center'>You are [prefix] [completed_title]</div>"
var/job_info = list("<hr>[description]")

if(supervisors)
job_info += "<br><br>As the <span style='color:[selection_color]'>[job_title_pref == title ? job_title_pref : "[job_title_pref] ([title])"]</span> \
Expand Down
Binary file modified icons/mob/huds/antag_hud.dmi
Binary file not shown.
2 changes: 1 addition & 1 deletion modular_pariah/modules/cryosleep/code/cryopod.dm
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ GLOBAL_LIST_EMPTY(cryopod_computers)
tgui_alert(target, "You're an important role! [AHELP_FIRST_MESSAGE]")
var/datum/antagonist/antag = target.mind.has_antag_datum(/datum/antagonist)
if(antag)
tgui_alert(target, "You're \a [antag.name]! [AHELP_FIRST_MESSAGE]")
tgui_alert(target, "You're [antag.get_name()]! [AHELP_FIRST_MESSAGE]")

if(!istype(target) || !can_interact(user) || !target.Adjacent(user) || !ismob(target) || isanimal(target) || !istype(user.loc, /turf) || target.buckled)
return
Expand Down

0 comments on commit 4e04925

Please sign in to comment.