Un-revert IPlayerManager refactor (#21244)

This commit is contained in:
Leon Friedrich
2023-10-28 09:59:53 +11:00
committed by GitHub
parent c55e1dcafd
commit e685cb626b
245 changed files with 781 additions and 943 deletions

View File

@@ -8,9 +8,9 @@ using Content.Shared.CCVar;
using Content.Shared.Humanoid.Prototypes;
using Content.Shared.Preferences;
using Content.Shared.Roles;
using Robust.Server.Player;
using Robust.Shared.Configuration;
using Robust.Shared.Network;
using Robust.Shared.Player;
using Robust.Shared.Prototypes;
@@ -167,7 +167,7 @@ namespace Content.Server.Preferences.Managers
}
// Should only be called via UserDbDataManager.
public async Task LoadData(IPlayerSession session, CancellationToken cancel)
public async Task LoadData(ICommonSession session, CancellationToken cancel)
{
if (!ShouldStorePrefs(session.ConnectedClient.AuthType))
{
@@ -207,12 +207,12 @@ namespace Content.Server.Preferences.Managers
}
}
public void OnClientDisconnected(IPlayerSession session)
public void OnClientDisconnected(ICommonSession session)
{
_cachedPlayerPrefs.Remove(session.UserId);
}
public bool HavePreferencesLoaded(IPlayerSession session)
public bool HavePreferencesLoaded(ICommonSession session)
{
return _cachedPlayerPrefs.ContainsKey(session.UserId);
}