Unstable 0.1500.6.0 (1984 edition)

This commit is contained in:
Markus Isberg
2021-10-09 00:22:02 +09:00
parent 08bdfc6cea
commit c8943ef9c4
96 changed files with 1817 additions and 559 deletions
@@ -68,7 +68,13 @@ namespace Barotrauma
Name = element.GetAttributeString("name", string.Empty);
IsWallUpgrade = element.GetAttributeBool("wallupgrade", false);
if (string.IsNullOrWhiteSpace(Name))
string nameIdentifier = element.GetAttributeString("nameidentifier", "");
if (!string.IsNullOrWhiteSpace(nameIdentifier))
{
Name = TextManager.Get($"{nameIdentifier}", returnNull: true) ?? string.Empty;
}
else if (string.IsNullOrWhiteSpace(Name))
{
Name = TextManager.Get($"UpgradeCategory.{Identifier}", true) ?? string.Empty;
}
@@ -131,6 +137,8 @@ namespace Barotrauma
public string Description { get; }
public float IncreaseOnTooltip { get; }
public string Identifier { get; }
public string FilePath { get; }
@@ -172,7 +180,13 @@ namespace Barotrauma
var targetProperties = new Dictionary<string, string[]>();
if (string.IsNullOrWhiteSpace(Name))
string nameIdentifier = element.GetAttributeString("nameidentifier", "");
if (!string.IsNullOrWhiteSpace(nameIdentifier))
{
Name = TextManager.Get($"UpgradeName.{nameIdentifier}", returnNull: true) ?? string.Empty;
}
else if (string.IsNullOrWhiteSpace(Name))
{
Name = TextManager.Get($"UpgradeName.{Identifier}", returnNull: true) ?? string.Empty;
}
@@ -182,6 +196,8 @@ namespace Barotrauma
Description = TextManager.Get($"UpgradeDescription.{Identifier}", returnNull: true) ?? string.Empty;
}
IncreaseOnTooltip = element.GetAttributeFloat("increaseontooltip", 0f);
DebugConsole.Log(" " + Name);
foreach (XElement subElement in element.Elements())