30 lines
1.3 KiB
C#
30 lines
1.3 KiB
C#
using System.Diagnostics.CodeAnalysis;
|
|
using System.Threading;
|
|
using System.Threading.Tasks;
|
|
using Content.Shared.Construction.Prototypes;
|
|
using Content.Shared.Preferences;
|
|
using Robust.Shared.Network;
|
|
using Robust.Shared.Player;
|
|
using Robust.Shared.Prototypes;
|
|
|
|
namespace Content.Server.Preferences.Managers
|
|
{
|
|
public interface IServerPreferencesManager
|
|
{
|
|
void Init();
|
|
|
|
Task LoadData(ICommonSession session, CancellationToken cancel);
|
|
void FinishLoad(ICommonSession session);
|
|
void OnClientDisconnected(ICommonSession session);
|
|
|
|
bool TryGetCachedPreferences(NetUserId userId, [NotNullWhen(true)] out PlayerPreferences? playerPreferences);
|
|
PlayerPreferences GetPreferences(NetUserId userId);
|
|
PlayerPreferences? GetPreferencesOrNull(NetUserId? userId);
|
|
IEnumerable<KeyValuePair<NetUserId, ICharacterProfile>> GetSelectedProfilesForPlayers(List<NetUserId> userIds);
|
|
bool HavePreferencesLoaded(ICommonSession session);
|
|
Task RefreshPreferencesAsync(ICommonSession session, CancellationToken cancel); // Frontier
|
|
Task SetProfile(NetUserId userId, int slot, ICharacterProfile profile, bool validateFields = true); // Frontier: add validateFields
|
|
Task SetConstructionFavorites(NetUserId userId, List<ProtoId<ConstructionPrototype>> favorites);
|
|
}
|
|
}
|