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.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<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)]
public string ID { get; } = default!;
[DataField("supervisors")]
public string Supervisors { get; } = "nobody";
/// <summary>
/// The name of this job as displayed to players.
/// </summary>
[DataField("name")]
public string Name { get; } = string.Empty;
[DataField("joinNotifyCrew")]
public bool JoinNotifyCrew { get; } = false;
[DataField("requireAdminNotify")]
public bool RequireAdminNotify { get; } = false;
/// <summary>
/// Whether this job is a head.
/// 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:
- Cargo
icon: "CargoTechnician"
supervisors: "the head of personnel" # TODO: Change this to include the QM when it gets in.
access:
- Cargo
- Maintenance

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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