Inline AddComponent

This commit is contained in:
Vera Aguilera Puerto
2021-12-03 11:33:40 +01:00
parent 2d130e31d6
commit f64df117be
18 changed files with 26 additions and 19 deletions

View File

@@ -7,6 +7,7 @@ using JetBrains.Annotations;
using Robust.Client.Animations;
using Robust.Client.GameObjects;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
using Robust.Shared.Serialization;
using Robust.Shared.Serialization.Manager.Attributes;
@@ -113,7 +114,7 @@ namespace Content.Client.Doors
{
if (!entity.HasComponent<AnimationPlayerComponent>())
{
entity.AddComponent<AnimationPlayerComponent>();
IoCManager.Resolve<IEntityManager>().AddComponent<AnimationPlayerComponent>(entity);
}
}