Remove redundant IComponent casts

This commit is contained in:
metalgearsloth
2021-12-07 21:54:00 +11:00
parent 8d4799e611
commit 373b5988d7
29 changed files with 53 additions and 53 deletions

View File

@@ -146,7 +146,7 @@ namespace Content.Shared.Body.Components
var argsAdded = new BodyPartAddedEventArgs(slot.Id, part);
EntitySystem.Get<SharedHumanoidAppearanceSystem>().BodyPartAdded(((IComponent) this).Owner, argsAdded);
EntitySystem.Get<SharedHumanoidAppearanceSystem>().BodyPartAdded(Owner, argsAdded);
foreach (var component in IoCManager.Resolve<IEntityManager>().GetComponents<IBodyPartAdded>(Owner).ToArray())
{
component.BodyPartAdded(argsAdded);
@@ -174,7 +174,7 @@ namespace Content.Shared.Body.Components
var args = new BodyPartRemovedEventArgs(slot.Id, part);
EntitySystem.Get<SharedHumanoidAppearanceSystem>().BodyPartRemoved(((IComponent) this).Owner, args);
EntitySystem.Get<SharedHumanoidAppearanceSystem>().BodyPartRemoved(Owner, args);
foreach (var component in IoCManager.Resolve<IEntityManager>().GetComponents<IBodyPartRemoved>(Owner))
{
component.BodyPartRemoved(args);
@@ -184,7 +184,7 @@ namespace Content.Shared.Body.Components
if (part.PartType == BodyPartType.Leg &&
GetPartsOfType(BodyPartType.Leg).ToArray().Length == 0)
{
EntitySystem.Get<StandingStateSystem>().Down(((IComponent) this).Owner);
EntitySystem.Get<StandingStateSystem>().Down(Owner);
}
if (part.IsVital && SlotParts.Count(x => x.Value.PartType == part.PartType) == 0)