From 419edc710d2ee919b26835650284812710e721d2 Mon Sep 17 00:00:00 2001 From: Vera Aguilera Puerto <6766154+Zumorica@users.noreply.github.com> Date: Wed, 6 Oct 2021 13:51:11 +0200 Subject: [PATCH] Various improvements to job greetings. (#4777) --- Content.Server/Roles/Job.cs | 12 +++++++++++- Content.Shared/Roles/JobPrototype.cs | 9 +++++++++ Resources/Locale/en-US/job/job.ftl | 5 +++++ .../Prototypes/Roles/Jobs/Cargo/cargo_technician.yml | 1 + .../Prototypes/Roles/Jobs/Cargo/quartermaster.yml | 1 + .../Prototypes/Roles/Jobs/Civilian/assistant.yml | 1 + .../Prototypes/Roles/Jobs/Civilian/bartender.yml | 1 + .../Prototypes/Roles/Jobs/Civilian/botanist.yml | 1 + .../Prototypes/Roles/Jobs/Civilian/chaplain.yml | 1 + Resources/Prototypes/Roles/Jobs/Civilian/chef.yml | 1 + Resources/Prototypes/Roles/Jobs/Civilian/clown.yml | 1 + Resources/Prototypes/Roles/Jobs/Civilian/janitor.yml | 1 + Resources/Prototypes/Roles/Jobs/Civilian/mime.yml | 1 + Resources/Prototypes/Roles/Jobs/Command/captain.yml | 3 +++ .../Roles/Jobs/Command/head_of_personnel.yml | 2 ++ .../Roles/Jobs/Engineering/chief_engineer.yml | 2 ++ .../Roles/Jobs/Engineering/station_engineer.yml | 1 + .../Roles/Jobs/Medical/chief_medical_officer.yml | 2 ++ .../Prototypes/Roles/Jobs/Medical/medical_doctor.yml | 1 + .../Roles/Jobs/Science/research_director.yml | 2 ++ .../Prototypes/Roles/Jobs/Science/scientist.yml | 1 + .../Roles/Jobs/Security/head_of_security.yml | 2 ++ .../Roles/Jobs/Security/security_officer.yml | 1 + Resources/Prototypes/Roles/Jobs/Security/warden.yml | 1 + 24 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 Resources/Locale/en-US/job/job.ftl diff --git a/Content.Server/Roles/Job.cs b/Content.Server/Roles/Job.cs index 7958bd26a3..3fccfbd357 100644 --- a/Content.Server/Roles/Job.cs +++ b/Content.Server/Roles/Job.cs @@ -1,6 +1,7 @@ using Content.Server.Chat.Managers; using Content.Shared.Roles; using Robust.Shared.IoC; +using Robust.Shared.Localization; namespace Content.Server.Roles { @@ -26,7 +27,16 @@ namespace Content.Server.Roles if (Mind.TryGetSession(out var session)) { var chat = IoCManager.Resolve(); - chat.DispatchServerMessage(session, $"You're a new {Name}. Do your best!"); + chat.DispatchServerMessage(session, Loc.GetString("job-greet-introduce-job-name", ("jobName", Name))); + + if(Prototype.RequireAdminNotify) + chat.DispatchServerMessage(session, Loc.GetString("job-greet-important-disconnect-admin-notify")); + + chat.DispatchServerMessage(session, Loc.GetString("job-greet-supervisors-warning", ("jobName", Name), ("supervisors", Prototype.Supervisors))); + + if(Prototype.JoinNotifyCrew && Mind.CharacterName != null) + chat.DispatchStationAnnouncement(Loc.GetString("job-greet-join-notify-crew", ("jobName", Name), ("characterName", Mind.CharacterName)), + Loc.GetString("job-greet-join-notify-crew-announcer")); } } } diff --git a/Content.Shared/Roles/JobPrototype.cs b/Content.Shared/Roles/JobPrototype.cs index e3ed183c8f..8374315636 100644 --- a/Content.Shared/Roles/JobPrototype.cs +++ b/Content.Shared/Roles/JobPrototype.cs @@ -18,12 +18,21 @@ namespace Content.Shared.Roles [DataField("id", required: true)] public string ID { get; } = default!; + [DataField("supervisors")] + public string Supervisors { get; } = "nobody"; + /// /// The name of this job as displayed to players. /// [DataField("name")] public string Name { get; } = string.Empty; + [DataField("joinNotifyCrew")] + public bool JoinNotifyCrew { get; } = false; + + [DataField("requireAdminNotify")] + public bool RequireAdminNotify { get; } = false; + /// /// Whether this job is a head. /// The job system will try to pick heads before other jobs on the same priority level. diff --git a/Resources/Locale/en-US/job/job.ftl b/Resources/Locale/en-US/job/job.ftl new file mode 100644 index 0000000000..4065887d08 --- /dev/null +++ b/Resources/Locale/en-US/job/job.ftl @@ -0,0 +1,5 @@ +job-greet-introduce-job-name = You are the {$jobName}. +job-greet-important-disconnect-admin-notify = You are playing a job that is important for Game Progression. If you have to disconnect, please notify the admins. +job-greet-supervisors-warning = As the {$jobName} you answer directly to {$supervisors}. Special circumstances may change this. +job-greet-join-notify-crew = { CAPITALIZE($jobName)} {$characterName} on deck! +job-greet-join-notify-crew-announcer = Station diff --git a/Resources/Prototypes/Roles/Jobs/Cargo/cargo_technician.yml b/Resources/Prototypes/Roles/Jobs/Cargo/cargo_technician.yml index 767eee8a88..49e7e91096 100644 --- a/Resources/Prototypes/Roles/Jobs/Cargo/cargo_technician.yml +++ b/Resources/Prototypes/Roles/Jobs/Cargo/cargo_technician.yml @@ -7,6 +7,7 @@ departments: - Cargo icon: "CargoTechnician" + supervisors: "the head of personnel" # TODO: Change this to include the QM when it gets in. access: - Cargo - Maintenance diff --git a/Resources/Prototypes/Roles/Jobs/Cargo/quartermaster.yml b/Resources/Prototypes/Roles/Jobs/Cargo/quartermaster.yml index 28a6d9ec87..0ac51c4f3b 100644 --- a/Resources/Prototypes/Roles/Jobs/Cargo/quartermaster.yml +++ b/Resources/Prototypes/Roles/Jobs/Cargo/quartermaster.yml @@ -7,6 +7,7 @@ # departments: # - Cargo # icon: "QuarterMaster" +# supervisors: "the head of personnel" # access: # - Cargo # - Quartermaster diff --git a/Resources/Prototypes/Roles/Jobs/Civilian/assistant.yml b/Resources/Prototypes/Roles/Jobs/Civilian/assistant.yml index be5e8f29ab..94e76d412c 100644 --- a/Resources/Prototypes/Roles/Jobs/Civilian/assistant.yml +++ b/Resources/Prototypes/Roles/Jobs/Civilian/assistant.yml @@ -6,6 +6,7 @@ departments: - Civilian icon: "Assistant" + supervisors: "absolutely everyone" access: - Maintenance diff --git a/Resources/Prototypes/Roles/Jobs/Civilian/bartender.yml b/Resources/Prototypes/Roles/Jobs/Civilian/bartender.yml index 9e1323e879..750be095d6 100644 --- a/Resources/Prototypes/Roles/Jobs/Civilian/bartender.yml +++ b/Resources/Prototypes/Roles/Jobs/Civilian/bartender.yml @@ -6,6 +6,7 @@ departments: - Civilian icon: "Bartender" + supervisors: "the head of personnel" access: - Service - Maintenance diff --git a/Resources/Prototypes/Roles/Jobs/Civilian/botanist.yml b/Resources/Prototypes/Roles/Jobs/Civilian/botanist.yml index ed4761d99d..389c9c2c5d 100644 --- a/Resources/Prototypes/Roles/Jobs/Civilian/botanist.yml +++ b/Resources/Prototypes/Roles/Jobs/Civilian/botanist.yml @@ -7,6 +7,7 @@ departments: - Civilian icon: "Botanist" + supervisors: "the head of personnel" access: - Service - Maintenance diff --git a/Resources/Prototypes/Roles/Jobs/Civilian/chaplain.yml b/Resources/Prototypes/Roles/Jobs/Civilian/chaplain.yml index 844317afe2..59d23a874f 100644 --- a/Resources/Prototypes/Roles/Jobs/Civilian/chaplain.yml +++ b/Resources/Prototypes/Roles/Jobs/Civilian/chaplain.yml @@ -6,6 +6,7 @@ # departments: # - Civilian # icon: "Chaplain" +# supervisors: "the head of personnel" # access: # - Chapel # - Maintenance diff --git a/Resources/Prototypes/Roles/Jobs/Civilian/chef.yml b/Resources/Prototypes/Roles/Jobs/Civilian/chef.yml index 092a640647..f7a3976c3b 100644 --- a/Resources/Prototypes/Roles/Jobs/Civilian/chef.yml +++ b/Resources/Prototypes/Roles/Jobs/Civilian/chef.yml @@ -6,6 +6,7 @@ departments: - Civilian icon: "Chef" + supervisors: "the head of personnel" access: - Service - Maintenance diff --git a/Resources/Prototypes/Roles/Jobs/Civilian/clown.yml b/Resources/Prototypes/Roles/Jobs/Civilian/clown.yml index 1218463c48..dd0ed3669e 100644 --- a/Resources/Prototypes/Roles/Jobs/Civilian/clown.yml +++ b/Resources/Prototypes/Roles/Jobs/Civilian/clown.yml @@ -6,6 +6,7 @@ departments: - Civilian icon: "Clown" + supervisors: "the head of personnel" access: - Theatre - Maintenance diff --git a/Resources/Prototypes/Roles/Jobs/Civilian/janitor.yml b/Resources/Prototypes/Roles/Jobs/Civilian/janitor.yml index 4210498af5..31c1003fb9 100644 --- a/Resources/Prototypes/Roles/Jobs/Civilian/janitor.yml +++ b/Resources/Prototypes/Roles/Jobs/Civilian/janitor.yml @@ -6,6 +6,7 @@ departments: - Civilian icon: "Janitor" + supervisors: "the head of personnel" access: - Janitor - Maintenance diff --git a/Resources/Prototypes/Roles/Jobs/Civilian/mime.yml b/Resources/Prototypes/Roles/Jobs/Civilian/mime.yml index 8d70423b5d..b1a420d342 100644 --- a/Resources/Prototypes/Roles/Jobs/Civilian/mime.yml +++ b/Resources/Prototypes/Roles/Jobs/Civilian/mime.yml @@ -6,6 +6,7 @@ departments: - Civilian icon: "Mime" + supervisors: "the head of personnel" access: - Theatre - Maintenance diff --git a/Resources/Prototypes/Roles/Jobs/Command/captain.yml b/Resources/Prototypes/Roles/Jobs/Command/captain.yml index 9c1e36ccf2..bf865805bb 100644 --- a/Resources/Prototypes/Roles/Jobs/Command/captain.yml +++ b/Resources/Prototypes/Roles/Jobs/Command/captain.yml @@ -7,6 +7,9 @@ departments: - Command icon: "Captain" + requireAdminNotify: true + joinNotifyCrew: true + supervisors: "Nanotrasen officials" access: # All of em. # Could probably do with some kind of wildcard or whatever to automate this. diff --git a/Resources/Prototypes/Roles/Jobs/Command/head_of_personnel.yml b/Resources/Prototypes/Roles/Jobs/Command/head_of_personnel.yml index 48104883eb..1e6ae9889f 100644 --- a/Resources/Prototypes/Roles/Jobs/Command/head_of_personnel.yml +++ b/Resources/Prototypes/Roles/Jobs/Command/head_of_personnel.yml @@ -7,6 +7,8 @@ - Command - Civilian icon: "HeadOfPersonnel" + requireAdminNotify: true + supervisors: "the captain" access: - Command - HeadOfPersonnel diff --git a/Resources/Prototypes/Roles/Jobs/Engineering/chief_engineer.yml b/Resources/Prototypes/Roles/Jobs/Engineering/chief_engineer.yml index 79b1962d8e..71c21667d9 100644 --- a/Resources/Prototypes/Roles/Jobs/Engineering/chief_engineer.yml +++ b/Resources/Prototypes/Roles/Jobs/Engineering/chief_engineer.yml @@ -8,6 +8,8 @@ - Command - Engineering icon: "ChiefEngineer" + requireAdminNotify: true + supervisors: "the captain" access: - Maintenance - Engineering diff --git a/Resources/Prototypes/Roles/Jobs/Engineering/station_engineer.yml b/Resources/Prototypes/Roles/Jobs/Engineering/station_engineer.yml index 0b702ca6b6..d4c1efd0d3 100644 --- a/Resources/Prototypes/Roles/Jobs/Engineering/station_engineer.yml +++ b/Resources/Prototypes/Roles/Jobs/Engineering/station_engineer.yml @@ -7,6 +7,7 @@ departments: - Engineering icon: "StationEngineer" + supervisors: "the chief engineer" access: - Maintenance - Engineering diff --git a/Resources/Prototypes/Roles/Jobs/Medical/chief_medical_officer.yml b/Resources/Prototypes/Roles/Jobs/Medical/chief_medical_officer.yml index e8012a9ee4..f1507a3925 100644 --- a/Resources/Prototypes/Roles/Jobs/Medical/chief_medical_officer.yml +++ b/Resources/Prototypes/Roles/Jobs/Medical/chief_medical_officer.yml @@ -10,6 +10,8 @@ - Command - Medical icon: "ChiefMedicalOfficer" + requireAdminNotify: true + supervisors: "the captain" access: - Medical - Command diff --git a/Resources/Prototypes/Roles/Jobs/Medical/medical_doctor.yml b/Resources/Prototypes/Roles/Jobs/Medical/medical_doctor.yml index 81c9dd8ba0..59308739b0 100644 --- a/Resources/Prototypes/Roles/Jobs/Medical/medical_doctor.yml +++ b/Resources/Prototypes/Roles/Jobs/Medical/medical_doctor.yml @@ -7,6 +7,7 @@ departments: - Medical icon: "MedicalDoctor" + supervisors: "the chief medical officer" access: - Medical - Maintenance diff --git a/Resources/Prototypes/Roles/Jobs/Science/research_director.yml b/Resources/Prototypes/Roles/Jobs/Science/research_director.yml index ebf9fa4ddc..797452b079 100644 --- a/Resources/Prototypes/Roles/Jobs/Science/research_director.yml +++ b/Resources/Prototypes/Roles/Jobs/Science/research_director.yml @@ -8,6 +8,8 @@ - Command - Science icon: "ResearchDirector" + requireAdminNotify: true + supervisors: "the captain" access: - Research - Command diff --git a/Resources/Prototypes/Roles/Jobs/Science/scientist.yml b/Resources/Prototypes/Roles/Jobs/Science/scientist.yml index f7cf2b8a08..f00abcf21f 100644 --- a/Resources/Prototypes/Roles/Jobs/Science/scientist.yml +++ b/Resources/Prototypes/Roles/Jobs/Science/scientist.yml @@ -7,6 +7,7 @@ departments: - Science icon: "Scientist" + supervisors: "the research director" access: - Research - Maintenance diff --git a/Resources/Prototypes/Roles/Jobs/Security/head_of_security.yml b/Resources/Prototypes/Roles/Jobs/Security/head_of_security.yml index ad86a7c29b..41ddd65852 100644 --- a/Resources/Prototypes/Roles/Jobs/Security/head_of_security.yml +++ b/Resources/Prototypes/Roles/Jobs/Security/head_of_security.yml @@ -8,6 +8,8 @@ - Command - Security icon: "HeadOfSecurity" + requireAdminNotify: true + supervisors: "the captain" access: - Command - Brig diff --git a/Resources/Prototypes/Roles/Jobs/Security/security_officer.yml b/Resources/Prototypes/Roles/Jobs/Security/security_officer.yml index 07bc658f6a..a1cd4b7fec 100644 --- a/Resources/Prototypes/Roles/Jobs/Security/security_officer.yml +++ b/Resources/Prototypes/Roles/Jobs/Security/security_officer.yml @@ -7,6 +7,7 @@ departments: - Security icon: "SecurityOfficer" + supervisors: "the head of security" access: - Security - Maintenance diff --git a/Resources/Prototypes/Roles/Jobs/Security/warden.yml b/Resources/Prototypes/Roles/Jobs/Security/warden.yml index 1f9e43ea56..e8b1efcddd 100644 --- a/Resources/Prototypes/Roles/Jobs/Security/warden.yml +++ b/Resources/Prototypes/Roles/Jobs/Security/warden.yml @@ -7,6 +7,7 @@ # departments: # - Security # icon: "Warden" +# supervisors: "the head of security" # access: # - Security # - Brig