mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-17 11:05:16 +01:00
Alternative job titles in the Occupations screen actually used in-game (#9420)
* Added alt jobs names actually doing something. * Also add late join announcements. * Fix custom roles showing up first in crew monitor * Cleanup to match upstream changes * Updates from review, also improve both tgui manifests * Compromise for Skyrat edit notes vs JSX vs linter * Compromise for optimization vs not making a horrible mess of passing client around * Follow module rules * Revert no longer true changed to customization readme * Update dme * Fixed comments for alt titles
This commit is contained in:
@@ -516,17 +516,22 @@ SUBSYSTEM_DEF(job)
|
||||
|
||||
//Gives the player the stuff he should have with his rank
|
||||
/datum/controller/subsystem/job/proc/EquipRank(mob/living/equipping, datum/job/job, client/player_client)
|
||||
// SKYRAT EDIT ADDITION BEGIN - ALTERNATIVE_JOB_TITLES
|
||||
// The alt job title, if user picked one, or the default
|
||||
var/chosen_title = player_client?.prefs.alt_job_titles[job.title] || job.title
|
||||
// SKYRAT EDIT ADDITION END - ALTERNATIVE_JOB_TITLES
|
||||
|
||||
equipping.job = job.title
|
||||
|
||||
SEND_SIGNAL(equipping, COMSIG_JOB_RECEIVED, job)
|
||||
|
||||
equipping.mind?.set_assigned_role(job)
|
||||
if(player_client)
|
||||
to_chat(player_client, span_infoplain("You are the [job.title]."))
|
||||
to_chat(player_client, span_infoplain("You are the [chosen_title].")) // SKYRAT EDIT CHANGE - ALTERNATIVE_JOB_TITLES - Original: to_chat(player_client, span_infoplain("You are the [job.title]."))
|
||||
|
||||
equipping.on_job_equipping(job, player_client?.prefs) //SKYRAT EDIT CHANGE
|
||||
|
||||
job.announce_job(equipping)
|
||||
job.announce_job(equipping, chosen_title) // SKYRAT EDIT CHANGE - ALTERNATIVE_JOB_TITLES - Original: job.announce_job(equipping)
|
||||
|
||||
if(player_client?.holder)
|
||||
if(CONFIG_GET(flag/auto_deadmin_players) || (player_client.prefs?.toggles & DEADMIN_ALWAYS))
|
||||
@@ -536,7 +541,7 @@ SUBSYSTEM_DEF(job)
|
||||
|
||||
|
||||
if(player_client)
|
||||
to_chat(player_client, span_infoplain("As the [job.title] you answer directly to [job.supervisors]. Special circumstances may change this.")) // SKYRAT EDIT ORIGINAL
|
||||
to_chat(player_client, span_infoplain("As the [chosen_title == job.title ? chosen_title : "[chosen_title] ([job.title])"] you answer directly to [job.supervisors]. Special circumstances may change this.")) // SKYRAT EDIT CHANGE - ALTERNATIVE_JOB_TITLES - Original: to_chat(player_client, span_infoplain("As the [job.title] you answer directly to [job.supervisors]. Special circumstances may change this."))
|
||||
|
||||
job.radio_help_message(equipping)
|
||||
|
||||
@@ -554,6 +559,7 @@ SUBSYSTEM_DEF(job)
|
||||
var/mob/living/carbon/human/wageslave = equipping
|
||||
wageslave.mind.add_memory(MEMORY_ACCOUNT, list(DETAIL_ACCOUNT_ID = wageslave.account_id), story_value = STORY_VALUE_SHIT, memory_flags = MEMORY_FLAG_NOLOCATION)
|
||||
|
||||
setup_alt_job_items(wageslave, job, player_client) // SKYRAT EDIT ADDITION - ALTERNATIVE_JOB_TITLES
|
||||
|
||||
job.after_spawn(equipping, player_client)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user