Enforce Space Heater max/min temperatures server side (#25835)

Actually enforce max/min temperatures server side

(cherry picked from commit bad11742d3cdf23ac5cc9354da98767ff623449a)
This commit is contained in:
Menshin 2024-03-05 16:57:28 +01:00 committed by Debug
parent 31a4cdab4c
commit f2db506d1d
No known key found for this signature in database
GPG Key ID: 271270A74EF9C350
1 changed files with 1 additions and 1 deletions

View File

@ -109,7 +109,7 @@ public sealed class SpaceHeaterSystem : EntitySystem
if (!TryComp<GasThermoMachineComponent>(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);