diff --git a/ProjectLighthouse/Helpers/LabelHelper.cs b/ProjectLighthouse/Helpers/LabelHelper.cs index 7a9fddbd..8718f9ca 100644 --- a/ProjectLighthouse/Helpers/LabelHelper.cs +++ b/ProjectLighthouse/Helpers/LabelHelper.cs @@ -8,6 +8,24 @@ namespace LBPUnion.ProjectLighthouse.Helpers; public static class LabelHelper { + private static readonly List lbpVitaLabels = new() + { + "LABEL_Arcade", + "LABEL_Co_op", + "LABEL_Precision", + "LABEL_Controlinator", + "LABEL_Flick", + "LABEL_Memoriser", + "LABEL_MultiLevel", + "LABEL_Portrait", + "LABEL_RearTouch", + "LABEL_SharedScreen", + "LABEL_Swipe", + "LABEL_Tap", + "LABEL_Tilt", + "LABEL_Touch", + }; + private static readonly List lbp3Labels = new() { "LABEL_SINGLE_PLAYER", @@ -72,6 +90,11 @@ public static class LabelHelper {"LABEL_HEROCAPE", "Hero Cape"}, {"LABEL_MEMORISER", "Memorizer"}, {"LABEL_WALLJUMP", "Wall Jump"}, + {"Label_Controlinator", "Controllinator"}, + {"LABEL_MultiLevel", "Multi Level"}, + {"LABEL_Portrait", "Portrait View"}, + {"LABEL_RearTouch", "Rear touch pad"}, + {"LABEL_SharedScreen", "Shared Screen"}, {"LABEL_SINGLE_PLAYER", "Single Player"}, {"LABEL_TOP_DOWN", "Top Down"}, {"LABEL_CO_OP", "Co-Op"}, @@ -97,15 +120,16 @@ public static class LabelHelper return gameVersion switch { GameVersion.LittleBigPlanet1 => IsValidTag(label), - GameVersion.LittleBigPlanet2 => IsValidLabel(label) && !lbp3Labels.Contains(label), - GameVersion.LittleBigPlanet3 => IsValidLabel(label), + GameVersion.LittleBigPlanet2 => IsValidLabel(label) && !lbp3Labels.Contains(label) && !lbpVitaLabels.Contains(label), + GameVersion.LittleBigPlanetVita => IsValidLabel(label) && !lbp3Labels.Contains(label), + GameVersion.LittleBigPlanet3 => IsValidLabel(label) && !lbpVitaLabels.Contains(label), _ => false, }; } public static bool IsValidTag(string tag) => Enum.IsDefined(typeof(LevelTags), tag.Replace("TAG_", "").Replace("-", "_")); - public static bool IsValidLabel(string label) => Enum.IsDefined(typeof(LevelLabels), label); + private static bool IsValidLabel(string label) => Enum.IsDefined(typeof(LevelLabels), label.Replace("-", "_")); public static string RemoveInvalidLabels(string authorLabels) { diff --git a/ProjectLighthouse/Levels/LevelLabels.cs b/ProjectLighthouse/Levels/LevelLabels.cs index 3fd15517..186743f6 100644 --- a/ProjectLighthouse/Levels/LevelLabels.cs +++ b/ProjectLighthouse/Levels/LevelLabels.cs @@ -7,6 +7,7 @@ namespace LBPUnion.ProjectLighthouse.Levels; // I would remove the LABEL prefix, but some of the tags start with numbers and won't compile public enum LevelLabels { + // Start LBP2 Labels LABEL_SinglePlayer, LABEL_Multiplayer, LABEL_Quick, @@ -53,6 +54,22 @@ public enum LevelLabels LABEL_HEROCAPE, LABEL_MEMORISER, LABEL_WALLJUMP, + // Start LBP Vita Labels + LABEL_Arcade, + LABEL_Co_op, + LABEL_Precision, + LABEL_Controlinator, + LABEL_Flick, + LABEL_Memoriser, + LABEL_MultiLevel, + LABEL_Portrait, + LABEL_RearTouch, + LABEL_SharedScreen, + LABEL_Swipe, + LABEL_Tap, + LABEL_Tilt, + LABEL_Touch, + // Start LBP3 Labels LABEL_SINGLE_PLAYER, LABEL_RPG, LABEL_TOP_DOWN,