Gets rid of all ComponentManager usages. (#4707)

This commit is contained in:
Vera Aguilera Puerto
2021-09-28 13:35:29 +02:00
committed by GitHub
parent 7953e5b962
commit 0be5ff829b
158 changed files with 321 additions and 333 deletions

View File

@@ -23,7 +23,7 @@ namespace Content.Server.Hands.Systems
public bool TrySpawnVirtualItemInHand(EntityUid blockingEnt, EntityUid user)
{
if (ComponentManager.TryGetComponent<HandsComponent>(user, out var hands))
if (EntityManager.TryGetComponent<HandsComponent>(user, out var hands))
{
foreach (var handName in hands.ActivePriorityEnumerable())
{
@@ -82,7 +82,7 @@ namespace Content.Server.Hands.Systems
/// </summary>
public void DeleteInHandsMatching(EntityUid user, EntityUid matching)
{
if (ComponentManager.TryGetComponent<HandsComponent>(user, out var hands))
if (EntityManager.TryGetComponent<HandsComponent>(user, out var hands))
{
foreach (var handName in hands.ActivePriorityEnumerable())
{
@@ -92,9 +92,9 @@ namespace Content.Server.Hands.Systems
if (hand.HeldEntity != null)
{
if (ComponentManager.TryGetComponent<HandVirtualItemComponent>(hand.HeldEntity.Uid,
out var virt)
&& virt.BlockingEntity == matching)
if (EntityManager.TryGetComponent<HandVirtualItemComponent>(hand.HeldEntity.Uid,
out var virt)
&& virt.BlockingEntity == matching)
{
Delete(virt, user);
}