Stop network serializing prototypes (#38602)
* Stop network serializing prototypes Send the damn proto ID instead. * Fix sandbox violation
This commit is contained in:
committed by
GitHub
parent
bb7e7c3e5f
commit
73df3b1593
@@ -1,4 +1,5 @@
|
||||
using System.Numerics;
|
||||
using System.Linq;
|
||||
using System.Numerics;
|
||||
using Content.Client.UserInterface.Controls;
|
||||
using Content.Shared.DeviceLinking;
|
||||
using Content.Shared.DeviceNetwork;
|
||||
@@ -14,6 +15,8 @@ namespace Content.Client.NetworkConfigurator;
|
||||
[GenerateTypedNameReferences]
|
||||
public sealed partial class NetworkConfiguratorLinkMenu : FancyWindow
|
||||
{
|
||||
private readonly IPrototypeManager _prototypeManager = null!;
|
||||
|
||||
private const string PanelBgColor = "#202023";
|
||||
|
||||
private readonly LinksRender _links;
|
||||
@@ -33,6 +36,7 @@ public sealed partial class NetworkConfiguratorLinkMenu : FancyWindow
|
||||
public NetworkConfiguratorLinkMenu()
|
||||
{
|
||||
RobustXamlLoader.Load(this);
|
||||
IoCManager.InjectDependencies(this);
|
||||
|
||||
var footerStyleBox = new StyleBoxFlat()
|
||||
{
|
||||
@@ -61,7 +65,7 @@ public sealed partial class NetworkConfiguratorLinkMenu : FancyWindow
|
||||
ButtonContainerRight.RemoveAllChildren();
|
||||
|
||||
_sources.Clear();
|
||||
_sources.AddRange(linkState.Sources);
|
||||
_sources.AddRange(linkState.Sources.Select(s => _prototypeManager.Index(s)));
|
||||
_links.SourceButtons.Clear();
|
||||
var i = 0;
|
||||
foreach (var source in _sources)
|
||||
@@ -73,7 +77,7 @@ public sealed partial class NetworkConfiguratorLinkMenu : FancyWindow
|
||||
}
|
||||
|
||||
_sinks.Clear();
|
||||
_sinks.AddRange(linkState.Sinks);
|
||||
_sinks.AddRange(linkState.Sinks.Select(s => _prototypeManager.Index(s)));
|
||||
_links.SinkButtons.Clear();
|
||||
i = 0;
|
||||
foreach (var sink in _sinks)
|
||||
|
||||
Reference in New Issue
Block a user