split temperature protection into heating and cooling (#30662)
* split temperature protection into heating and cooling * fugg * weh
This commit is contained in:
@@ -299,7 +299,11 @@ public sealed class TemperatureSystem : EntitySystem
|
||||
private void OnTemperatureChangeAttempt(EntityUid uid, TemperatureProtectionComponent component,
|
||||
InventoryRelayedEvent<ModifyChangedTemperatureEvent> args)
|
||||
{
|
||||
var ev = new GetTemperatureProtectionEvent(component.Coefficient);
|
||||
var coefficient = args.Args.TemperatureDelta < 0
|
||||
? component.CoolingCoefficient
|
||||
: component.HeatingCoefficient;
|
||||
|
||||
var ev = new GetTemperatureProtectionEvent(coefficient);
|
||||
RaiseLocalEvent(uid, ref ev);
|
||||
|
||||
args.Args.TemperatureDelta *= ev.Coefficient;
|
||||
|
||||
Reference in New Issue
Block a user