Fix jobs not getting their round start message (#19643)

This commit is contained in:
DrSmugleaf
2023-08-29 15:50:23 -07:00
committed by GitHub
parent f4503864d5
commit 084ad5415c
4 changed files with 16 additions and 6 deletions

View File

@@ -21,10 +21,10 @@ public sealed class JobSystem : EntitySystem
public override void Initialize()
{
SubscribeLocalEvent<JobComponent, RoleAddedEvent>(MindOnDoGreeting);
SubscribeLocalEvent<MindComponent, MindRoleAddedEvent>(MindOnDoGreeting);
}
private void MindOnDoGreeting(EntityUid mindId, JobComponent component, RoleAddedEvent args)
private void MindOnDoGreeting(EntityUid mindId, MindComponent component, ref MindRoleAddedEvent args)
{
if (!_mind.TryGetSession(mindId, out var session))
return;
@@ -38,9 +38,7 @@ public sealed class JobSystem : EntitySystem
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", Loc.GetString(prototype.Supervisors))));
_chat.DispatchServerMessage(session, Loc.GetString("job-greet-supervisors-warning", ("jobName", prototype.LocalizedName), ("supervisors", Loc.GetString(prototype.Supervisors))));
}
public void MindAddJob(EntityUid mindId, string jobPrototypeId)