Fix playtime tracker (#20014)

This commit is contained in:
metalgearsloth
2023-09-11 17:42:25 +10:00
committed by GitHub
parent ceda715f1c
commit e1a91466f1
4 changed files with 2 additions and 9 deletions

View File

@@ -1,4 +1,3 @@
using Content.Shared.Roles;
using Content.Shared.Roles.Jobs; using Content.Shared.Roles.Jobs;
namespace Content.Client.Roles; namespace Content.Client.Roles;

View File

@@ -1,7 +0,0 @@
using Content.Shared.Roles.Jobs;
namespace Content.Client.Roles.Jobs;
public sealed class JobSystem : SharedJobSystem
{
}

View File

@@ -205,7 +205,7 @@ public sealed class PlayTimeTrackingSystem : EntitySystem
if (!_tracking.TryGetTrackerTimes(player, out var playTimes)) if (!_tracking.TryGetTrackerTimes(player, out var playTimes))
{ {
// Sorry mate but your playtimes haven't loaded. // Sorry mate but your playtimes haven't loaded.
Logger.ErrorS("playtime", $"Playtimes weren't ready yet for {player} on roundstart!"); Log.Error($"Playtimes weren't ready yet for {player} on roundstart!");
playTimes ??= new Dictionary<string, TimeSpan>(); playTimes ??= new Dictionary<string, TimeSpan>();
} }

View File

@@ -19,6 +19,7 @@ public sealed class JobSystem : SharedJobSystem
public override void Initialize() public override void Initialize()
{ {
base.Initialize();
SubscribeLocalEvent<MindComponent, MindRoleAddedEvent>(MindOnDoGreeting); SubscribeLocalEvent<MindComponent, MindRoleAddedEvent>(MindOnDoGreeting);
} }