Revert "Update submodule to 172.0.0 (#21222)" (#21225)

This commit is contained in:
metalgearsloth
2023-10-24 21:55:20 +11:00
committed by GitHub
parent 517aea8bc3
commit a2bbda43cc
249 changed files with 1049 additions and 967 deletions

View File

@@ -1,3 +1,4 @@
using System.Linq;
using Content.Server.Afk.Events;
using Content.Server.GameTicking;
using Content.Shared.CCVar;
@@ -23,7 +24,7 @@ public sealed class AFKSystem : EntitySystem
private float _checkDelay;
private TimeSpan _checkTime;
private readonly HashSet<ICommonSession> _afkPlayers = new();
private readonly HashSet<IPlayerSession> _afkPlayers = new();
public override void Initialize()
{
@@ -72,9 +73,11 @@ public sealed class AFKSystem : EntitySystem
_checkTime = _timing.CurTime + TimeSpan.FromSeconds(_checkDelay);
foreach (var pSession in Filter.GetAllPlayers())
foreach (var session in Filter.GetAllPlayers())
{
if (pSession.Status != SessionStatus.InGame) continue;
if (session.Status != SessionStatus.InGame) continue;
var pSession = (IPlayerSession) session;
var isAfk = _afkManager.IsAfk(pSession);
if (isAfk && _afkPlayers.Add(pSession))