Various improvements to job greetings. (#4777)

This commit is contained in:
Vera Aguilera Puerto
2021-10-06 13:51:11 +02:00
committed by GitHub
parent eac2fd3cf0
commit 419edc710d
24 changed files with 53 additions and 1 deletions

View File

@@ -1,6 +1,7 @@
using Content.Server.Chat.Managers; using Content.Server.Chat.Managers;
using Content.Shared.Roles; using Content.Shared.Roles;
using Robust.Shared.IoC; using Robust.Shared.IoC;
using Robust.Shared.Localization;
namespace Content.Server.Roles namespace Content.Server.Roles
{ {
@@ -26,7 +27,16 @@ namespace Content.Server.Roles
if (Mind.TryGetSession(out var session)) if (Mind.TryGetSession(out var session))
{ {
var chat = IoCManager.Resolve<IChatManager>(); var chat = IoCManager.Resolve<IChatManager>();
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"));
} }
} }
} }

View File

@@ -18,12 +18,21 @@ namespace Content.Shared.Roles
[DataField("id", required: true)] [DataField("id", required: true)]
public string ID { get; } = default!; public string ID { get; } = default!;
[DataField("supervisors")]
public string Supervisors { get; } = "nobody";
/// <summary> /// <summary>
/// The name of this job as displayed to players. /// The name of this job as displayed to players.
/// </summary> /// </summary>
[DataField("name")] [DataField("name")]
public string Name { get; } = string.Empty; public string Name { get; } = string.Empty;
[DataField("joinNotifyCrew")]
public bool JoinNotifyCrew { get; } = false;
[DataField("requireAdminNotify")]
public bool RequireAdminNotify { get; } = false;
/// <summary> /// <summary>
/// Whether this job is a head. /// Whether this job is a head.
/// The job system will try to pick heads before other jobs on the same priority level. /// The job system will try to pick heads before other jobs on the same priority level.

View File

@@ -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

View File

@@ -7,6 +7,7 @@
departments: departments:
- Cargo - Cargo
icon: "CargoTechnician" icon: "CargoTechnician"
supervisors: "the head of personnel" # TODO: Change this to include the QM when it gets in.
access: access:
- Cargo - Cargo
- Maintenance - Maintenance

View File

@@ -7,6 +7,7 @@
# departments: # departments:
# - Cargo # - Cargo
# icon: "QuarterMaster" # icon: "QuarterMaster"
# supervisors: "the head of personnel"
# access: # access:
# - Cargo # - Cargo
# - Quartermaster # - Quartermaster

View File

@@ -6,6 +6,7 @@
departments: departments:
- Civilian - Civilian
icon: "Assistant" icon: "Assistant"
supervisors: "absolutely everyone"
access: access:
- Maintenance - Maintenance

View File

@@ -6,6 +6,7 @@
departments: departments:
- Civilian - Civilian
icon: "Bartender" icon: "Bartender"
supervisors: "the head of personnel"
access: access:
- Service - Service
- Maintenance - Maintenance

View File

@@ -7,6 +7,7 @@
departments: departments:
- Civilian - Civilian
icon: "Botanist" icon: "Botanist"
supervisors: "the head of personnel"
access: access:
- Service - Service
- Maintenance - Maintenance

View File

@@ -6,6 +6,7 @@
# departments: # departments:
# - Civilian # - Civilian
# icon: "Chaplain" # icon: "Chaplain"
# supervisors: "the head of personnel"
# access: # access:
# - Chapel # - Chapel
# - Maintenance # - Maintenance

View File

@@ -6,6 +6,7 @@
departments: departments:
- Civilian - Civilian
icon: "Chef" icon: "Chef"
supervisors: "the head of personnel"
access: access:
- Service - Service
- Maintenance - Maintenance

View File

@@ -6,6 +6,7 @@
departments: departments:
- Civilian - Civilian
icon: "Clown" icon: "Clown"
supervisors: "the head of personnel"
access: access:
- Theatre - Theatre
- Maintenance - Maintenance

View File

@@ -6,6 +6,7 @@
departments: departments:
- Civilian - Civilian
icon: "Janitor" icon: "Janitor"
supervisors: "the head of personnel"
access: access:
- Janitor - Janitor
- Maintenance - Maintenance

View File

@@ -6,6 +6,7 @@
departments: departments:
- Civilian - Civilian
icon: "Mime" icon: "Mime"
supervisors: "the head of personnel"
access: access:
- Theatre - Theatre
- Maintenance - Maintenance

View File

@@ -7,6 +7,9 @@
departments: departments:
- Command - Command
icon: "Captain" icon: "Captain"
requireAdminNotify: true
joinNotifyCrew: true
supervisors: "Nanotrasen officials"
access: access:
# All of em. # All of em.
# Could probably do with some kind of wildcard or whatever to automate this. # Could probably do with some kind of wildcard or whatever to automate this.

View File

@@ -7,6 +7,8 @@
- Command - Command
- Civilian - Civilian
icon: "HeadOfPersonnel" icon: "HeadOfPersonnel"
requireAdminNotify: true
supervisors: "the captain"
access: access:
- Command - Command
- HeadOfPersonnel - HeadOfPersonnel

View File

@@ -8,6 +8,8 @@
- Command - Command
- Engineering - Engineering
icon: "ChiefEngineer" icon: "ChiefEngineer"
requireAdminNotify: true
supervisors: "the captain"
access: access:
- Maintenance - Maintenance
- Engineering - Engineering

View File

@@ -7,6 +7,7 @@
departments: departments:
- Engineering - Engineering
icon: "StationEngineer" icon: "StationEngineer"
supervisors: "the chief engineer"
access: access:
- Maintenance - Maintenance
- Engineering - Engineering

View File

@@ -10,6 +10,8 @@
- Command - Command
- Medical - Medical
icon: "ChiefMedicalOfficer" icon: "ChiefMedicalOfficer"
requireAdminNotify: true
supervisors: "the captain"
access: access:
- Medical - Medical
- Command - Command

View File

@@ -7,6 +7,7 @@
departments: departments:
- Medical - Medical
icon: "MedicalDoctor" icon: "MedicalDoctor"
supervisors: "the chief medical officer"
access: access:
- Medical - Medical
- Maintenance - Maintenance

View File

@@ -8,6 +8,8 @@
- Command - Command
- Science - Science
icon: "ResearchDirector" icon: "ResearchDirector"
requireAdminNotify: true
supervisors: "the captain"
access: access:
- Research - Research
- Command - Command

View File

@@ -7,6 +7,7 @@
departments: departments:
- Science - Science
icon: "Scientist" icon: "Scientist"
supervisors: "the research director"
access: access:
- Research - Research
- Maintenance - Maintenance

View File

@@ -8,6 +8,8 @@
- Command - Command
- Security - Security
icon: "HeadOfSecurity" icon: "HeadOfSecurity"
requireAdminNotify: true
supervisors: "the captain"
access: access:
- Command - Command
- Brig - Brig

View File

@@ -7,6 +7,7 @@
departments: departments:
- Security - Security
icon: "SecurityOfficer" icon: "SecurityOfficer"
supervisors: "the head of security"
access: access:
- Security - Security
- Maintenance - Maintenance

View File

@@ -7,6 +7,7 @@
# departments: # departments:
# - Security # - Security
# icon: "Warden" # icon: "Warden"
# supervisors: "the head of security"
# access: # access:
# - Security # - Security
# - Brig # - Brig