split temperature protection into heating and cooling (#30662)
* split temperature protection into heating and cooling * fugg * weh
This commit is contained in:
@@ -7,10 +7,16 @@ namespace Content.Server.Temperature.Components;
|
|||||||
public sealed partial class TemperatureProtectionComponent : Component
|
public sealed partial class TemperatureProtectionComponent : Component
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// How much to multiply temperature deltas by.
|
/// Multiplier for the transferred heat when heating up
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DataField]
|
[DataField]
|
||||||
public float Coefficient = 1.0f;
|
public float HeatingCoefficient = 1.0f;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Multiplier for the transferred heat when cooling down
|
||||||
|
/// </summary>
|
||||||
|
[DataField]
|
||||||
|
public float CoolingCoefficient = 1.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -299,7 +299,11 @@ public sealed class TemperatureSystem : EntitySystem
|
|||||||
private void OnTemperatureChangeAttempt(EntityUid uid, TemperatureProtectionComponent component,
|
private void OnTemperatureChangeAttempt(EntityUid uid, TemperatureProtectionComponent component,
|
||||||
InventoryRelayedEvent<ModifyChangedTemperatureEvent> args)
|
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);
|
RaiseLocalEvent(uid, ref ev);
|
||||||
|
|
||||||
args.Args.TemperatureDelta *= ev.Coefficient;
|
args.Args.TemperatureDelta *= ev.Coefficient;
|
||||||
|
|||||||
@@ -126,7 +126,8 @@
|
|||||||
highPressureMultiplier: 0.6
|
highPressureMultiplier: 0.6
|
||||||
lowPressureMultiplier: 1000
|
lowPressureMultiplier: 1000
|
||||||
- type: TemperatureProtection
|
- type: TemperatureProtection
|
||||||
coefficient: 0.2
|
heatingCoefficient: 0.2
|
||||||
|
coolingCoefficient: 0.2
|
||||||
- type: IngestionBlocker
|
- type: IngestionBlocker
|
||||||
- type: Clothing
|
- type: Clothing
|
||||||
#Copies ClothingHeadHardsuitBase behavior
|
#Copies ClothingHeadHardsuitBase behavior
|
||||||
@@ -168,7 +169,8 @@
|
|||||||
highPressureMultiplier: 0.3
|
highPressureMultiplier: 0.3
|
||||||
lowPressureMultiplier: 1000
|
lowPressureMultiplier: 1000
|
||||||
- type: TemperatureProtection
|
- type: TemperatureProtection
|
||||||
coefficient: 0.1
|
heatingCoefficient: 0.1
|
||||||
|
coolingCoefficient: 0.1
|
||||||
- type: Armor
|
- type: Armor
|
||||||
modifiers:
|
modifiers:
|
||||||
coefficients:
|
coefficients:
|
||||||
@@ -258,7 +260,8 @@
|
|||||||
quickEquip: false
|
quickEquip: false
|
||||||
slots: [ HEAD ]
|
slots: [ HEAD ]
|
||||||
- type: TemperatureProtection
|
- type: TemperatureProtection
|
||||||
coefficient: 0.7
|
heatingCoefficient: 1.05
|
||||||
|
coolingCoefficient: 0.7
|
||||||
- type: GroupExamine
|
- type: GroupExamine
|
||||||
- type: HideLayerClothing
|
- type: HideLayerClothing
|
||||||
slots:
|
slots:
|
||||||
|
|||||||
@@ -62,7 +62,8 @@
|
|||||||
- type: Clothing
|
- type: Clothing
|
||||||
sprite: Clothing/Head/Helmets/paramedhelm.rsi
|
sprite: Clothing/Head/Helmets/paramedhelm.rsi
|
||||||
- type: TemperatureProtection
|
- type: TemperatureProtection
|
||||||
coefficient: 0.1
|
heatingCoefficient: 0.1
|
||||||
|
coolingCoefficient: 0.1
|
||||||
- type: Armor
|
- type: Armor
|
||||||
modifiers:
|
modifiers:
|
||||||
coefficients:
|
coefficients:
|
||||||
|
|||||||
@@ -60,7 +60,8 @@
|
|||||||
highPressureMultiplier: 0.08
|
highPressureMultiplier: 0.08
|
||||||
lowPressureMultiplier: 1000
|
lowPressureMultiplier: 1000
|
||||||
- type: TemperatureProtection
|
- type: TemperatureProtection
|
||||||
coefficient: 0.005
|
heatingCoefficient: 0.005
|
||||||
|
coolingCoefficient: 0.005
|
||||||
- type: FireProtection
|
- type: FireProtection
|
||||||
reduction: 0.2
|
reduction: 0.2
|
||||||
|
|
||||||
@@ -407,7 +408,8 @@
|
|||||||
highPressureMultiplier: 0.08
|
highPressureMultiplier: 0.08
|
||||||
lowPressureMultiplier: 1000
|
lowPressureMultiplier: 1000
|
||||||
- type: TemperatureProtection
|
- type: TemperatureProtection
|
||||||
coefficient: 0.005
|
heatingCoefficient: 0.005
|
||||||
|
coolingCoefficient: 0.005
|
||||||
- type: FireProtection
|
- type: FireProtection
|
||||||
reduction: 0.2
|
reduction: 0.2
|
||||||
- type: Armor
|
- type: Armor
|
||||||
@@ -670,7 +672,8 @@
|
|||||||
highPressureMultiplier: 0.08
|
highPressureMultiplier: 0.08
|
||||||
lowPressureMultiplier: 1000
|
lowPressureMultiplier: 1000
|
||||||
- type: TemperatureProtection
|
- type: TemperatureProtection
|
||||||
coefficient: 0.005
|
heatingCoefficient: 0.005
|
||||||
|
coolingCoefficient: 0.005
|
||||||
- type: Armor
|
- type: Armor
|
||||||
modifiers:
|
modifiers:
|
||||||
coefficients:
|
coefficients:
|
||||||
|
|||||||
@@ -232,7 +232,8 @@
|
|||||||
quickEquip: true
|
quickEquip: true
|
||||||
- type: IngestionBlocker
|
- type: IngestionBlocker
|
||||||
- type: TemperatureProtection
|
- type: TemperatureProtection
|
||||||
coefficient: 0.005
|
heatingCoefficient: 0.01
|
||||||
|
coolingCoefficient: 0.2
|
||||||
- type: FireProtection
|
- type: FireProtection
|
||||||
reduction: 0.15 # not fully sealed so less protection
|
reduction: 0.15 # not fully sealed so less protection
|
||||||
- type: IdentityBlocker
|
- type: IdentityBlocker
|
||||||
@@ -260,7 +261,8 @@
|
|||||||
quickEquip: true
|
quickEquip: true
|
||||||
- type: IngestionBlocker
|
- type: IngestionBlocker
|
||||||
- type: TemperatureProtection
|
- type: TemperatureProtection
|
||||||
coefficient: 0.005
|
heatingCoefficient: 0.01
|
||||||
|
coolingCoefficient: 0.2
|
||||||
- type: FireProtection
|
- type: FireProtection
|
||||||
reduction: 0.2
|
reduction: 0.2
|
||||||
- type: PressureProtection
|
- type: PressureProtection
|
||||||
|
|||||||
@@ -220,7 +220,8 @@
|
|||||||
highPressureMultiplier: 0.6
|
highPressureMultiplier: 0.6
|
||||||
lowPressureMultiplier: 1000
|
lowPressureMultiplier: 1000
|
||||||
- type: TemperatureProtection
|
- type: TemperatureProtection
|
||||||
coefficient: 0.2
|
heatingCoefficient: 0.2
|
||||||
|
coolingCoefficient: 0.2
|
||||||
- type: BreathMask
|
- type: BreathMask
|
||||||
# this is on the hood so you only fool the fish if you wear the whole set
|
# this is on the hood so you only fool the fish if you wear the whole set
|
||||||
# wear carp suit and security helmet, they'll know you are fake
|
# wear carp suit and security helmet, they'll know you are fake
|
||||||
|
|||||||
@@ -109,7 +109,8 @@
|
|||||||
highPressureMultiplier: 0.3
|
highPressureMultiplier: 0.3
|
||||||
lowPressureMultiplier: 1000
|
lowPressureMultiplier: 1000
|
||||||
- type: TemperatureProtection
|
- type: TemperatureProtection
|
||||||
coefficient: 0.01
|
heatingCoefficient: 0.01
|
||||||
|
coolingCoefficient: 0.01
|
||||||
- type: ClothingSpeedModifier
|
- type: ClothingSpeedModifier
|
||||||
walkModifier: 0.4
|
walkModifier: 0.4
|
||||||
sprintModifier: 0.6
|
sprintModifier: 0.6
|
||||||
@@ -152,7 +153,8 @@
|
|||||||
highPressureMultiplier: 0.6
|
highPressureMultiplier: 0.6
|
||||||
lowPressureMultiplier: 1000
|
lowPressureMultiplier: 1000
|
||||||
- type: TemperatureProtection
|
- type: TemperatureProtection
|
||||||
coefficient: 0.01 # Not complete protection from fire
|
heatingCoefficient: 0.01 # Not complete protection from fire
|
||||||
|
coolingCoefficient: 0.01
|
||||||
- type: ClothingSpeedModifier
|
- type: ClothingSpeedModifier
|
||||||
walkModifier: 0.8
|
walkModifier: 0.8
|
||||||
sprintModifier: 0.8
|
sprintModifier: 0.8
|
||||||
|
|||||||
@@ -124,7 +124,8 @@
|
|||||||
- type: Clothing
|
- type: Clothing
|
||||||
sprite: Clothing/OuterClothing/Coats/trenchcoat.rsi
|
sprite: Clothing/OuterClothing/Coats/trenchcoat.rsi
|
||||||
- type: TemperatureProtection
|
- type: TemperatureProtection
|
||||||
coefficient: 0.1
|
heatingCoefficient: 0.1
|
||||||
|
coolingCoefficient: 0.1
|
||||||
- type: Armor
|
- type: Armor
|
||||||
modifiers:
|
modifiers:
|
||||||
coefficients:
|
coefficients:
|
||||||
|
|||||||
@@ -43,7 +43,8 @@
|
|||||||
highPressureMultiplier: 0.02
|
highPressureMultiplier: 0.02
|
||||||
lowPressureMultiplier: 1000
|
lowPressureMultiplier: 1000
|
||||||
- type: TemperatureProtection
|
- type: TemperatureProtection
|
||||||
coefficient: 0.001
|
heatingCoefficient: 0.001
|
||||||
|
coolingCoefficient: 0.001
|
||||||
- type: FireProtection
|
- type: FireProtection
|
||||||
reduction: 0.8
|
reduction: 0.8
|
||||||
- type: ExplosionResistance
|
- type: ExplosionResistance
|
||||||
@@ -182,7 +183,8 @@
|
|||||||
- type: ExplosionResistance
|
- type: ExplosionResistance
|
||||||
damageCoefficient: 0.2
|
damageCoefficient: 0.2
|
||||||
- type: TemperatureProtection
|
- type: TemperatureProtection
|
||||||
coefficient: 0.001
|
heatingCoefficient: 0.001
|
||||||
|
coolingCoefficient: 0.001
|
||||||
- type: ToggleableClothing
|
- type: ToggleableClothing
|
||||||
clothingPrototype: ClothingHeadHelmetHardsuitMaxim
|
clothingPrototype: ClothingHeadHelmetHardsuitMaxim
|
||||||
|
|
||||||
@@ -543,7 +545,8 @@
|
|||||||
highPressureMultiplier: 0.02
|
highPressureMultiplier: 0.02
|
||||||
lowPressureMultiplier: 1000
|
lowPressureMultiplier: 1000
|
||||||
- type: TemperatureProtection
|
- type: TemperatureProtection
|
||||||
coefficient: 0.001
|
heatingCoefficient: 0.001
|
||||||
|
coolingCoefficient: 0.001
|
||||||
- type: ExplosionResistance
|
- type: ExplosionResistance
|
||||||
damageCoefficient: 0.2
|
damageCoefficient: 0.2
|
||||||
- type: FireProtection
|
- type: FireProtection
|
||||||
@@ -861,7 +864,8 @@
|
|||||||
highPressureMultiplier: 0.02
|
highPressureMultiplier: 0.02
|
||||||
lowPressureMultiplier: 1000
|
lowPressureMultiplier: 1000
|
||||||
- type: TemperatureProtection
|
- type: TemperatureProtection
|
||||||
coefficient: 0.001
|
heatingCoefficient: 0.001
|
||||||
|
coolingCoefficient: 0.001
|
||||||
- type: ExplosionResistance
|
- type: ExplosionResistance
|
||||||
damageCoefficient: 0.2
|
damageCoefficient: 0.2
|
||||||
- type: FireProtection
|
- type: FireProtection
|
||||||
@@ -897,7 +901,8 @@
|
|||||||
highPressureMultiplier: 0.02
|
highPressureMultiplier: 0.02
|
||||||
lowPressureMultiplier: 1000
|
lowPressureMultiplier: 1000
|
||||||
- type: TemperatureProtection
|
- type: TemperatureProtection
|
||||||
coefficient: 0.001
|
heatingCoefficient: 0.001
|
||||||
|
coolingCoefficient: 0.001
|
||||||
- type: ExplosionResistance
|
- type: ExplosionResistance
|
||||||
damageCoefficient: 0.7
|
damageCoefficient: 0.7
|
||||||
- type: Armor
|
- type: Armor
|
||||||
|
|||||||
@@ -300,7 +300,7 @@
|
|||||||
- state: equipped-OUTERCLOTHING-lines
|
- state: equipped-OUTERCLOTHING-lines
|
||||||
color: "#000000"
|
color: "#000000"
|
||||||
- type: TemperatureProtection
|
- type: TemperatureProtection
|
||||||
coefficient: 0.3
|
coolingCoefficient: 0.3
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
parent: ClothingOuterBase
|
parent: ClothingOuterBase
|
||||||
@@ -336,7 +336,7 @@
|
|||||||
- state: equipped-OUTERCLOTHING-lines
|
- state: equipped-OUTERCLOTHING-lines
|
||||||
color: "#000000"
|
color: "#000000"
|
||||||
- type: TemperatureProtection
|
- type: TemperatureProtection
|
||||||
coefficient: 0.3
|
coolingCoefficient: 0.3
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
parent: ClothingOuterBase
|
parent: ClothingOuterBase
|
||||||
@@ -372,7 +372,7 @@
|
|||||||
- state: equipped-OUTERCLOTHING-lines
|
- state: equipped-OUTERCLOTHING-lines
|
||||||
color: "#000000"
|
color: "#000000"
|
||||||
- type: TemperatureProtection
|
- type: TemperatureProtection
|
||||||
coefficient: 0.3
|
coolingCoefficient: 0.3
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
parent: ClothingOuterBase
|
parent: ClothingOuterBase
|
||||||
|
|||||||
@@ -48,7 +48,8 @@
|
|||||||
sprintModifier: 0.7
|
sprintModifier: 0.7
|
||||||
- type: HeldSpeedModifier
|
- type: HeldSpeedModifier
|
||||||
- type: TemperatureProtection
|
- type: TemperatureProtection
|
||||||
coefficient: 0.5
|
heatingCoefficient: 0.75
|
||||||
|
coolingCoefficient: 0.5
|
||||||
- type: ToggleableClothing
|
- type: ToggleableClothing
|
||||||
clothingPrototype: ClothingHeadHelmetEVALarge
|
clothingPrototype: ClothingHeadHelmetEVALarge
|
||||||
slot: head
|
slot: head
|
||||||
@@ -109,7 +110,8 @@
|
|||||||
sprintModifier: 0.9
|
sprintModifier: 0.9
|
||||||
- type: HeldSpeedModifier
|
- type: HeldSpeedModifier
|
||||||
- type: TemperatureProtection
|
- type: TemperatureProtection
|
||||||
coefficient: 0.1
|
heatingCoefficient: 0.1
|
||||||
|
coolingCoefficient: 0.1
|
||||||
- type: Armor
|
- type: Armor
|
||||||
modifiers:
|
modifiers:
|
||||||
coefficients:
|
coefficients:
|
||||||
|
|||||||
@@ -53,7 +53,8 @@
|
|||||||
- type: PressureProtection
|
- type: PressureProtection
|
||||||
highPressureMultiplier: 0.04
|
highPressureMultiplier: 0.04
|
||||||
- type: TemperatureProtection
|
- type: TemperatureProtection
|
||||||
coefficient: 0.005
|
heatingCoefficient: 0.005
|
||||||
|
coolingCoefficient: 0.05
|
||||||
- type: FireProtection
|
- type: FireProtection
|
||||||
reduction: 0.65 # doesnt have a full seal so not as good
|
reduction: 0.65 # doesnt have a full seal so not as good
|
||||||
- type: Armor
|
- type: Armor
|
||||||
@@ -84,7 +85,8 @@
|
|||||||
highPressureMultiplier: 0.02
|
highPressureMultiplier: 0.02
|
||||||
lowPressureMultiplier: 1000
|
lowPressureMultiplier: 1000
|
||||||
- type: TemperatureProtection
|
- type: TemperatureProtection
|
||||||
coefficient: 0.001
|
heatingCoefficient: 0.001
|
||||||
|
coolingCoefficient: 0.05
|
||||||
- type: FireProtection
|
- type: FireProtection
|
||||||
reduction: 0.8 # atmos firesuit offers best protection, hardsuits are a little vulnerable
|
reduction: 0.8 # atmos firesuit offers best protection, hardsuits are a little vulnerable
|
||||||
- type: Armor
|
- type: Armor
|
||||||
@@ -141,7 +143,8 @@
|
|||||||
highPressureMultiplier: 0.6
|
highPressureMultiplier: 0.6
|
||||||
lowPressureMultiplier: 1000
|
lowPressureMultiplier: 1000
|
||||||
- type: TemperatureProtection
|
- type: TemperatureProtection
|
||||||
coefficient: 0.01
|
heatingCoefficient: 0.01
|
||||||
|
coolingCoefficient: 0.01
|
||||||
- type: Armor
|
- type: Armor
|
||||||
modifiers:
|
modifiers:
|
||||||
coefficients:
|
coefficients:
|
||||||
@@ -287,6 +290,7 @@
|
|||||||
highPressureMultiplier: 0.6
|
highPressureMultiplier: 0.6
|
||||||
lowPressureMultiplier: 1000
|
lowPressureMultiplier: 1000
|
||||||
- type: TemperatureProtection
|
- type: TemperatureProtection
|
||||||
coefficient: 0.01
|
heatingCoefficient: 0.01
|
||||||
|
coolingCoefficient: 0.01
|
||||||
- type: ToggleableClothing
|
- type: ToggleableClothing
|
||||||
clothingPrototype: ClothingHeadHelmetHardsuitCarp
|
clothingPrototype: ClothingHeadHelmetHardsuitCarp
|
||||||
|
|||||||
@@ -9,7 +9,8 @@
|
|||||||
- type: Clothing
|
- type: Clothing
|
||||||
sprite: Clothing/OuterClothing/WinterCoats/coat.rsi
|
sprite: Clothing/OuterClothing/WinterCoats/coat.rsi
|
||||||
- type: TemperatureProtection
|
- type: TemperatureProtection
|
||||||
coefficient: 0.1
|
heatingCoefficient: 1.1
|
||||||
|
coolingCoefficient: 0.1
|
||||||
- type: Item
|
- type: Item
|
||||||
size: Normal
|
size: Normal
|
||||||
- type: Armor
|
- type: Armor
|
||||||
|
|||||||
@@ -69,4 +69,5 @@
|
|||||||
description: Fluffy boots to help survive even the coldest of winters.
|
description: Fluffy boots to help survive even the coldest of winters.
|
||||||
components:
|
components:
|
||||||
- type: TemperatureProtection
|
- type: TemperatureProtection
|
||||||
coefficient: 0.2
|
heatingCoefficient: 1.025
|
||||||
|
coolingCoefficient: 0.5
|
||||||
|
|||||||
Reference in New Issue
Block a user