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

@@ -1,8 +1,5 @@
using System.Diagnostics.CodeAnalysis;
using Content.Shared.Alert;
using Content.Shared.Mobs;
using Content.Shared.Mobs.Components;
using Content.Shared.Mobs.Systems;
using Content.Shared.Rejuvenate;
using Robust.Shared.GameStates;
using Robust.Shared.Prototypes;
@@ -107,7 +104,7 @@ namespace Content.Shared.StatusEffect
/// <typeparam name="T">The component type to add and remove from the entity.</typeparam>
public bool TryAddStatusEffect<T>(EntityUid uid, string key, TimeSpan time, bool refresh,
StatusEffectsComponent? status = null)
where T : Component, new()
where T : IComponent, new()
{
if (!Resolve(uid, ref status, false))
return false;