Remove IoC resolves in BaseNetConnectorNodeGroup and friends (#20333)
This commit is contained in:
@@ -37,13 +37,14 @@ public sealed partial class ApcComponent : BaseApcNetComponent
|
||||
public static TimeSpan VisualsChangeDelay = TimeSpan.FromSeconds(1);
|
||||
|
||||
// TODO ECS power a little better!
|
||||
// End the suffering
|
||||
protected override void AddSelfToNet(IApcNet apcNet)
|
||||
{
|
||||
apcNet.AddApc(this);
|
||||
apcNet.AddApc(Owner, this);
|
||||
}
|
||||
|
||||
protected override void RemoveSelfFromNet(IApcNet apcNet)
|
||||
{
|
||||
apcNet.RemoveApc(this);
|
||||
apcNet.RemoveApc(Owner, this);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,6 +5,9 @@ using Content.Server.NodeContainer.NodeGroups;
|
||||
|
||||
namespace Content.Server.Power.Components
|
||||
{
|
||||
// TODO find a way to just remove this or turn it into one component.
|
||||
// Component interface queries require enumerating over ALL of an entities components.
|
||||
// So BaseNetConnectorNodeGroup<TNetType> is slow as shit.
|
||||
public interface IBaseNetConnectorComponent<in TNetType>
|
||||
{
|
||||
public TNetType? Net { set; }
|
||||
|
||||
Reference in New Issue
Block a user