changes the min and max variables in the TargetTemperature clamp to t… (#40453)

changes the min and max variables in the TargetTemperature clamp to the space heater min and max temperatures
This commit is contained in:
Lordbrandon12 2025-10-07 09:42:43 -03:00 committed by Vanessa
parent 9da2103b7f
commit b5192e29e9
1 changed files with 3 additions and 1 deletions

View File

@ -112,7 +112,9 @@ public sealed class SpaceHeaterSystem : EntitySystem
if (!TryComp<GasThermoMachineComponent>(uid, out var thermoMachine)) if (!TryComp<GasThermoMachineComponent>(uid, out var thermoMachine))
return; return;
thermoMachine.TargetTemperature = float.Clamp(thermoMachine.TargetTemperature + args.Temperature, thermoMachine.MinTemperature, thermoMachine.MaxTemperature); thermoMachine.TargetTemperature = float.Clamp(thermoMachine.TargetTemperature + args.Temperature,
spaceHeater.MinTemperature,
spaceHeater.MaxTemperature);
UpdateAppearance(uid); UpdateAppearance(uid);
DirtyUI(uid, spaceHeater); DirtyUI(uid, spaceHeater);