Communications Console: The ECSining (#8374)

Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
Veritius
2022-06-03 21:37:35 +10:00
committed by GitHub
parent c6d20e6ccf
commit 237cb3d0b4
33 changed files with 608 additions and 249 deletions

View File

@@ -1,3 +1,4 @@
using Content.Server.Chat;
using Content.Server.Chat.Managers;
using Content.Shared.Roles;
@@ -31,17 +32,25 @@ namespace Content.Server.Roles
if (Mind.TryGetSession(out var session))
{
var chat = IoCManager.Resolve<IChatManager>();
chat.DispatchServerMessage(session, Loc.GetString("job-greet-introduce-job-name", ("jobName", Name)));
var chatMgr = IoCManager.Resolve<IChatManager>();
var chatSys = IoCManager.Resolve<IEntitySystemManager>().GetEntitySystem<ChatSystem>();
chatMgr.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"));
chatMgr.DispatchServerMessage(session, Loc.GetString("job-greet-important-disconnect-admin-notify"));
chat.DispatchServerMessage(session, Loc.GetString("job-greet-supervisors-warning", ("jobName", Name), ("supervisors", Prototype.Supervisors)));
chatMgr.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"), false);
{
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);
}
}
}
}
}