Holy crap auth works (#2099)
* Holy crap auth works * Fix some usages of UserID instead of UserName * Refactor preferences. They be non-async now. Also faster. * Rename DbContext. * Guest username assignment. * Fix saving of profiles. * Don't store data for guests. * Fix generating invalid random colors. * Don't allow dumb garbage for char preferences. * Bans. * Lol forgot to fill out the command description. * Connection log. * Rename all the tables and columns to be snake_case. * Re-do migrations. * Fixing tests and warnings. * Update submodule
This commit is contained in:
committed by
GitHub
parent
8a33e0a9bd
commit
66c8a68891
@@ -16,16 +16,16 @@ namespace Content.Server.GameObjects.EntitySystems
|
||||
{
|
||||
public class SignalLinkerSystem : EntitySystem
|
||||
{
|
||||
private Dictionary<NetSessionId, SignalTransmitterComponent> _transmitters;
|
||||
private Dictionary<NetUserId, SignalTransmitterComponent> _transmitters;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
|
||||
_transmitters = new Dictionary<NetSessionId, SignalTransmitterComponent>();
|
||||
_transmitters = new Dictionary<NetUserId, SignalTransmitterComponent>();
|
||||
}
|
||||
|
||||
public void SignalLinkerKeybind(NetSessionId id, bool? enable)
|
||||
public void SignalLinkerKeybind(NetUserId id, bool? enable)
|
||||
{
|
||||
if (enable == null)
|
||||
{
|
||||
@@ -66,7 +66,7 @@ namespace Content.Server.GameObjects.EntitySystems
|
||||
|
||||
private bool HandleUse(ICommonSession session, EntityCoordinates coords, EntityUid uid)
|
||||
{
|
||||
if (!_transmitters.TryGetValue(session.SessionId, out var signalTransmitter))
|
||||
if (!_transmitters.TryGetValue(session.UserId, out var signalTransmitter))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -86,7 +86,7 @@ namespace Content.Server.GameObjects.EntitySystems
|
||||
|
||||
if (entity.TryGetComponent<SignalTransmitterComponent>(out var transmitter))
|
||||
{
|
||||
_transmitters[session.SessionId] = transmitter.GetSignal(session.AttachedEntity);
|
||||
_transmitters[session.UserId] = transmitter.GetSignal(session.AttachedEntity);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -129,7 +129,7 @@ namespace Content.Server.GameObjects.EntitySystems
|
||||
return;
|
||||
}
|
||||
|
||||
system.SignalLinkerKeybind(player.SessionId, enable);
|
||||
system.SignalLinkerKeybind(player.UserId, enable);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user