@@ -14,7 +14,6 @@ using Robust.Server.GameObjects;
|
||||
using Robust.Server.Player;
|
||||
using Robust.Shared.Configuration;
|
||||
using Robust.Shared.Network;
|
||||
using Robust.Shared.Player;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Utility;
|
||||
|
||||
@@ -56,7 +55,7 @@ public sealed class PlayTimeTrackingSystem : EntitySystem
|
||||
_tracking.CalcTrackers -= CalcTrackers;
|
||||
}
|
||||
|
||||
private void CalcTrackers(ICommonSession player, HashSet<string> trackers)
|
||||
private void CalcTrackers(IPlayerSession player, HashSet<string> trackers)
|
||||
{
|
||||
if (_afk.IsAfk(player))
|
||||
return;
|
||||
@@ -68,7 +67,7 @@ public sealed class PlayTimeTrackingSystem : EntitySystem
|
||||
trackers.UnionWith(GetTimedRoles(player));
|
||||
}
|
||||
|
||||
private bool IsPlayerAlive(ICommonSession session)
|
||||
private bool IsPlayerAlive(IPlayerSession session)
|
||||
{
|
||||
var attached = session.AttachedEntity;
|
||||
if (attached == null)
|
||||
@@ -94,7 +93,7 @@ public sealed class PlayTimeTrackingSystem : EntitySystem
|
||||
}
|
||||
}
|
||||
|
||||
private IEnumerable<string> GetTimedRoles(ICommonSession session)
|
||||
private IEnumerable<string> GetTimedRoles(IPlayerSession session)
|
||||
{
|
||||
var contentData = _playerManager.GetPlayerData(session.UserId).ContentData();
|
||||
|
||||
@@ -157,7 +156,7 @@ public sealed class PlayTimeTrackingSystem : EntitySystem
|
||||
_tracking.QueueSendTimers(ev.PlayerSession);
|
||||
}
|
||||
|
||||
public bool IsAllowed(ICommonSession player, string role)
|
||||
public bool IsAllowed(IPlayerSession player, string role)
|
||||
{
|
||||
if (!_prototypes.TryIndex<JobPrototype>(role, out var job) ||
|
||||
job.Requirements == null ||
|
||||
@@ -169,7 +168,7 @@ public sealed class PlayTimeTrackingSystem : EntitySystem
|
||||
return JobRequirements.TryRequirementsMet(job, playTimes, out _, EntityManager, _prototypes);
|
||||
}
|
||||
|
||||
public HashSet<string> GetDisallowedJobs(ICommonSession player)
|
||||
public HashSet<string> GetDisallowedJobs(IPlayerSession player)
|
||||
{
|
||||
var roles = new HashSet<string>();
|
||||
if (!_cfg.GetCVar(CCVars.GameRoleTimers))
|
||||
@@ -231,7 +230,7 @@ public sealed class PlayTimeTrackingSystem : EntitySystem
|
||||
}
|
||||
}
|
||||
|
||||
public void PlayerRolesChanged(ICommonSession player)
|
||||
public void PlayerRolesChanged(IPlayerSession player)
|
||||
{
|
||||
_tracking.QueueRefreshTrackers(player);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user