Fix component generic usages where IComponent would not be valid (#19482)

This commit is contained in:
DrSmugleaf
2023-08-24 03:10:55 -07:00
committed by GitHub
parent e42148f433
commit 35107f7c2b
27 changed files with 38 additions and 38 deletions

View File

@@ -55,7 +55,7 @@ namespace Content.Server.Power.Components
private bool TryFindNet([NotNullWhen(true)] out TNetType? foundNet)
{
if (_entMan.TryGetComponent<NodeContainerComponent?>(Owner, out var container))
if (_entMan.TryGetComponent(Owner, out NodeContainerComponent? container))
{
var compatibleNet = container.Nodes.Values
.Where(node => (NodeId == null || NodeId == node.Name) && node.NodeGroupID == (NodeGroupID) Voltage)