Fix build
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -360,7 +360,7 @@ namespace Content.Shared.Body.Components
|
||||
return _mechanisms;
|
||||
}
|
||||
|
||||
entityManager ??= _entMan;
|
||||
IoCManager.Resolve(ref entityManager);
|
||||
|
||||
var mechanisms = new List<SharedMechanismComponent>(MechanismIds.Length);
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user