Cached barotrauma resistance and immunity values instead of computing them each Update() (#15055)
This commit is contained in:
@@ -26,6 +26,25 @@ namespace Content.Server.Atmos.Components
|
||||
/// These are the inventory slots that are checked for pressure protection. If a slot is missing protection, no protection is applied.
|
||||
/// </summary>
|
||||
[DataField("protectionSlots")]
|
||||
public List<string> ProtectionSlots = new() { "head", "outerClothing" };
|
||||
public List<string> ProtectionSlots = new() { "head", "outerClothing" };
|
||||
|
||||
/// <summary>
|
||||
/// Cached pressure protection values
|
||||
/// </summary>
|
||||
[ViewVariables]
|
||||
public float HighPressureMultiplier = 1f;
|
||||
[ViewVariables]
|
||||
public float HighPressureModifier = 0f;
|
||||
[ViewVariables]
|
||||
public float LowPressureMultiplier = 1f;
|
||||
[ViewVariables]
|
||||
public float LowPressureModifier = 0f;
|
||||
|
||||
/// <summary>
|
||||
/// Whether the entity is immuned to pressure (i.e possess the PressureImmunity component)
|
||||
/// </summary>
|
||||
[ViewVariables]
|
||||
public bool HasImmunity = false;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user