Fix build.
I HATE STATIC I HATE STATIC I HATE STATIC
This commit is contained in:
@@ -24,7 +24,7 @@ namespace Content.Server.ParticleAccelerator.EntitySystems
|
|||||||
component.OnAnchorChanged();
|
component.OnAnchorChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void RotateEvent(ref RotateEvent ev)
|
private void RotateEvent(ref RotateEvent ev)
|
||||||
{
|
{
|
||||||
if (EntityManager.TryGetComponent(ev.Sender, out ParticleAcceleratorPartComponent? part))
|
if (EntityManager.TryGetComponent(ev.Sender, out ParticleAcceleratorPartComponent? part))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -172,7 +172,7 @@ namespace Content.Server.Power.EntitySystems
|
|||||||
RaiseLocalEvent(provider.Owner, new ReceiverConnectedEvent(receiver), broadcast: false);
|
RaiseLocalEvent(provider.Owner, new ReceiverConnectedEvent(receiver), broadcast: false);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static bool TryFindAvailableProvider(EntityUid owner, float range, [NotNullWhen(true)] out ExtensionCableProviderComponent? foundProvider)
|
private bool TryFindAvailableProvider(EntityUid owner, float range, [NotNullWhen(true)] out ExtensionCableProviderComponent? foundProvider)
|
||||||
{
|
{
|
||||||
var nearbyEntities = IoCManager.Resolve<IEntityLookup>()
|
var nearbyEntities = IoCManager.Resolve<IEntityLookup>()
|
||||||
.GetEntitiesInRange(owner, range);
|
.GetEntitiesInRange(owner, range);
|
||||||
|
|||||||
@@ -317,7 +317,7 @@ namespace Content.Server.Power.EntitySystems
|
|||||||
_powerState.Networks.Allocate(out network.Id) = network;
|
_powerState.Networks.Allocate(out network.Id) = network;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void DoReconnectApcNet(ApcNet net)
|
private void DoReconnectApcNet(ApcNet net)
|
||||||
{
|
{
|
||||||
var netNode = net.NetworkNode;
|
var netNode = net.NetworkNode;
|
||||||
|
|
||||||
@@ -349,7 +349,7 @@ namespace Content.Server.Power.EntitySystems
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void DoReconnectPowerNet(PowerNet net)
|
private void DoReconnectPowerNet(PowerNet net)
|
||||||
{
|
{
|
||||||
var netNode = net.NetworkNode;
|
var netNode = net.NetworkNode;
|
||||||
|
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ namespace Content.Server.Rotatable
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Replace a flippable entity with it's flipped / mirror-symmetric entity.
|
/// Replace a flippable entity with it's flipped / mirror-symmetric entity.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static void TryFlip(FlippableComponent component, EntityUid user)
|
public void TryFlip(FlippableComponent component, EntityUid user)
|
||||||
{
|
{
|
||||||
if (EntityManager.TryGetComponent(component.Owner, out IPhysBody? physics) &&
|
if (EntityManager.TryGetComponent(component.Owner, out IPhysBody? physics) &&
|
||||||
physics.BodyType == BodyType.Static)
|
physics.BodyType == BodyType.Static)
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ namespace Content.Server.Storage.EntitySystems
|
|||||||
args.Verbs.Add(verb);
|
args.Verbs.Add(verb);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void HandleEntityRemovedFromContainer(EntRemovedFromContainerMessage message)
|
private void HandleEntityRemovedFromContainer(EntRemovedFromContainerMessage message)
|
||||||
{
|
{
|
||||||
var oldParentEntity = message.Container.Owner;
|
var oldParentEntity = message.Container.Owner;
|
||||||
|
|
||||||
@@ -124,7 +124,7 @@ namespace Content.Server.Storage.EntitySystems
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void HandleEntityInsertedIntoContainer(EntInsertedIntoContainerMessage message)
|
private void HandleEntityInsertedIntoContainer(EntInsertedIntoContainerMessage message)
|
||||||
{
|
{
|
||||||
var oldParentEntity = message.Container.Owner;
|
var oldParentEntity = message.Container.Owner;
|
||||||
|
|
||||||
|
|||||||
@@ -109,6 +109,7 @@ namespace Content.Shared.Examine
|
|||||||
other.MapId == MapId.Nullspace) return false;
|
other.MapId == MapId.Nullspace) return false;
|
||||||
|
|
||||||
var occluderSystem = Get<OccluderSystem>();
|
var occluderSystem = Get<OccluderSystem>();
|
||||||
|
var entMan = IoCManager.Resolve<IEntityManager>();
|
||||||
if (!origin.InRange(other, range)) return false;
|
if (!origin.InRange(other, range)) return false;
|
||||||
|
|
||||||
var dir = other.Position - origin.Position;
|
var dir = other.Position - origin.Position;
|
||||||
@@ -128,12 +129,12 @@ namespace Content.Shared.Examine
|
|||||||
|
|
||||||
foreach (var result in rayResults)
|
foreach (var result in rayResults)
|
||||||
{
|
{
|
||||||
if (!EntityManager.TryGetComponent(result.HitEntity, out OccluderComponent? o))
|
if (!entMan.TryGetComponent(result.HitEntity, out OccluderComponent? o))
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
var bBox = o.BoundingBox.Translated(EntityManager.GetComponent<TransformComponent>(o.Owner).WorldPosition);
|
var bBox = o.BoundingBox.Translated(entMan.GetComponent<TransformComponent>(o.Owner).WorldPosition);
|
||||||
|
|
||||||
if (bBox.Contains(origin.Position) || bBox.Contains(other.Position))
|
if (bBox.Contains(origin.Position) || bBox.Contains(other.Position))
|
||||||
{
|
{
|
||||||
@@ -148,54 +149,60 @@ namespace Content.Shared.Examine
|
|||||||
|
|
||||||
public static bool InRangeUnOccluded(EntityUid origin, EntityUid other, float range, Ignored? predicate, bool ignoreInsideBlocker = true)
|
public static bool InRangeUnOccluded(EntityUid origin, EntityUid other, float range, Ignored? predicate, bool ignoreInsideBlocker = true)
|
||||||
{
|
{
|
||||||
var originPos = EntityManager.GetComponent<TransformComponent>(origin).MapPosition;
|
var entMan = IoCManager.Resolve<IEntityManager>();
|
||||||
var otherPos = EntityManager.GetComponent<TransformComponent>(other).MapPosition;
|
var originPos = entMan.GetComponent<TransformComponent>(origin).MapPosition;
|
||||||
|
var otherPos = entMan.GetComponent<TransformComponent>(other).MapPosition;
|
||||||
|
|
||||||
return InRangeUnOccluded(originPos, otherPos, range, predicate, ignoreInsideBlocker);
|
return InRangeUnOccluded(originPos, otherPos, range, predicate, ignoreInsideBlocker);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static bool InRangeUnOccluded(EntityUid origin, IComponent other, float range, Ignored? predicate, bool ignoreInsideBlocker = true)
|
public static bool InRangeUnOccluded(EntityUid origin, IComponent other, float range, Ignored? predicate, bool ignoreInsideBlocker = true)
|
||||||
{
|
{
|
||||||
var originPos = EntityManager.GetComponent<TransformComponent>(origin).MapPosition;
|
var entMan = IoCManager.Resolve<IEntityManager>();
|
||||||
var otherPos = EntityManager.GetComponent<TransformComponent>(other.Owner).MapPosition;
|
var originPos = entMan.GetComponent<TransformComponent>(origin).MapPosition;
|
||||||
|
var otherPos = entMan.GetComponent<TransformComponent>(other.Owner).MapPosition;
|
||||||
|
|
||||||
return InRangeUnOccluded(originPos, otherPos, range, predicate, ignoreInsideBlocker);
|
return InRangeUnOccluded(originPos, otherPos, range, predicate, ignoreInsideBlocker);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static bool InRangeUnOccluded(EntityUid origin, EntityCoordinates other, float range, Ignored? predicate, bool ignoreInsideBlocker = true)
|
public static bool InRangeUnOccluded(EntityUid origin, EntityCoordinates other, float range, Ignored? predicate, bool ignoreInsideBlocker = true)
|
||||||
{
|
{
|
||||||
var originPos = EntityManager.GetComponent<TransformComponent>(origin).MapPosition;
|
var entMan = IoCManager.Resolve<IEntityManager>();
|
||||||
var otherPos = other.ToMap(EntityManager);
|
var originPos = entMan.GetComponent<TransformComponent>(origin).MapPosition;
|
||||||
|
var otherPos = other.ToMap(entMan);
|
||||||
|
|
||||||
return InRangeUnOccluded(originPos, otherPos, range, predicate, ignoreInsideBlocker);
|
return InRangeUnOccluded(originPos, otherPos, range, predicate, ignoreInsideBlocker);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static bool InRangeUnOccluded(EntityUid origin, MapCoordinates other, float range, Ignored? predicate, bool ignoreInsideBlocker = true)
|
public static bool InRangeUnOccluded(EntityUid origin, MapCoordinates other, float range, Ignored? predicate, bool ignoreInsideBlocker = true)
|
||||||
{
|
{
|
||||||
var originPos = EntityManager.GetComponent<TransformComponent>(origin).MapPosition;
|
var entMan = IoCManager.Resolve<IEntityManager>();
|
||||||
|
var originPos = entMan.GetComponent<TransformComponent>(origin).MapPosition;
|
||||||
|
|
||||||
return InRangeUnOccluded(originPos, other, range, predicate, ignoreInsideBlocker);
|
return InRangeUnOccluded(originPos, other, range, predicate, ignoreInsideBlocker);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static bool InRangeUnOccluded(ITargetedInteractEventArgs args, float range, Ignored? predicate, bool ignoreInsideBlocker = true)
|
public static bool InRangeUnOccluded(ITargetedInteractEventArgs args, float range, Ignored? predicate, bool ignoreInsideBlocker = true)
|
||||||
{
|
{
|
||||||
var originPos = EntityManager.GetComponent<TransformComponent>(args.User).MapPosition;
|
var entMan = IoCManager.Resolve<IEntityManager>();
|
||||||
var otherPos = EntityManager.GetComponent<TransformComponent>(args.Target).MapPosition;
|
var originPos = entMan.GetComponent<TransformComponent>(args.User).MapPosition;
|
||||||
|
var otherPos = entMan.GetComponent<TransformComponent>(args.Target).MapPosition;
|
||||||
|
|
||||||
return InRangeUnOccluded(originPos, otherPos, range, predicate, ignoreInsideBlocker);
|
return InRangeUnOccluded(originPos, otherPos, range, predicate, ignoreInsideBlocker);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static bool InRangeUnOccluded(DragDropEvent args, float range, Ignored? predicate, bool ignoreInsideBlocker = true)
|
public static bool InRangeUnOccluded(DragDropEvent args, float range, Ignored? predicate, bool ignoreInsideBlocker = true)
|
||||||
{
|
{
|
||||||
var originPos = EntityManager.GetComponent<TransformComponent>(args.User).MapPosition;
|
var entMan = IoCManager.Resolve<IEntityManager>();
|
||||||
var otherPos = args.DropLocation.ToMap(EntityManager);
|
var originPos = entMan.GetComponent<TransformComponent>(args.User).MapPosition;
|
||||||
|
var otherPos = args.DropLocation.ToMap(entMan);
|
||||||
|
|
||||||
return InRangeUnOccluded(originPos, otherPos, range, predicate, ignoreInsideBlocker);
|
return InRangeUnOccluded(originPos, otherPos, range, predicate, ignoreInsideBlocker);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static bool InRangeUnOccluded(AfterInteractEventArgs args, float range, Ignored? predicate, bool ignoreInsideBlocker = true)
|
public static bool InRangeUnOccluded(AfterInteractEventArgs args, float range, Ignored? predicate, bool ignoreInsideBlocker = true)
|
||||||
{
|
{
|
||||||
var entityManager = EntityManager;
|
var entityManager = IoCManager.Resolve<IEntityManager>();;
|
||||||
var originPos = entityManager.GetComponent<TransformComponent>(args.User).MapPosition;
|
var originPos = entityManager.GetComponent<TransformComponent>(args.User).MapPosition;
|
||||||
var target = args.Target;
|
var target = args.Target;
|
||||||
var otherPos = (target != null ? entityManager.GetComponent<TransformComponent>(target.Value).MapPosition : args.ClickLocation.ToMap(entityManager));
|
var otherPos = (target != null ? entityManager.GetComponent<TransformComponent>(target.Value).MapPosition : args.ClickLocation.ToMap(entityManager));
|
||||||
|
|||||||
@@ -82,10 +82,12 @@ namespace Content.Shared.Movement.EntitySystems
|
|||||||
|
|
||||||
var ent = session?.AttachedEntity;
|
var ent = session?.AttachedEntity;
|
||||||
|
|
||||||
if (ent == null || !EntityManager.EntityExists(ent.Value))
|
var entMan = IoCManager.Resolve<IEntityManager>();
|
||||||
|
|
||||||
|
if (ent == null || !entMan.EntityExists(ent.Value))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (!EntityManager.TryGetComponent(ent.Value, out T? comp))
|
if (!entMan.TryGetComponent(ent.Value, out T? comp))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
component = comp;
|
component = comp;
|
||||||
|
|||||||
Reference in New Issue
Block a user