Fix ScaleSolution() (#13630)

This commit is contained in:
Leon Friedrich
2023-01-22 03:35:12 +13:00
committed by GitHub
parent a9b9dc0a10
commit c3e6ac2563
2 changed files with 48 additions and 2 deletions

View File

@@ -317,7 +317,7 @@ namespace Content.Shared.Chemistry.Components
if (scale == 1)
return;
if (scale == 0)
if (scale <= 0)
{
RemoveAllSolution();
return;
@@ -326,7 +326,7 @@ namespace Content.Shared.Chemistry.Components
_heatCapacity *= scale;
Volume *= scale;
for (int i = 0; i <= Contents.Count; i++)
for (int i = 0; i < Contents.Count; i++)
{
var old = Contents[i];
Contents[i] = new ReagentQuantity(old.ReagentId, old.Quantity * scale);