Stop network serializing prototypes (#38602)

* Stop network serializing prototypes

Send the damn proto ID instead.

* Fix sandbox violation
This commit is contained in:
Pieter-Jan Briers
2025-06-27 01:27:23 +02:00
committed by GitHub
parent bb7e7c3e5f
commit 73df3b1593
28 changed files with 120 additions and 59 deletions

View File

@@ -1,3 +1,4 @@
using System.Linq;
using Content.Shared.Administration.Logs;
using Content.Shared.Database;
using Content.Shared.DeviceLinking.Events;
@@ -142,6 +143,11 @@ public abstract class SharedDeviceLinkSystem : EntitySystem
}
}
public ProtoId<SourcePortPrototype>[] GetSourcePortIds(Entity<DeviceLinkSourceComponent> source)
{
return source.Comp.Ports.ToArray();
}
/// <summary>
/// Retrieves the available ports from a source
/// </summary>
@@ -160,6 +166,11 @@ public abstract class SharedDeviceLinkSystem : EntitySystem
return sourcePorts;
}
public ProtoId<SinkPortPrototype>[] GetSinkPortIds(Entity<DeviceLinkSinkComponent> source)
{
return source.Comp.Ports.ToArray();
}
/// <summary>
/// Retrieves the available ports from a sink
/// </summary>