"Infinite walls", converting old InputTypes in saved subs to new ones

This commit is contained in:
Regalis
2015-10-29 00:59:00 +02:00
parent 948285f6ab
commit dc4b502248
16 changed files with 277 additions and 91 deletions

View File

@@ -182,7 +182,9 @@ namespace Barotrauma.Items.Components
try
{
SelectKey = (InputType)Enum.Parse(typeof(InputType), ToolBox.GetAttributeString(element, "selectkey", "Select"), true);
string selectKeyStr = ToolBox.GetAttributeString(element, "selectkey", "Select");
selectKeyStr = ToolBox.ConvertInputType(selectKeyStr);
SelectKey = (InputType)Enum.Parse(typeof(InputType), selectKeyStr, true);
}
catch (Exception e)
{
@@ -193,7 +195,9 @@ namespace Barotrauma.Items.Components
try
{
PickKey = (InputType)Enum.Parse(typeof(InputType), ToolBox.GetAttributeString(element, "selectkey", "Select"), true);
string pickKeyStr = ToolBox.GetAttributeString(element, "selectkey", "Select");
pickKeyStr = ToolBox.ConvertInputType(pickKeyStr);
PickKey = (InputType)Enum.Parse(typeof(InputType),pickKeyStr, true);
}
catch (Exception e)
{