diff --git a/src/TSMapEditor/Helpers.cs b/src/TSMapEditor/Helpers.cs index a4b1f775..0bb4879c 100644 --- a/src/TSMapEditor/Helpers.cs +++ b/src/TSMapEditor/Helpers.cs @@ -596,8 +596,8 @@ public static IEnumerable GetFillAreaTiles(MapTile targetTile, Map map, /// New name after it was converted to the desired difficulty. public static string ConvertNameToNewDifficulty(string name, Difficulty fromDifficulty, Difficulty toDifficulty) { - string fromDifficultyString = Helpers.GetDifficultyString(fromDifficulty); - string toDifficultyString = Helpers.GetDifficultyString(toDifficulty); + string fromDifficultyString = fromDifficulty.ToString(); + string toDifficultyString = toDifficulty.ToString(); string newName = name.Replace(fromDifficultyString, toDifficultyString); newName = newName.Replace($" {fromDifficultyString[0]}", $" {toDifficultyString[0]}"); @@ -606,22 +606,6 @@ public static string ConvertNameToNewDifficulty(string name, Difficulty fromDiff return newName; } - /// - /// Takes a difficulty enum and converts it into a string. - /// - /// Difficulty enum to convert to string - /// The string value of the enum. - public static string GetDifficultyString(Difficulty difficulty) - { - return difficulty switch - { - Difficulty.Easy => "Easy", - Difficulty.Medium => "Medium", - Difficulty.Hard => "Hard", - _ => "Invalid" - }; - } - /// /// Generates outline edges for a foundation of cells ///