Displaying the condition of contained items in the inventory slot of the parent item (i.e. the amount of oxygen left in a diving suit is visible without highlighting the suit), some debug logging, colored speech bubbles

This commit is contained in:
Regalis
2016-04-21 17:17:32 +03:00
parent e46ec1ade2
commit 12dc494e42
15 changed files with 114 additions and 62 deletions
+6 -5
View File
@@ -175,10 +175,12 @@ namespace Barotrauma
public static void LoadAll(List<string> filePaths)
{
//string[] files = Directory.GetFiles(contentFolder, "*.xml", SearchOption.AllDirectories);
DebugConsole.Log("Loading item prefabs: ");
foreach (string filePath in filePaths)
{
DebugConsole.Log("*** "+filePath+" ***");
XDocument doc = ToolBox.TryLoadXml(filePath);
if (doc == null) return;
@@ -200,12 +202,13 @@ namespace Barotrauma
public ItemPrefab (XElement element, string filePath)
{
configFile = filePath;
name = ToolBox.GetAttributeString(element, "name", "");
if (name == "") DebugConsole.ThrowError("Unnamed item in "+filePath+"!");
DebugConsole.Log(" "+name);
Description = ToolBox.GetAttributeString(element, "description", "");
pickThroughWalls = ToolBox.GetAttributeBool(element, "pickthroughwalls", false);
@@ -226,13 +229,11 @@ namespace Barotrauma
ImpactTolerance = ToolBox.GetAttributeFloat(element, "impacttolerance", 0.0f);
string categoriesStr = ToolBox.GetAttributeString(element, "category", "Misc");
string[] categories = categoriesStr.Split(',');
for (int i = 0; i<categories.Length; i++)
for (int i = 0; i < categories.Length; i++)
{
MapEntityCategory category;
if (Enum.TryParse(ToolBox.GetAttributeString(element, "category", "Misc"), out category))
{