Skip to content

Commit

Permalink
Enforce Space Heater max/min temperatures server side (space-wizards#…
Browse files Browse the repository at this point in the history
…25835)

Actually enforce max/min temperatures server side
  • Loading branch information
Menshin authored Mar 5, 2024
1 parent 574c625 commit bad1174
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Content.Server/Atmos/Portable/SpaceHeaterSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ private void OnTemperatureChanged(EntityUid uid, SpaceHeaterComponent spaceHeate
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);
Expand Down

0 comments on commit bad1174

Please sign in to comment.