Atmospherics Substepping (#40465)
* initial shitcode commit * command boilerplate * command flushed out and docs fixes * missed one important thing in method extraction * do loc properly * rest later * address review * this worked on my laptop but not on my desktop but okay * review comments * address review
This commit is contained in:
@@ -46,4 +46,27 @@ public sealed partial class AtmosphereSystem
|
||||
|
||||
return processingPaused;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Fully runs one <see cref="GridAtmosphereComponent"/> entity through the entire Atmos processing loop.
|
||||
/// </summary>
|
||||
/// <param name="ent">The entity to simulate.</param>
|
||||
/// <param name="mapAtmosphere">The <see cref="MapAtmosphereComponent"/> that belongs to the grid's map.</param>
|
||||
/// <param name="frameTime">Elapsed time to simulate. Recommended value is <see cref="AtmosTickRate"/>.</param>
|
||||
public void RunProcessingFull(Entity<GridAtmosphereComponent, GasTileOverlayComponent, MapGridComponent, TransformComponent> ent,
|
||||
Entity<MapAtmosphereComponent?> mapAtmosphere,
|
||||
float frameTime)
|
||||
{
|
||||
while (ProcessAtmosphere(ent, mapAtmosphere, frameTime) != AtmosphereProcessingCompletionState.Finished) { }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Allows or disallows atmosphere simulation on a <see cref="GridAtmosphereComponent"/>.
|
||||
/// </summary>
|
||||
/// <param name="ent">The atmosphere to pause or unpause processing.</param>
|
||||
/// <param name="simulate">The state to set. True means that the atmosphere is allowed to simulate, false otherwise.</param>
|
||||
public void SetAtmosphereSimulation(Entity<GridAtmosphereComponent> ent, bool simulate)
|
||||
{
|
||||
ent.Comp.Simulated = simulate;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user