Add YAML gas reactions (#22803)
* Add YAML gas reactions * Convert more reactions * Use enum names * Convert more names * Add migration for MiasmaCanister * Prevent reactants from going negative * Fix energy conservation, lift energy calculation * Fix comment * Comment * Add rate multiplier
This commit is contained in:
@@ -10,6 +10,7 @@ namespace Content.Server.Atmos.EntitySystems
|
||||
public sealed partial class AtmosphereSystem
|
||||
{
|
||||
[Dependency] private readonly IPrototypeManager _protoMan = default!;
|
||||
[Dependency] private readonly GenericGasReactionSystem _reaction = default!;
|
||||
|
||||
private GasReactionPrototype[] _gasReactions = Array.Empty<GasReactionPrototype>();
|
||||
private float[] _gasSpecificHeats = new float[Atmospherics.TotalNumberOfGases];
|
||||
@@ -346,7 +347,7 @@ namespace Content.Server.Atmos.EntitySystems
|
||||
break;
|
||||
}
|
||||
|
||||
return reaction;
|
||||
return _reaction.ReactAll(GasReactions, mixture, holder);
|
||||
}
|
||||
|
||||
public enum GasCompareResult
|
||||
|
||||
Reference in New Issue
Block a user