Fix ResearchSystem.Client UpdateClientInterface preconditions. (#25743)
* fix(research): Fix `ResearchSystem.Client` `UpdateClientInterface` preconditions. Fixes a paradox where selecting a research server requires a research server to already be selected. This would softlock the research client until it is reconstructed. * style: Discards the discard operator Co-authored-by: Nemanja <98561806+EmoGarbage404@users.noreply.github.com> --------- Co-authored-by: Nemanja <98561806+EmoGarbage404@users.noreply.github.com>
This commit is contained in:
@@ -82,12 +82,11 @@ public sealed partial class ResearchSystem
|
||||
if (!Resolve(uid, ref component, false))
|
||||
return;
|
||||
|
||||
if (!TryGetClientServer(uid, out _, out var serverComponent, component))
|
||||
return;
|
||||
TryGetClientServer(uid, out _, out var serverComponent, component);
|
||||
|
||||
var names = GetServerNames();
|
||||
var state = new ResearchClientBoundInterfaceState(names.Length, names,
|
||||
GetServerIds(), component.ConnectedToServer ? serverComponent.Id : -1);
|
||||
GetServerIds(), serverComponent?.Id ?? -1);
|
||||
|
||||
_uiSystem.TrySetUiState(uid, ResearchClientUiKey.Key, state);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user