"Infinite walls", converting old InputTypes in saved subs to new ones
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user