From bad11742d3cdf23ac5cc9354da98767ff623449a Mon Sep 17 00:00:00 2001 From: Menshin Date: Tue, 5 Mar 2024 16:57:28 +0100 Subject: [PATCH] Enforce Space Heater max/min temperatures server side (#25835) Actually enforce max/min temperatures server side --- Content.Server/Atmos/Portable/SpaceHeaterSystem.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.51.2