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:
@@ -33,7 +33,7 @@ namespace Content.Server.Administration.Commands
|
||||
}
|
||||
|
||||
var componentType = registration.Type;
|
||||
var components = entityManager.ComponentManager.GetAllComponents(componentType);
|
||||
var components = entityManager.ComponentManager.GetAllComponents(componentType, true);
|
||||
|
||||
var i = 0;
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace Content.Server.Administration.Commands
|
||||
if (location == "?")
|
||||
{
|
||||
var locations = string.Join(", ",
|
||||
comp.EntityQuery<WarpPointComponent>()
|
||||
comp.EntityQuery<WarpPointComponent>(true)
|
||||
.Select(p => p.Location)
|
||||
.Where(p => p != null)
|
||||
.OrderBy(p => p)
|
||||
@@ -64,7 +64,7 @@ namespace Content.Server.Administration.Commands
|
||||
var currentGrid = player.AttachedEntity.Transform.GridID;
|
||||
var entityManager = IoCManager.Resolve<IEntityManager>();
|
||||
|
||||
var found = comp.EntityQuery<WarpPointComponent>()
|
||||
var found = comp.EntityQuery<WarpPointComponent>(true)
|
||||
.Where(p => p.Location == location)
|
||||
.Select(p => p.Owner.Transform.Coordinates)
|
||||
.OrderBy(p => p, Comparer<EntityCoordinates>.Create((a, b) =>
|
||||
|
||||
@@ -144,7 +144,7 @@ namespace Content.Server.GameObjects.Components.Observer
|
||||
private List<WarpPointComponent> FindWaypoints()
|
||||
{
|
||||
var comp = IoCManager.Resolve<IComponentManager>();
|
||||
return comp.EntityQuery<WarpPointComponent>().ToList();
|
||||
return comp.EntityQuery<WarpPointComponent>(true).ToList();
|
||||
}
|
||||
|
||||
public void Examine(FormattedMessage message, bool inDetailsRange)
|
||||
|
||||
@@ -48,7 +48,7 @@ namespace Content.Server.GameObjects.EntitySystems.AI
|
||||
yield break;
|
||||
}
|
||||
|
||||
foreach (var component in ComponentManager.EntityQuery<AiFactionTagComponent>())
|
||||
foreach (var component in ComponentManager.EntityQuery<AiFactionTagComponent>(true))
|
||||
{
|
||||
if ((component.Factions & hostile) == 0)
|
||||
continue;
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace Content.Server.GameObjects.EntitySystems
|
||||
_accumulatedFrameTime += frameTime;
|
||||
if (_accumulatedFrameTime >= 10)
|
||||
{
|
||||
foreach (var comp in ComponentManager.EntityQuery<AMEControllerComponent>())
|
||||
foreach (var comp in ComponentManager.EntityQuery<AMEControllerComponent>(true))
|
||||
{
|
||||
comp.OnUpdate(frameTime);
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace Content.Server.GameObjects.EntitySystems
|
||||
if (_lastUpdate < UpdateDelay) return;
|
||||
|
||||
// creadth: everything exposable by atmos should be updated as well
|
||||
foreach (var atmosExposedComponent in EntityManager.ComponentManager.EntityQuery<AtmosExposedComponent>())
|
||||
foreach (var atmosExposedComponent in EntityManager.ComponentManager.EntityQuery<AtmosExposedComponent>(true))
|
||||
{
|
||||
var tile = atmosExposedComponent.Owner.Transform.Coordinates.GetTileAtmosphere(EntityManager);
|
||||
if (tile == null) continue;
|
||||
|
||||
@@ -143,7 +143,7 @@ namespace Content.Server.GameObjects.EntitySystems
|
||||
{
|
||||
base.Update(frameTime);
|
||||
|
||||
foreach (var (mapGridComponent, gridAtmosphereComponent) in EntityManager.ComponentManager.EntityQuery<IMapGridComponent, IGridAtmosphereComponent>())
|
||||
foreach (var (mapGridComponent, gridAtmosphereComponent) in EntityManager.ComponentManager.EntityQuery<IMapGridComponent, IGridAtmosphereComponent>(true))
|
||||
{
|
||||
if (_pauseManager.IsGridPaused(mapGridComponent.GridIndex)) continue;
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ namespace Content.Server.GameObjects.EntitySystems
|
||||
|
||||
public override void Update(float frameTime)
|
||||
{
|
||||
foreach (var comp in ComponentManager.EntityQuery<BlockGameArcadeComponent>())
|
||||
foreach (var comp in ComponentManager.EntityQuery<BlockGameArcadeComponent>(true))
|
||||
{
|
||||
comp.DoGameTick(frameTime);
|
||||
}
|
||||
|
||||
@@ -180,7 +180,7 @@ namespace Content.Server.GameObjects.EntitySystems
|
||||
|
||||
private void SyncComponentsWithId(int id)
|
||||
{
|
||||
foreach (var comp in ComponentManager.EntityQuery<CargoOrderDatabaseComponent>())
|
||||
foreach (var comp in ComponentManager.EntityQuery<CargoOrderDatabaseComponent>(true))
|
||||
{
|
||||
if (!comp.ConnectedToDatabase || comp.Database.Id != id)
|
||||
continue;
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace Content.Server.GameObjects.EntitySystems
|
||||
{
|
||||
public override void Update(float frameTime)
|
||||
{
|
||||
foreach (var comp in ComponentManager.EntityQuery<ClimbingComponent>())
|
||||
foreach (var comp in ComponentManager.EntityQuery<ClimbingComponent>(true))
|
||||
{
|
||||
comp.Update();
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace Content.Server.GameObjects.EntitySystems
|
||||
{
|
||||
public override void Update(float frameTime)
|
||||
{
|
||||
foreach (var comp in ComponentManager.EntityQuery<CloningPodComponent>())
|
||||
foreach (var comp in ComponentManager.EntityQuery<CloningPodComponent>(true))
|
||||
{
|
||||
comp.Update(frameTime);
|
||||
}
|
||||
@@ -23,7 +23,7 @@ namespace Content.Server.GameObjects.EntitySystems
|
||||
{
|
||||
if (!Minds.ContainsValue(mind))
|
||||
{
|
||||
Minds.Add(Minds.Count(), mind);
|
||||
Minds.Add(Minds.Count, mind);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace Content.Server.GameObjects.EntitySystems
|
||||
{
|
||||
public override void Update(float frameTime)
|
||||
{
|
||||
foreach (var comp in ComponentManager.EntityQuery<ConveyorComponent>())
|
||||
foreach (var comp in ComponentManager.EntityQuery<ConveyorComponent>(true))
|
||||
{
|
||||
comp.Update(frameTime);
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace Content.Server.GameObjects.EntitySystems
|
||||
|
||||
public override void Update(float frameTime)
|
||||
{
|
||||
foreach (var comp in ComponentManager.EntityQuery<DisposalHolderComponent>())
|
||||
foreach (var comp in ComponentManager.EntityQuery<DisposalHolderComponent>(true))
|
||||
{
|
||||
comp.Update(frameTime);
|
||||
}
|
||||
|
||||
@@ -17,10 +17,8 @@ namespace Content.Server.GameObjects.EntitySystems.DoAfter
|
||||
{
|
||||
base.Update(frameTime);
|
||||
|
||||
foreach (var comp in ComponentManager.EntityQuery<DoAfterComponent>())
|
||||
foreach (var comp in ComponentManager.EntityQuery<DoAfterComponent>(true))
|
||||
{
|
||||
if (comp.Owner.Paused) continue;
|
||||
|
||||
var cancelled = new List<DoAfter>(0);
|
||||
var finished = new List<DoAfter>(0);
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace Content.Server.GameObjects.EntitySystems
|
||||
{
|
||||
public override void Update(float frameTime)
|
||||
{
|
||||
foreach (var light in ComponentManager.EntityQuery<ExpendableLightComponent>())
|
||||
foreach (var light in ComponentManager.EntityQuery<ExpendableLightComponent>(true))
|
||||
{
|
||||
light.Update(frameTime);
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace Content.Server.GameObjects.EntitySystems
|
||||
{
|
||||
public override void Update(float frameTime)
|
||||
{
|
||||
foreach (var analyzer in ComponentManager.EntityQuery<GasAnalyzerComponent>())
|
||||
foreach (var analyzer in ComponentManager.EntityQuery<GasAnalyzerComponent>(true))
|
||||
{
|
||||
analyzer.Update(frameTime);
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace Content.Server.GameObjects.EntitySystems
|
||||
{
|
||||
public override void Update(float frameTime)
|
||||
{
|
||||
foreach (var component in ComponentManager.EntityQuery<GasCanisterComponent>())
|
||||
foreach (var component in ComponentManager.EntityQuery<GasCanisterComponent>(true))
|
||||
{
|
||||
component.Update(frameTime);
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace Content.Server.GameObjects.EntitySystems
|
||||
if (_timer < Interval) return;
|
||||
_timer = 0f;
|
||||
|
||||
foreach (var gasTank in EntityManager.ComponentManager.EntityQuery<GasTankComponent>())
|
||||
foreach (var gasTank in EntityManager.ComponentManager.EntityQuery<GasTankComponent>(true))
|
||||
{
|
||||
gasTank.Update();
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace Content.Server.GameObjects.EntitySystems
|
||||
{
|
||||
_internalTimer += frameTime;
|
||||
var gridsWithGravity = new List<GridId>();
|
||||
foreach (var generator in ComponentManager.EntityQuery<GravityGeneratorComponent>())
|
||||
foreach (var generator in ComponentManager.EntityQuery<GravityGeneratorComponent>(true))
|
||||
{
|
||||
if (generator.NeedsUpdate)
|
||||
{
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace Content.Server.GameObjects.EntitySystems
|
||||
|
||||
if (_accumulatedFrameTime > 1)
|
||||
{
|
||||
foreach (var comp in ComponentManager.EntityQuery<HungerComponent>())
|
||||
foreach (var comp in ComponentManager.EntityQuery<HungerComponent>(true))
|
||||
{
|
||||
comp.OnUpdate(_accumulatedFrameTime);
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ namespace Content.Server.GameObjects.EntitySystems
|
||||
{
|
||||
base.Update(frameTime);
|
||||
|
||||
foreach (var component in ComponentManager.EntityQuery<InstrumentComponent>())
|
||||
foreach (var component in ComponentManager.EntityQuery<InstrumentComponent>(true))
|
||||
{
|
||||
component.Update(frameTime);
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace Content.Server.GameObjects.EntitySystems
|
||||
{
|
||||
public override void Update(float frameTime)
|
||||
{
|
||||
foreach (var comp in ComponentManager.EntityQuery<LatheComponent>())
|
||||
foreach (var comp in ComponentManager.EntityQuery<LatheComponent>(true))
|
||||
{
|
||||
if (comp.Producing == false && comp.Queue.Count > 0)
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace Content.Server.GameObjects.EntitySystems
|
||||
{
|
||||
public void PingListeners(IEntity source, string message)
|
||||
{
|
||||
foreach (var listener in ComponentManager.EntityQuery<IListen>())
|
||||
foreach (var listener in ComponentManager.EntityQuery<IListen>(true))
|
||||
{
|
||||
// TODO: Map Position distance
|
||||
if (listener.CanListen(message, source))
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace Content.Server.GameObjects.EntitySystems
|
||||
|
||||
public override void Update(float frameTime)
|
||||
{
|
||||
foreach (var comp in ComponentManager.EntityQuery<MedicalScannerComponent>())
|
||||
foreach (var comp in ComponentManager.EntityQuery<MedicalScannerComponent>(true))
|
||||
{
|
||||
comp.Update(frameTime);
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace Content.Server.GameObjects.EntitySystems
|
||||
{
|
||||
base.Update(frameTime);
|
||||
|
||||
foreach (var metabolism in ComponentManager.EntityQuery<MetabolismComponent>())
|
||||
foreach (var metabolism in ComponentManager.EntityQuery<MetabolismComponent>(true))
|
||||
{
|
||||
metabolism.Update(frameTime);
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace Content.Server.GameObjects.EntitySystems
|
||||
public override void Update(float frameTime)
|
||||
{
|
||||
base.Update(frameTime);
|
||||
foreach (var comp in ComponentManager.EntityQuery<MicrowaveComponent>())
|
||||
foreach (var comp in ComponentManager.EntityQuery<MicrowaveComponent>(true))
|
||||
{
|
||||
comp.OnUpdate();
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace Content.Server.GameObjects.EntitySystems
|
||||
|
||||
if (_accumulatedFrameTime >= 10)
|
||||
{
|
||||
foreach (var morgue in ComponentManager.EntityQuery<MorgueEntityStorageComponent>())
|
||||
foreach (var morgue in ComponentManager.EntityQuery<MorgueEntityStorageComponent>(true))
|
||||
{
|
||||
morgue.Update();
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ namespace Content.Server.GameObjects.EntitySystems
|
||||
|
||||
_timer = 0f;
|
||||
|
||||
foreach (var plantHolder in _componentManager.EntityQuery<PlantHolderComponent>())
|
||||
foreach (var plantHolder in _componentManager.EntityQuery<PlantHolderComponent>(true))
|
||||
{
|
||||
plantHolder.Update();
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ namespace Content.Server.GameObjects.EntitySystems
|
||||
else
|
||||
{
|
||||
return pointer.InRangeUnOccluded(coordinates, 15, e => e == pointer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public bool TryPoint(ICommonSession? session, EntityCoordinates coords, EntityUid uid)
|
||||
@@ -199,7 +199,7 @@ namespace Content.Server.GameObjects.EntitySystems
|
||||
|
||||
public override void Update(float frameTime)
|
||||
{
|
||||
foreach (var component in ComponentManager.EntityQuery<PointingArrowComponent>())
|
||||
foreach (var component in ComponentManager.EntityQuery<PointingArrowComponent>(true))
|
||||
{
|
||||
component.Update(frameTime);
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace Content.Server.GameObjects.EntitySystems
|
||||
{
|
||||
public override void Update(float frameTime)
|
||||
{
|
||||
foreach (var comp in ComponentManager.EntityQuery<BaseCharger>())
|
||||
foreach (var comp in ComponentManager.EntityQuery<BaseCharger>(true))
|
||||
{
|
||||
comp.OnUpdate(frameTime);
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace Content.Server.GameObjects.EntitySystems
|
||||
{
|
||||
public override void Update(float frameTime)
|
||||
{
|
||||
foreach (var comp in ComponentManager.EntityQuery<BatteryComponent>())
|
||||
foreach (var comp in ComponentManager.EntityQuery<BatteryComponent>(true))
|
||||
{
|
||||
comp.OnUpdate(frameTime);
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace Content.Server.GameObjects.EntitySystems
|
||||
{
|
||||
public override void Update(float frameTime)
|
||||
{
|
||||
foreach (var comp in ComponentManager.EntityQuery<SmesComponent>())
|
||||
foreach (var comp in ComponentManager.EntityQuery<SmesComponent>(true))
|
||||
{
|
||||
comp.OnUpdate();
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace Content.Server.GameObjects.EntitySystems
|
||||
if (_updateTimer >= 1)
|
||||
{
|
||||
_updateTimer -= 1;
|
||||
foreach (var component in ComponentManager.EntityQuery<SolarControlConsoleComponent>())
|
||||
foreach (var component in ComponentManager.EntityQuery<SolarControlConsoleComponent>(true))
|
||||
{
|
||||
component.UpdateUIState();
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ namespace Content.Server.GameObjects.EntitySystems
|
||||
|
||||
TotalPanelPower = 0;
|
||||
|
||||
foreach (var panel in ComponentManager.EntityQuery<SolarPanelComponent>())
|
||||
foreach (var panel in ComponentManager.EntityQuery<SolarPanelComponent>(true))
|
||||
{
|
||||
// There's supposed to be rotational logic here, but that implies putting it somewhere.
|
||||
panel.Owner.Transform.WorldRotation = TargetPanelRotation;
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace Content.Server.GameObjects.EntitySystems
|
||||
{
|
||||
base.Update(frameTime);
|
||||
|
||||
foreach (var component in ComponentManager.EntityQuery<ProjectileComponent>())
|
||||
foreach (var component in ComponentManager.EntityQuery<ProjectileComponent>(true))
|
||||
{
|
||||
component.TimeLeft -= frameTime;
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace Content.Server.GameObjects.EntitySystems
|
||||
private void HandleTileChanged(object sender, TileChangedEventArgs eventArgs)
|
||||
{
|
||||
// If this gets hammered you could probably queue up all the tile changes every tick but I doubt that would ever happen.
|
||||
foreach (var (puddle, snapGrid) in ComponentManager.EntityQuery<PuddleComponent, SnapGridComponent>())
|
||||
foreach (var (puddle, snapGrid) in ComponentManager.EntityQuery<PuddleComponent, SnapGridComponent>(true))
|
||||
{
|
||||
// If the tile becomes space then delete it (potentially change by design)
|
||||
if (eventArgs.NewTile.GridIndex == puddle.Owner.Transform.GridID &&
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace Content.Server.GameObjects.EntitySystems
|
||||
|
||||
_messages.Add(message);
|
||||
|
||||
foreach (var radio in ComponentManager.EntityQuery<IRadio>())
|
||||
foreach (var radio in ComponentManager.EntityQuery<IRadio>(true))
|
||||
{
|
||||
if (radio.Channels.Contains(channel))
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace Content.Server.GameObjects.EntitySystems
|
||||
public override void Update(float frameTime)
|
||||
{
|
||||
base.Update(frameTime);
|
||||
foreach (var comp in ComponentManager.EntityQuery<ReagentGrinderComponent>())
|
||||
foreach (var comp in ComponentManager.EntityQuery<ReagentGrinderComponent>(true))
|
||||
{
|
||||
comp.OnUpdate();
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace Content.Server.GameObjects.EntitySystems
|
||||
{
|
||||
public override void Update(float frameTime)
|
||||
{
|
||||
foreach (var component in ComponentManager.EntityQuery<RecyclerComponent>())
|
||||
foreach (var component in ComponentManager.EntityQuery<RecyclerComponent>(true))
|
||||
{
|
||||
component.Update(frameTime);
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace Content.Server.GameObjects.EntitySystems
|
||||
{
|
||||
public override void Update(float frameTime)
|
||||
{
|
||||
foreach (var component in ComponentManager.EntityQuery<RoguePointingArrowComponent>())
|
||||
foreach (var component in ComponentManager.EntityQuery<RoguePointingArrowComponent>(true))
|
||||
{
|
||||
component.Update(frameTime);
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace Content.Server.GameObjects.EntitySystems
|
||||
var shouldUpdate = curTimeSingulo >= 1f;
|
||||
var shouldPull = curTimePull >= 0.2f;
|
||||
if (!shouldUpdate && !shouldPull) return;
|
||||
var singulos = ComponentManager.EntityQuery<SingularityComponent>();
|
||||
var singulos = ComponentManager.EntityQuery<SingularityComponent>(true);
|
||||
|
||||
if (curTimeSingulo >= 1f)
|
||||
{
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace Content.Server.GameObjects.EntitySystems.StationEvents
|
||||
{
|
||||
base.Update(frameTime);
|
||||
|
||||
foreach (var comp in ComponentManager.EntityQuery<RadiationPulseComponent>())
|
||||
foreach (var comp in ComponentManager.EntityQuery<RadiationPulseComponent>(true))
|
||||
{
|
||||
comp.Update(frameTime);
|
||||
var ent = comp.Owner;
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace Content.Server.GameObjects.EntitySystems
|
||||
/// <inheritdoc />
|
||||
public override void Update(float frameTime)
|
||||
{
|
||||
foreach (var component in ComponentManager.EntityQuery<ServerStorageComponent>())
|
||||
foreach (var component in ComponentManager.EntityQuery<ServerStorageComponent>(true))
|
||||
{
|
||||
CheckSubscribedEntities(component);
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace Content.Server.GameObjects.EntitySystems
|
||||
{
|
||||
base.Update(frameTime);
|
||||
|
||||
foreach (var stressTest in ComponentManager.EntityQuery<StressTestMovementComponent>())
|
||||
foreach (var stressTest in ComponentManager.EntityQuery<StressTestMovementComponent>(true))
|
||||
{
|
||||
var transform = stressTest.Owner.Transform;
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace Content.Server.GameObjects.EntitySystems
|
||||
{
|
||||
base.Update(frameTime);
|
||||
|
||||
foreach (var component in ComponentManager.EntityQuery<StunnableComponent>())
|
||||
foreach (var component in ComponentManager.EntityQuery<StunnableComponent>(true))
|
||||
{
|
||||
component.Update(frameTime);
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace Content.Server.GameObjects.EntitySystems
|
||||
|
||||
if (_accumulatedFrameTime > 1)
|
||||
{
|
||||
foreach (var component in ComponentManager.EntityQuery<ThirstComponent>())
|
||||
foreach (var component in ComponentManager.EntityQuery<ThirstComponent>(true))
|
||||
{
|
||||
component.OnUpdate(_accumulatedFrameTime);
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace Content.Server.GameObjects.EntitySystems
|
||||
{
|
||||
public override void Update(float frameTime)
|
||||
{
|
||||
foreach (var vaporComp in ComponentManager.EntityQuery<VaporComponent>())
|
||||
foreach (var vaporComp in ComponentManager.EntityQuery<VaporComponent>(true))
|
||||
{
|
||||
vaporComp.Update(frameTime);
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace Content.Server.Objectives.Conditions
|
||||
public override IObjectiveCondition GetAssigned(Mind mind)
|
||||
{
|
||||
var entityMgr = IoCManager.Resolve<IEntityManager>();
|
||||
var allHumans = entityMgr.ComponentManager.EntityQuery<MindComponent>().Where(mc =>
|
||||
var allHumans = entityMgr.ComponentManager.EntityQuery<MindComponent>(true).Where(mc =>
|
||||
{
|
||||
var entity = mc.Mind?.OwnedEntity;
|
||||
return (entity?.GetComponentOrNull<IMobStateComponent>()?.IsAlive() ?? false) && mc.Mind != mind;
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace Content.Server.StationEvents
|
||||
{
|
||||
var componentManager = IoCManager.Resolve<IComponentManager>();
|
||||
|
||||
foreach (var component in componentManager.EntityQuery<PowerReceiverComponent>())
|
||||
foreach (var component in componentManager.EntityQuery<PowerReceiverComponent>(true))
|
||||
{
|
||||
component.PowerDisabled = true;
|
||||
_powered.Add(component.Owner);
|
||||
|
||||
Reference in New Issue
Block a user