Makes many thing that update on paused *not* do that. (#4938)

This commit is contained in:
Vera Aguilera Puerto
2021-10-18 14:58:34 +02:00
committed by GitHub
parent 30a912e54f
commit b904efb942
24 changed files with 27 additions and 27 deletions

View File

@@ -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);
}

View File

@@ -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);
}

View File

@@ -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)
{

View File

@@ -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);
}

View File

@@ -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);
}

View File

@@ -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())
{

View File

@@ -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)
{

View File

@@ -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)
{

View File

@@ -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();
}

View File

@@ -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)
{

View File

@@ -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);
}

View File

@@ -21,7 +21,7 @@ namespace Content.Server.Medical
{
base.Initialize();
SubscribeLocalEvent<MedicalScannerComponent, RelayMovementEntityEvent>(OnRelayMovement);
SubscribeLocalEvent<MedicalScannerComponent, RelayMovementEntityEvent>(OnRelayMovement);
SubscribeLocalEvent<MedicalScannerComponent, GetInteractionVerbsEvent>(AddInsertOtherVerb);
SubscribeLocalEvent<MedicalScannerComponent, GetAlternativeVerbsEvent>(AddAlternativeVerbs);
}
@@ -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);
}

View File

@@ -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();
}

View File

@@ -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);
}

View File

@@ -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);
}

View File

@@ -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();
}

View File

@@ -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);
}

View File

@@ -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);
}

View File

@@ -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);
}

View File

@@ -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;

View File

@@ -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();
}

View File

@@ -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;

View File

@@ -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);
}

View File

@@ -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;