v1.6.17.0 (Unto the Breach update)

This commit is contained in:
Regalis11
2024-10-22 17:29:04 +03:00
parent e74b3cdb17
commit 6e6c17e100
417 changed files with 17166 additions and 5870 deletions
@@ -399,7 +399,49 @@ namespace Barotrauma
private Dictionary<string, string[]> targetProperties { get; }
private readonly ImmutableArray<UpgradeMaxLevelMod> MaxLevelsMods;
public readonly ImmutableHashSet<UpgradeResourceCost> ResourceCosts;
public const int CrushDepthDefaultUpgradePrc = 15;
private static int? crushDepthUpgradePrc;
public static int CrushDepthUpgradePrc
{
get
{
if (crushDepthUpgradePrc == null)
{
if (Find("increasewallhealth".ToIdentifier()) is UpgradePrefab hullUpgradePrefab)
{
string updateValueStr = hullUpgradePrefab.SourceElement?.GetChildElement("Structure")?.GetAttributeString("crushdepth", null) ?? string.Empty;
if (!string.IsNullOrEmpty(updateValueStr))
{
crushDepthUpgradePrc = ParsePercentage(updateValueStr, Identifier.Empty, suppressWarnings: true);
}
}
}
return crushDepthUpgradePrc ?? CrushDepthDefaultUpgradePrc;
}
}
public const int IncreaseWallHealthDefaultMaxLevel = 6;
private static int? increaseWallHealthMaxLevel;
public static int IncreaseWallHealthMaxLevel
{
get
{
if (increaseWallHealthMaxLevel == null)
{
if (Find("increasewallhealth".ToIdentifier()) is UpgradePrefab hullUpgradePrefab)
{
increaseWallHealthMaxLevel = hullUpgradePrefab.MaxLevel;
}
}
return increaseWallHealthMaxLevel ?? IncreaseWallHealthDefaultMaxLevel;
}
}
public UpgradePrefab(ContentXElement element, UpgradeModulesFile file) : base(element, file)
{
Name = element.GetAttributeString(nameof(Name), string.Empty)!;