Converted the GetAttribute methods in the ToolBox class to extension methods

This commit is contained in:
Joonas Rikkonen
2017-10-04 18:38:40 +03:00
parent 6c7c97a875
commit 1ff2054ca8
99 changed files with 854 additions and 875 deletions
@@ -332,14 +332,14 @@ namespace Barotrauma
}
}
campaign.Money = ToolBox.GetAttributeInt(element, "money", 0);
campaign.Money = element.GetAttributeInt("money", 0);
//backwards compatibility with older save files
if (campaign.map == null)
{
string mapSeed = ToolBox.GetAttributeString(element, "mapseed", "a");
string mapSeed = element.GetAttributeString("mapseed", "a");
campaign.GenerateMap(mapSeed);
campaign.map.SetLocation(ToolBox.GetAttributeInt(element, "currentlocation", 0));
campaign.map.SetLocation(element.GetAttributeInt("currentlocation", 0));
}
campaign.savedOnStart = true;