removes componentdependencies (#6160)

This commit is contained in:
Paul Ritter
2022-01-15 03:26:37 +01:00
committed by GitHub
parent 46405ec165
commit 9e1607722d
33 changed files with 257 additions and 274 deletions

View File

@@ -20,7 +20,7 @@ namespace Content.Server.Buckle.Components
[ComponentReference(typeof(SharedStrapComponent))]
public class StrapComponent : SharedStrapComponent, IInteractHand, ISerializationHooks, IDestroyAct
{
[ComponentDependency] public readonly SpriteComponent? SpriteComponent = null;
[Dependency] private readonly IEntityManager _entityManager = default!;
private readonly HashSet<EntityUid> _buckledEntities = new();
@@ -153,7 +153,8 @@ namespace Content.Server.Buckle.Components
_occupiedSize += buckle.Size;
buckle.Appearance?.SetData(StrapVisuals.RotationAngle, _rotation);
if(_entityManager.TryGetComponent<AppearanceComponent>(buckle.Owner, out var appearanceComponent))
appearanceComponent.SetData(StrapVisuals.RotationAngle, _rotation);
// Update the visuals of the strap object
if (IoCManager.Resolve<IEntityManager>().TryGetComponent<AppearanceComponent>(Owner, out var appearance))