Fix build

This commit is contained in:
Vera Aguilera Puerto
2021-12-08 17:44:39 +01:00
parent cdc8336695
commit 4dcfebfd53
4 changed files with 8 additions and 8 deletions

View File

@@ -45,7 +45,7 @@ namespace Content.Server.Chemistry.Components
public bool TryDoInject(EntityUid? target, EntityUid user)
{
if (!EligibleEntity(target))
if (!EligibleEntity(target, _entMan))
return false;
string? msgFormat = null;
@@ -54,7 +54,7 @@ namespace Content.Server.Chemistry.Components
{
msgFormat = "hypospray-component-inject-self-message";
}
else if (EligibleEntity(user) && ClumsyComponent.TryRollClumsy(user, ClumsyFailChance))
else if (EligibleEntity(user, _entMan) && ClumsyComponent.TryRollClumsy(user, ClumsyFailChance))
{
msgFormat = "hypospray-component-inject-self-clumsy-message";
target = user;
@@ -113,13 +113,13 @@ namespace Content.Server.Chemistry.Components
EntitySystem.Get<SolutionContainerSystem>().TryAddSolution(target.Value, targetSolution, removedSolution);
static bool EligibleEntity([NotNullWhen(true)] EntityUid? entity)
static bool EligibleEntity([NotNullWhen(true)] EntityUid? entity, IEntityManager entMan)
{
// TODO: Does checking for BodyComponent make sense as a "can be hypospray'd" tag?
// In SS13 the hypospray ONLY works on mobs, NOT beakers or anything else.
return _entMan.HasComponent<SolutionContainerManagerComponent>(entity)
&& _entMan.HasComponent<MobStateComponent>(entity);
return entMan.HasComponent<SolutionContainerManagerComponent>(entity)
&& entMan.HasComponent<MobStateComponent>(entity);
}
return true;

View File

@@ -126,7 +126,7 @@ namespace Content.Server.Clothing.Components
{
public bool DoToggleAction(ToggleItemActionEventArgs args)
{
if (!_entMan.TryGetComponent<MagbootsComponent?>(args.Item, out var magboots))
if (!IoCManager.Resolve<IEntityManager>().TryGetComponent<MagbootsComponent?>(args.Item, out var magboots))
return false;
magboots.Toggle(args.Performer);

View File

@@ -360,7 +360,7 @@ namespace Content.Shared.Body.Components
return _mechanisms;
}
entityManager ??= _entMan;
IoCManager.Resolve(ref entityManager);
var mechanisms = new List<SharedMechanismComponent>(MechanismIds.Length);

View File

@@ -186,7 +186,7 @@ namespace Content.Shared.Movement
!otherCollider.CanCollide ||
((collider.CollisionMask & otherCollider.CollisionLayer) == 0 &&
(otherCollider.CollisionMask & collider.CollisionLayer) == 0) ||
(EntityManager.TryGetComponent(otherCollider.Owner, out SharedPullableComponent? pullable) && pullable.BeingPulled))
(IoCManager.Resolve<IEntityManager>().TryGetComponent(otherCollider.Owner, out SharedPullableComponent? pullable) && pullable.BeingPulled))
{
continue;
}