"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

@@ -312,6 +312,16 @@ namespace Barotrauma
return BitConverter.ToInt32(asciiBytes, 0);
}
/// <summary>
/// a method for changing inputtypes with old names to the new ones to ensure backwards compatibility with older subs
/// </summary>
public static string ConvertInputType(string inputType)
{
if (inputType == "ActionHit" || inputType == "Action") return "Use";
if (inputType == "SecondarHit" || inputType == "Secondary") return "Aim";
return inputType;
}
public static string WrapText(string text, float lineLength, SpriteFont font)
{