Makes many thing that update on paused *not* do that. (#4938)
This commit is contained in:
committed by
GitHub
parent
30a912e54f
commit
b904efb942
@@ -15,7 +15,7 @@ namespace Content.Server.AME
|
||||
_accumulatedFrameTime += frameTime;
|
||||
if (_accumulatedFrameTime >= 10)
|
||||
{
|
||||
foreach (var comp in EntityManager.EntityQuery<AMEControllerComponent>(true))
|
||||
foreach (var comp in EntityManager.EntityQuery<AMEControllerComponent>())
|
||||
{
|
||||
comp.OnUpdate(frameTime);
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ namespace Content.Server.Arcade
|
||||
|
||||
public override void Update(float frameTime)
|
||||
{
|
||||
foreach (var comp in EntityManager.EntityQuery<BlockGameArcadeComponent>(true))
|
||||
foreach (var comp in EntityManager.EntityQuery<BlockGameArcadeComponent>())
|
||||
{
|
||||
comp.DoGameTick(frameTime);
|
||||
}
|
||||
|
||||
@@ -78,7 +78,7 @@ namespace Content.Server.Chemistry.EntitySystems
|
||||
public override void Update(float frameTime)
|
||||
{
|
||||
foreach (var (vaporComp, solution) in EntityManager
|
||||
.EntityQuery<VaporComponent, SolutionContainerManagerComponent>(true))
|
||||
.EntityQuery<VaporComponent, SolutionContainerManagerComponent>())
|
||||
{
|
||||
foreach (var (_, value) in solution.Solutions)
|
||||
{
|
||||
|
||||
@@ -72,7 +72,7 @@ namespace Content.Server.Cloning
|
||||
|
||||
public override void Update(float frameTime)
|
||||
{
|
||||
foreach (var (cloning, power) in EntityManager.EntityQuery<CloningPodComponent, ApcPowerReceiverComponent>(true))
|
||||
foreach (var (cloning, power) in EntityManager.EntityQuery<CloningPodComponent, ApcPowerReceiverComponent>())
|
||||
{
|
||||
if (cloning.UiKnownPowerState != power.Powered)
|
||||
{
|
||||
@@ -127,7 +127,7 @@ namespace Content.Server.Cloning
|
||||
|
||||
public void OnChangeMadeToDnaScans()
|
||||
{
|
||||
foreach (var cloning in EntityManager.EntityQuery<CloningPodComponent>(true))
|
||||
foreach (var cloning in EntityManager.EntityQuery<CloningPodComponent>())
|
||||
UpdateUserInterface(cloning);
|
||||
}
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace Content.Server.Disposal.Unit.EntitySystems
|
||||
|
||||
public override void Update(float frameTime)
|
||||
{
|
||||
foreach (var comp in EntityManager.EntityQuery<DisposalHolderComponent>(true))
|
||||
foreach (var comp in EntityManager.EntityQuery<DisposalHolderComponent>())
|
||||
{
|
||||
comp.Update(frameTime);
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace Content.Server.DoAfter
|
||||
{
|
||||
base.Update(frameTime);
|
||||
|
||||
foreach (var comp in EntityManager.EntityQuery<DoAfterComponent>(true))
|
||||
foreach (var comp in EntityManager.EntityQuery<DoAfterComponent>())
|
||||
{
|
||||
foreach (var doAfter in comp.DoAfters.ToArray())
|
||||
{
|
||||
|
||||
@@ -192,7 +192,7 @@ namespace Content.Server.Ghost
|
||||
|
||||
private IEnumerable<string> GetLocationNames()
|
||||
{
|
||||
foreach (var warp in EntityManager.EntityQuery<WarpPointComponent>())
|
||||
foreach (var warp in EntityManager.EntityQuery<WarpPointComponent>(true))
|
||||
{
|
||||
if (warp.Location != null)
|
||||
{
|
||||
|
||||
@@ -59,7 +59,7 @@ namespace Content.Server.Gravity.EntitySystems
|
||||
var gridId = component.Owner.Transform.GridID;
|
||||
GravityChangedMessage message;
|
||||
|
||||
foreach (var generator in EntityManager.EntityQuery<GravityGeneratorComponent>(true))
|
||||
foreach (var generator in EntityManager.EntityQuery<GravityGeneratorComponent>())
|
||||
{
|
||||
if (generator.Owner.Transform.GridID == gridId && generator.Status == GravityGeneratorStatus.On)
|
||||
{
|
||||
@@ -78,7 +78,7 @@ namespace Content.Server.Gravity.EntitySystems
|
||||
public override void Update(float frameTime)
|
||||
{
|
||||
// TODO: Pointless iteration, just make both of these event-based PLEASE
|
||||
foreach (var generator in EntityManager.EntityQuery<GravityGeneratorComponent>(true))
|
||||
foreach (var generator in EntityManager.EntityQuery<GravityGeneratorComponent>())
|
||||
{
|
||||
if (generator.NeedsUpdate)
|
||||
{
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace Content.Server.Kitchen.EntitySystems
|
||||
public override void Update(float frameTime)
|
||||
{
|
||||
base.Update(frameTime);
|
||||
foreach (var comp in EntityManager.EntityQuery<MicrowaveComponent>(true))
|
||||
foreach (var comp in EntityManager.EntityQuery<MicrowaveComponent>())
|
||||
{
|
||||
comp.OnUpdate();
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace Content.Server.Lathe
|
||||
{
|
||||
public override void Update(float frameTime)
|
||||
{
|
||||
foreach (var comp in EntityManager.EntityQuery<LatheComponent>(true))
|
||||
foreach (var comp in EntityManager.EntityQuery<LatheComponent>())
|
||||
{
|
||||
if (comp.Producing == false && comp.Queue.Count > 0)
|
||||
{
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace Content.Server.Light.EntitySystems
|
||||
{
|
||||
public override void Update(float frameTime)
|
||||
{
|
||||
foreach (var light in EntityManager.EntityQuery<ExpendableLightComponent>(true))
|
||||
foreach (var light in EntityManager.EntityQuery<ExpendableLightComponent>())
|
||||
{
|
||||
light.Update(frameTime);
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@ namespace Content.Server.Medical
|
||||
|
||||
public override void Update(float frameTime)
|
||||
{
|
||||
foreach (var comp in EntityManager.EntityQuery<MedicalScannerComponent>(true))
|
||||
foreach (var comp in EntityManager.EntityQuery<MedicalScannerComponent>())
|
||||
{
|
||||
comp.Update(frameTime);
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ namespace Content.Server.Morgue
|
||||
|
||||
if (_accumulatedFrameTime >= 10)
|
||||
{
|
||||
foreach (var morgue in EntityManager.EntityQuery<MorgueEntityStorageComponent>(true))
|
||||
foreach (var morgue in EntityManager.EntityQuery<MorgueEntityStorageComponent>())
|
||||
{
|
||||
morgue.Update();
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace Content.Server.Nutrition.EntitySystems
|
||||
|
||||
if (_accumulatedFrameTime > 1)
|
||||
{
|
||||
foreach (var comp in EntityManager.EntityQuery<HungerComponent>(true))
|
||||
foreach (var comp in EntityManager.EntityQuery<HungerComponent>())
|
||||
{
|
||||
comp.OnUpdate(_accumulatedFrameTime);
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace Content.Server.Nutrition.EntitySystems
|
||||
|
||||
if (_accumulatedFrameTime > 1)
|
||||
{
|
||||
foreach (var component in EntityManager.EntityQuery<ThirstComponent>(true))
|
||||
foreach (var component in EntityManager.EntityQuery<ThirstComponent>())
|
||||
{
|
||||
component.OnUpdate(_accumulatedFrameTime);
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ namespace Content.Server.Plants
|
||||
|
||||
_timer = 0f;
|
||||
|
||||
foreach (var plantHolder in EntityManager.EntityQuery<PlantHolderComponent>(true))
|
||||
foreach (var plantHolder in EntityManager.EntityQuery<PlantHolderComponent>())
|
||||
{
|
||||
plantHolder.Update();
|
||||
}
|
||||
|
||||
@@ -225,7 +225,7 @@ namespace Content.Server.Pointing.EntitySystems
|
||||
|
||||
public override void Update(float frameTime)
|
||||
{
|
||||
foreach (var component in EntityManager.EntityQuery<PointingArrowComponent>(true))
|
||||
foreach (var component in EntityManager.EntityQuery<PointingArrowComponent>())
|
||||
{
|
||||
component.Update(frameTime);
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace Content.Server.Pointing.EntitySystems
|
||||
{
|
||||
public override void Update(float frameTime)
|
||||
{
|
||||
foreach (var component in EntityManager.EntityQuery<RoguePointingArrowComponent>(true))
|
||||
foreach (var component in EntityManager.EntityQuery<RoguePointingArrowComponent>())
|
||||
{
|
||||
component.Update(frameTime);
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace Content.Server.Power.EntitySystems
|
||||
|
||||
public override void Update(float frameTime)
|
||||
{
|
||||
foreach (var comp in EntityManager.EntityQuery<BaseCharger>(true))
|
||||
foreach (var comp in EntityManager.EntityQuery<BaseCharger>())
|
||||
{
|
||||
comp.OnUpdate(frameTime);
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace Content.Server.Radiation
|
||||
_accumulator -= RadiationCooldown;
|
||||
|
||||
// All code here runs effectively every RadiationCooldown seconds, so use that as the "frame time".
|
||||
foreach (var comp in EntityManager.EntityQuery<RadiationPulseComponent>(true))
|
||||
foreach (var comp in EntityManager.EntityQuery<RadiationPulseComponent>())
|
||||
{
|
||||
comp.Update(RadiationCooldown);
|
||||
var ent = comp.Owner;
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace Content.Server.Solar.EntitySystems
|
||||
if (_updateTimer >= 1)
|
||||
{
|
||||
_updateTimer -= 1;
|
||||
foreach (var component in EntityManager.EntityQuery<SolarControlConsoleComponent>(true))
|
||||
foreach (var component in EntityManager.EntityQuery<SolarControlConsoleComponent>())
|
||||
{
|
||||
component.UpdateUIState();
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ namespace Content.Server.Solar.EntitySystems
|
||||
|
||||
TotalPanelPower = 0;
|
||||
|
||||
foreach (var panel in EntityManager.EntityQuery<SolarPanelComponent>(false))
|
||||
foreach (var panel in EntityManager.EntityQuery<SolarPanelComponent>())
|
||||
{
|
||||
// There's supposed to be rotational logic here, but that implies putting it somewhere.
|
||||
panel.Owner.Transform.WorldRotation = TargetPanelRotation;
|
||||
|
||||
@@ -53,7 +53,7 @@ namespace Content.Server.Storage.EntitySystems
|
||||
/// <inheritdoc />
|
||||
public override void Update(float frameTime)
|
||||
{
|
||||
foreach (var component in EntityManager.EntityQuery<ServerStorageComponent>(true))
|
||||
foreach (var component in EntityManager.EntityQuery<ServerStorageComponent>())
|
||||
{
|
||||
CheckSubscribedEntities(component);
|
||||
}
|
||||
|
||||
@@ -92,7 +92,7 @@ namespace Content.Server.Tabletop
|
||||
{
|
||||
base.Update(frameTime);
|
||||
|
||||
foreach (var gamer in EntityManager.EntityQuery<TabletopGamerComponent>(true))
|
||||
foreach (var gamer in EntityManager.EntityQuery<TabletopGamerComponent>())
|
||||
{
|
||||
if (!EntityManager.TryGetEntity(gamer.Tabletop, out var table))
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user