Fix tanks being empty on round start (#4696)

* Fix tanks being empty on round start

* Fix test.

Co-authored-by: Vera Aguilera Puerto <gradientvera@outlook.com>
This commit is contained in:
Ygg01
2021-10-01 15:48:00 +02:00
committed by GitHub
parent cf82670e12
commit 478909dcbb
4 changed files with 12 additions and 86 deletions

View File

@@ -50,11 +50,9 @@ namespace Content.Shared.Chemistry.EntitySystems
foreach (var keyValue in component.Solutions)
{
var solutionHolder = keyValue.Value;
// solutionHolder.OwnerUid = component.Owner.Uid;
if (solutionHolder.MaxVolume == ReagentUnit.Zero && solutionHolder.TotalVolume > solutionHolder.MaxVolume)
{
solutionHolder.MaxVolume = solutionHolder.TotalVolume;
}
solutionHolder.MaxVolume = solutionHolder.TotalVolume > solutionHolder.InitialMaxVolume
? solutionHolder.TotalVolume
: solutionHolder.InitialMaxVolume;
UpdateAppearance(uid, solutionHolder);
}