Replace all T : Component constraints with T : IComponent (#21073)
This commit is contained in:
@@ -679,7 +679,7 @@ public partial class SharedBodySystem
|
||||
public List<(T Comp, OrganComponent Organ)> GetBodyPartOrganComponents<T>(
|
||||
EntityUid uid,
|
||||
BodyPartComponent? part = null)
|
||||
where T : Component
|
||||
where T : IComponent
|
||||
{
|
||||
if (!Resolve(uid, ref part))
|
||||
return new List<(T Comp, OrganComponent Organ)>();
|
||||
@@ -709,7 +709,7 @@ public partial class SharedBodySystem
|
||||
EntityUid uid,
|
||||
[NotNullWhen(true)] out List<(T Comp, OrganComponent Organ)>? comps,
|
||||
BodyPartComponent? part = null)
|
||||
where T : Component
|
||||
where T : IComponent
|
||||
{
|
||||
if (!Resolve(uid, ref part))
|
||||
{
|
||||
@@ -751,7 +751,7 @@ public partial class SharedBodySystem
|
||||
public IEnumerable<(EntityUid AdjacentId, T Component)> GetBodyPartAdjacentPartsComponents<T>(
|
||||
EntityUid partId,
|
||||
BodyPartComponent? part = null)
|
||||
where T : Component
|
||||
where T : IComponent
|
||||
{
|
||||
if (!Resolve(partId, ref part, false))
|
||||
yield break;
|
||||
@@ -768,7 +768,7 @@ public partial class SharedBodySystem
|
||||
EntityUid partId,
|
||||
[NotNullWhen(true)] out List<(EntityUid AdjacentId, T Component)>? comps,
|
||||
BodyPartComponent? part = null)
|
||||
where T : Component
|
||||
where T : IComponent
|
||||
{
|
||||
if (!Resolve(partId, ref part, false))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user