From: Menshin Date: Tue, 5 Mar 2024 15:57:28 +0000 (+0100) Subject: Enforce Space Heater max/min temperatures server side (#25835) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=bad11742d3cdf23ac5cc9354da98767ff623449a;p=space-station-14.git Enforce Space Heater max/min temperatures server side (#25835) Actually enforce max/min temperatures server side --- diff --git a/Content.Server/Atmos/Portable/SpaceHeaterSystem.cs b/Content.Server/Atmos/Portable/SpaceHeaterSystem.cs index b7336a7471..1631132821 100644 --- a/Content.Server/Atmos/Portable/SpaceHeaterSystem.cs +++ b/Content.Server/Atmos/Portable/SpaceHeaterSystem.cs @@ -109,7 +109,7 @@ public sealed class SpaceHeaterSystem : EntitySystem if (!TryComp(uid, out var thermoMachine)) return; - thermoMachine.TargetTemperature += args.Temperature; + thermoMachine.TargetTemperature = float.Clamp(thermoMachine.TargetTemperature + args.Temperature, thermoMachine.MinTemperature, thermoMachine.MaxTemperature); UpdateAppearance(uid); DirtyUI(uid, spaceHeater);