Pausing content (#3061)
* Change EntityQuery to not retrieve paused by default * GetAllComponents Co-authored-by: Metal Gear Sloth <metalgearsloth@gmail.com>
This commit is contained in:
@@ -52,7 +52,7 @@ namespace Content.Client.Commands
|
||||
.EnableAll = true;
|
||||
|
||||
var components = IoCManager.Resolve<IEntityManager>().ComponentManager
|
||||
.EntityQuery<SubFloorHideComponent>();
|
||||
.EntityQuery<SubFloorHideComponent>(true);
|
||||
|
||||
foreach (var component in components)
|
||||
{
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace Content.Client.Commands
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
var componentManager = IoCManager.Resolve<IComponentManager>();
|
||||
var mechanisms = componentManager.EntityQuery<IMechanism>();
|
||||
var mechanisms = componentManager.EntityQuery<IMechanism>(true);
|
||||
|
||||
foreach (var mechanism in mechanisms)
|
||||
{
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace Content.Client.Commands
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
var componentManager = IoCManager.Resolve<IComponentManager>();
|
||||
var mechanisms = componentManager.EntityQuery<IMechanism>();
|
||||
var mechanisms = componentManager.EntityQuery<IMechanism>(true);
|
||||
|
||||
foreach (var mechanism in mechanisms)
|
||||
{
|
||||
|
||||
@@ -46,7 +46,7 @@ namespace Content.Client.GameObjects.Components.Observer
|
||||
|
||||
private void SetGhostVisibility(bool visibility)
|
||||
{
|
||||
foreach (var ghost in _componentManager.GetAllComponents(typeof(GhostComponent)))
|
||||
foreach (var ghost in _componentManager.GetAllComponents(typeof(GhostComponent), true))
|
||||
{
|
||||
if (ghost.Owner.TryGetComponent(out SpriteComponent? component))
|
||||
{
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace Content.Client.GameObjects.EntitySystems
|
||||
{
|
||||
base.FrameUpdate(frameTime);
|
||||
|
||||
foreach (var recoil in EntityManager.ComponentManager.EntityQuery<CameraRecoilComponent>())
|
||||
foreach (var recoil in EntityManager.ComponentManager.EntityQuery<CameraRecoilComponent>(true))
|
||||
{
|
||||
recoil.FrameUpdate(frameTime);
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ namespace Content.Client.GameObjects.EntitySystems.DoAfter
|
||||
if (_attachedEntity == null || _attachedEntity.Deleted)
|
||||
return;
|
||||
|
||||
foreach (var comp in ComponentManager.EntityQuery<DoAfterComponent>())
|
||||
foreach (var comp in ComponentManager.EntityQuery<DoAfterComponent>(true))
|
||||
{
|
||||
if (!_knownComponents.Contains(comp))
|
||||
{
|
||||
|
||||
@@ -44,7 +44,7 @@ namespace Content.Client.GameObjects.EntitySystems
|
||||
return;
|
||||
}
|
||||
|
||||
foreach (var instrumentComponent in EntityManager.ComponentManager.EntityQuery<InstrumentComponent>())
|
||||
foreach (var instrumentComponent in EntityManager.ComponentManager.EntityQuery<InstrumentComponent>(true))
|
||||
{
|
||||
instrumentComponent.Update(frameTime);
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace Content.Client.GameObjects.EntitySystems
|
||||
|
||||
private void UpdateMarkers()
|
||||
{
|
||||
foreach (var markerComponent in EntityManager.ComponentManager.EntityQuery<MarkerComponent>())
|
||||
foreach (var markerComponent in EntityManager.ComponentManager.EntityQuery<MarkerComponent>(true))
|
||||
{
|
||||
markerComponent.UpdateVisibility();
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace Content.Client.GameObjects.EntitySystems
|
||||
{
|
||||
base.FrameUpdate(frameTime);
|
||||
|
||||
foreach (var meleeLungeComponent in EntityManager.ComponentManager.EntityQuery<MeleeLungeComponent>())
|
||||
foreach (var meleeLungeComponent in EntityManager.ComponentManager.EntityQuery<MeleeLungeComponent>(true))
|
||||
{
|
||||
meleeLungeComponent.Update(frameTime);
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace Content.Client.GameObjects.EntitySystems
|
||||
{
|
||||
base.FrameUpdate(frameTime);
|
||||
|
||||
foreach (var arcAnimationComponent in EntityManager.ComponentManager.EntityQuery<MeleeWeaponArcAnimationComponent>())
|
||||
foreach (var arcAnimationComponent in EntityManager.ComponentManager.EntityQuery<MeleeWeaponArcAnimationComponent>(true))
|
||||
{
|
||||
arcAnimationComponent.Update(frameTime);
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace Content.Client.GameObjects.EntitySystems
|
||||
|
||||
private void UpdateAll()
|
||||
{
|
||||
foreach (var comp in EntityManager.ComponentManager.EntityQuery<SubFloorHideComponent>())
|
||||
foreach (var comp in EntityManager.ComponentManager.EntityQuery<SubFloorHideComponent>(true))
|
||||
{
|
||||
if (!_mapManager.TryGetGrid(comp.Owner.Transform.GridID, out var grid)) return;
|
||||
|
||||
|
||||
@@ -124,7 +124,7 @@ namespace Content.Client.StationEvents
|
||||
_lastTick = _gameTiming.CurTime;
|
||||
|
||||
var radiationPulses = _componentManager
|
||||
.EntityQuery<RadiationPulseComponent>()
|
||||
.EntityQuery<RadiationPulseComponent>(true)
|
||||
.ToList();
|
||||
|
||||
var screenHandle = (DrawingHandleScreen) handle;
|
||||
|
||||
Reference in New Issue
Block a user