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

Actually enforce max/min temperatures server side
This commit is contained in:
Menshin
2024-03-05 16:57:28 +01:00
committed by GitHub
parent 574c625d12
commit bad11742d3

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);