Improved MiniMap: shows hull integrity and oxygen levels, and can be configured to only show oxy/water data if the rooms have detectors in place

+ itemprefab "aliases" (allows changing item names while keeping backwards compatibility with older sub files)
This commit is contained in:
Regalis
2016-09-08 20:21:55 +03:00
parent 7be5474617
commit 4bf01aeba7
5 changed files with 205 additions and 31 deletions
+14
View File
@@ -58,6 +58,14 @@ namespace Barotrauma
private set;
}
//if a matching itemprefab is not found when loading a sub, the game will attempt to find a prefab with a matching alias
//(allows changing item names while keeping backwards compatibility with older sub files)
public string[] Aliases
{
get;
private set;
}
public List<DeconstructItem> DeconstructItems
{
get;
@@ -236,6 +244,12 @@ namespace Barotrauma
ImpactTolerance = ToolBox.GetAttributeFloat(element, "impacttolerance", 0.0f);
string aliases = ToolBox.GetAttributeString(element, "aliases", "");
if (!string.IsNullOrWhiteSpace(aliases))
{
Aliases = aliases.Split(',');
}
MapEntityCategory category;
if (!Enum.TryParse(ToolBox.GetAttributeString(element, "category", "Misc"), true, out category))