"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)
{

View File

@@ -68,7 +68,7 @@ namespace Barotrauma.Items.Components
var particle = GameMain.ParticleManager.CreateParticle("spark", pt.item.Position,
baseVel + Rand.Vector(100.0f), 0.0f);
if (particle != null) particle.Size *= Rand.Range(0.5f,1.0f);
if (particle != null) particle.Size *= Rand.Range(0.5f, 1.0f);
}
}
}