Inline EntityManager

This commit is contained in:
Vera Aguilera Puerto
2021-12-03 11:11:52 +01:00
parent bd18574412
commit 5e177ae734
108 changed files with 250 additions and 199 deletions

View File

@@ -97,7 +97,7 @@ namespace Content.Shared.Hands.Components
UpdateHandVisualizer();
Dirty();
Owner.EntityManager.EventBus.RaiseEvent(EventSource.Local, new HandsModifiedMessage { Hands = this });
IoCManager.Resolve<IEntityManager>().EventBus.RaiseEvent(EventSource.Local, new HandsModifiedMessage { Hands = this });
}
public void UpdateHandVisualizer()
@@ -491,7 +491,7 @@ namespace Content.Shared.Hands.Components
private Vector2 GetFinalDropCoordinates(EntityCoordinates targetCoords)
{
var origin = Owner.Transform.MapPosition;
var target = targetCoords.ToMap(Owner.EntityManager);
var target = targetCoords.ToMap(IoCManager.Resolve<IEntityManager>());
var dropVector = target.Position - origin.Position;
var requestedDropDistance = dropVector.Length;
@@ -771,7 +771,7 @@ namespace Content.Shared.Hands.Components
private void HandCountChanged()
{
Owner.EntityManager.EventBus.RaiseEvent(EventSource.Local, new HandCountChangedEvent(Owner));
IoCManager.Resolve<IEntityManager>().EventBus.RaiseEvent(EventSource.Local, new HandCountChangedEvent(Owner));
}
/// <summary>