From fb3df966546ef6e5448e6a7970391e794ffc4a58 Mon Sep 17 00:00:00 2001 From: Rane <60792108+Elijahrane@users.noreply.github.com> Date: Mon, 23 Jan 2023 19:33:11 -0500 Subject: [PATCH] log error when trying to set invalid solution ratio and clamp it (#13675) --- .../Visualizers/SolutionContainerVisualsSystem.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Content.Client/Chemistry/Visualizers/SolutionContainerVisualsSystem.cs b/Content.Client/Chemistry/Visualizers/SolutionContainerVisualsSystem.cs index f3c5cdf85b..a1ec5ac7ac 100644 --- a/Content.Client/Chemistry/Visualizers/SolutionContainerVisualsSystem.cs +++ b/Content.Client/Chemistry/Visualizers/SolutionContainerVisualsSystem.cs @@ -18,6 +18,15 @@ public sealed class SolutionContainerVisualsSystem : VisualizerSystem 1f) + { + Logger.Error("Attempted to set solution container visuals volume ratio on " + ToPrettyString(uid) + " to a value greater than 1. Volume should never be greater than max volume!"); + fraction = 1f; + } + var closestFillSprite = (int) Math.Round(fraction * component.MaxFillLevels); if (closestFillSprite > 0)