v1.4.4.1 (Blood in the Water Update)
This commit is contained in:
@@ -338,6 +338,11 @@ namespace Barotrauma.Items.Components
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// How deep down does the item protect from pressure? Determined by status effects.
|
||||
/// </summary>
|
||||
public readonly float PressureProtection;
|
||||
|
||||
public Wearable(Item item, ContentXElement element) : base(item, element)
|
||||
{
|
||||
this.item = item;
|
||||
@@ -415,6 +420,12 @@ namespace Barotrauma.Items.Components
|
||||
WearableStatValues.TryAdd(statType, statValue);
|
||||
}
|
||||
break;
|
||||
case "statuseffect":
|
||||
if (subElement.GetAttributeString("Target", string.Empty).ToLowerInvariant().Contains("character"))
|
||||
{
|
||||
PressureProtection = Math.Max(subElement.GetAttributeFloat(nameof(PressureProtection), 0), PressureProtection);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user