Partial atmos refactor (#22521)

* Reduce atmos component queries

* Remove method events

* Cache airtight data

* Make MolesArchived nullable

* Fix airtight cache

* only get tile def once

* Immutable mixtures

* firelock queries

* misc

* misc cleanup

* Trim disconnected tiles

* Fix merge issues and bugs

* Why does the PR keep increasing in scope

* debug overlay

* Fix bugs

* Fix test, remove unused events

* Add setmapatmos command

* Fix overlays

* Add map check

* A

* Resolve conflicts with #26102

* Remove some obsolete methods
This commit is contained in:
Leon Friedrich
2024-03-24 03:34:56 +11:00
committed by GitHub
parent 05f282f5ce
commit 18a35e7e83
43 changed files with 922 additions and 666 deletions

View File

@@ -8,11 +8,6 @@ namespace Content.Shared.Atmos
/// </summary>
public static class Atmospherics
{
static Atmospherics()
{
AdjustedNumberOfGases = MathHelper.NextMultipleOf(TotalNumberOfGases, 4);
}
#region ATMOS
/// <summary>
/// The universal gas constant, in kPa*L/(K*mol)
@@ -183,7 +178,7 @@ namespace Content.Shared.Atmos
/// This is the actual length of the gases arrays in mixtures.
/// Set to the closest multiple of 4 relative to <see cref="TotalNumberOfGases"/> for SIMD reasons.
/// </summary>
public static readonly int AdjustedNumberOfGases;
public const int AdjustedNumberOfGases = ((TotalNumberOfGases + 3) / 4) * 4;
/// <summary>
/// Amount of heat released per mole of burnt hydrogen or tritium (hydrogen isotope)

View File

@@ -66,7 +66,10 @@ namespace Content.Shared.Atmos.EntitySystems
[Serializable, NetSerializable]
public readonly struct GasOverlayData : IEquatable<GasOverlayData>
{
[ViewVariables]
public readonly byte FireState;
[ViewVariables]
public readonly byte[] Opacity;
// TODO change fire color based on temps