Some more int -> decimal conversions. Changed the use of the Solution constructor.

This commit is contained in:
PrPleGoo
2020-03-21 16:22:35 +01:00
parent dc66621804
commit 539214b1ad
6 changed files with 28 additions and 22 deletions

View File

@@ -172,7 +172,7 @@ namespace Content.Shared.Chemistry
public Solution SplitSolution(decimal quantity)
{
if (quantity <= 0)
return new Solution();
return IoCManager.InjectDependencies(new Solution());
Solution newSolution;
@@ -183,7 +183,7 @@ namespace Content.Shared.Chemistry
return newSolution;
}
newSolution = new Solution();
newSolution = IoCManager.InjectDependencies(new Solution());
var newTotalVolume = 0M;
var ratio = (TotalVolume - quantity) / TotalVolume;
@@ -235,7 +235,7 @@ namespace Content.Shared.Chemistry
public Solution Clone()
{
var volume = 0M;
var newSolution = new Solution();
var newSolution = IoCManager.InjectDependencies(new Solution());
for (var i = 0; i < _contents.Count; i++)
{