Improve Gas Yaml Serialization (#40070)
* Make yaml gas serialization cleaner * fix exception * fix validation code * rudimentary test & permissive loading * change it a bit * Test fixes and adjustments
This commit is contained in:
@@ -458,11 +458,8 @@ namespace Content.Server.Atmos.EntitySystems
|
||||
continue;
|
||||
|
||||
var doReaction = true;
|
||||
for (var i = 0; i < prototype.MinimumRequirements.Length; i++)
|
||||
for (var i = 0; i < Atmospherics.TotalNumberOfGases; i++)
|
||||
{
|
||||
if(i >= Atmospherics.TotalNumberOfGases)
|
||||
throw new IndexOutOfRangeException("Reaction Gas Minimum Requirements Array Prototype exceeds total number of gases!");
|
||||
|
||||
var req = prototype.MinimumRequirements[i];
|
||||
|
||||
if (!(mixture.GetMoles(i) < req))
|
||||
|
||||
Reference in New Issue
Block a user