Fix NetEntity DataField in AnalysisConsoleComponent (#39984)
* fix analysis console * fix test * totally not a web edit
This commit is contained in:
@@ -214,6 +214,17 @@ public abstract class SharedDeviceLinkSystem : EntitySystem
|
||||
return links;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the entities linked to a specific source port.
|
||||
/// </summary>
|
||||
public HashSet<EntityUid> GetLinkedSinks(Entity<DeviceLinkSourceComponent?> source, ProtoId<SourcePortPrototype> port)
|
||||
{
|
||||
if (!Resolve(source, ref source.Comp) || !source.Comp.Outputs.TryGetValue(port, out var linked))
|
||||
return new HashSet<EntityUid>(); // not a source or not linked
|
||||
|
||||
return new HashSet<EntityUid>(linked); // clone to prevent modifying the original
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the default links for the given list of source port prototypes
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user