Replace all T : Component constraints with T : IComponent (#21073)

This commit is contained in:
DrSmugleaf
2023-10-17 19:42:47 -07:00
committed by GitHub
parent a136616531
commit 5934c6728f
10 changed files with 25 additions and 29 deletions

View File

@@ -151,7 +151,7 @@ public partial class SharedBodySystem
public List<(T Comp, OrganComponent Organ)> GetBodyOrganComponents<T>(
EntityUid uid,
BodyComponent? body = null)
where T : Component
where T : IComponent
{
if (!Resolve(uid, ref body))
return new List<(T Comp, OrganComponent Organ)>();
@@ -180,7 +180,7 @@ public partial class SharedBodySystem
EntityUid uid,
[NotNullWhen(true)] out List<(T Comp, OrganComponent Organ)>? comps,
BodyComponent? body = null)
where T : Component
where T : IComponent
{
if (!Resolve(uid, ref body))
{