Fix anomaly vessels not generating points (#14137)
This commit is contained in:
@@ -10,7 +10,7 @@ public sealed partial class ResearchSystem
|
||||
{
|
||||
private void InitializeClient()
|
||||
{
|
||||
SubscribeLocalEvent<ResearchClientComponent, ComponentStartup>(OnClientStartup);
|
||||
SubscribeLocalEvent<ResearchClientComponent, MapInitEvent>(OnClientMapInit);
|
||||
SubscribeLocalEvent<ResearchClientComponent, ComponentShutdown>(OnClientShutdown);
|
||||
SubscribeLocalEvent<ResearchClientComponent, BoundUIOpenedEvent>(OnClientUIOpen);
|
||||
SubscribeLocalEvent<ResearchClientComponent, ConsoleServerSyncMessage>(OnConsoleSync);
|
||||
@@ -26,12 +26,11 @@ public sealed partial class ResearchSystem
|
||||
|
||||
private void OnClientSelected(EntityUid uid, ResearchClientComponent component, ResearchClientServerSelectedMessage args)
|
||||
{
|
||||
var server = GetServerById(args.ServerId);
|
||||
if (server == null)
|
||||
if (!TryGetServerById(args.ServerId, out var serveruid, out var serverComponent))
|
||||
return;
|
||||
|
||||
UnregisterClient(uid, clientComponent: component);
|
||||
RegisterClient(uid, server.Owner, component, server);
|
||||
UnregisterClient(uid, component);
|
||||
RegisterClient(uid, serveruid.Value, component, serverComponent);
|
||||
}
|
||||
|
||||
private void OnClientDeselected(EntityUid uid, ResearchClientComponent component, ResearchClientServerDeselectedMessage args)
|
||||
@@ -66,7 +65,7 @@ public sealed partial class ResearchSystem
|
||||
UpdateClientInterface(uid, component);
|
||||
}
|
||||
|
||||
private void OnClientStartup(EntityUid uid, ResearchClientComponent component, ComponentStartup args)
|
||||
private void OnClientMapInit(EntityUid uid, ResearchClientComponent component, MapInitEvent args)
|
||||
{
|
||||
var allServers = EntityQuery<ResearchServerComponent>(true).ToArray();
|
||||
if (allServers.Length > 0)
|
||||
|
||||
Reference in New Issue
Block a user