Show the station name on spawn (#12128)
This commit is contained in:
@@ -209,6 +209,12 @@ namespace Content.Server.GameTicking
|
||||
_chatManager.DispatchServerMessage(player, Loc.GetString("job-greet-crew-shortages"));
|
||||
}
|
||||
|
||||
if (TryComp(station, out MetaDataComponent? metaData))
|
||||
{
|
||||
_chatManager.DispatchServerMessage(player,
|
||||
Loc.GetString("job-greet-station-name", ("stationName", metaData.EntityName)));
|
||||
}
|
||||
|
||||
// We raise this event directed to the mob, but also broadcast it so game rules can do something now.
|
||||
PlayersJoinedRoundNormally++;
|
||||
var aev = new PlayerSpawnCompleteEvent(mob, player, jobId, lateJoin, PlayersJoinedRoundNormally, station, character);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using Content.Server.Chat.Managers;
|
||||
using Content.Server.Chat.Systems;
|
||||
using Content.Shared.Roles;
|
||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
||||
using System.Globalization;
|
||||
|
||||
namespace Content.Server.Roles
|
||||
{
|
||||
@@ -39,24 +39,13 @@ namespace Content.Server.Roles
|
||||
if (Mind.TryGetSession(out var session))
|
||||
{
|
||||
var chatMgr = IoCManager.Resolve<IChatManager>();
|
||||
var chatSys = IoCManager.Resolve<IEntitySystemManager>().GetEntitySystem<ChatSystem>();
|
||||
chatMgr.DispatchServerMessage(session, Loc.GetString("job-greet-introduce-job-name", ("jobName", Name)));
|
||||
chatMgr.DispatchServerMessage(session, Loc.GetString("job-greet-introduce-job-name",
|
||||
("jobName", CultureInfo.CurrentCulture.TextInfo.ToTitleCase(Name))));
|
||||
|
||||
if(Prototype.RequireAdminNotify)
|
||||
chatMgr.DispatchServerMessage(session, Loc.GetString("job-greet-important-disconnect-admin-notify"));
|
||||
|
||||
chatMgr.DispatchServerMessage(session, Loc.GetString("job-greet-supervisors-warning", ("jobName", Name), ("supervisors", Loc.GetString(Prototype.Supervisors))));
|
||||
|
||||
if(Prototype.JoinNotifyCrew && Mind.CharacterName != null)
|
||||
{
|
||||
if (Mind.OwnedEntity != null)
|
||||
{
|
||||
chatSys.DispatchStationAnnouncement(Mind.OwnedEntity.Value,
|
||||
Loc.GetString("job-greet-join-notify-crew", ("jobName", Name),
|
||||
("characterName", Mind.CharacterName)),
|
||||
Loc.GetString("job-greet-join-notify-crew-announcer"), false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
job-greet-introduce-job-name = You are the {$jobName}.
|
||||
job-greet-station-name = Welcome aboard {$stationName}.
|
||||
job-greet-introduce-job-name = Your role is: {$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 via ahelp.
|
||||
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
|
||||
job-greet-crew-shortages = As this station was initially staffed with a skeleton crew, additional access has been added to your ID card.
|
||||
|
||||
Reference in New Issue
Block a user