Enforce Space Heater max/min temperatures server side (#25835)
Actually enforce max/min temperatures server side
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user