Add framework for determining game version

This commit is contained in:
jvyden 2021-11-02 18:39:59 -04:00
parent dd91de3c87
commit e5a1ccb9e3
No known key found for this signature in database
GPG key ID: 18BCF2BE0262B278
3 changed files with 111 additions and 0 deletions

View file

@ -76,6 +76,11 @@
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpUseContinuousIndentInsideBracesMigration/@EntryIndexedValue">True</s:Boolean> <s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpUseContinuousIndentInsideBracesMigration/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateBlankLinesAroundFieldToBlankLinesAroundProperty/@EntryIndexedValue">True</s:Boolean> <s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateBlankLinesAroundFieldToBlankLinesAroundProperty/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Affero/@EntryIndexedValue">True</s:Boolean> <s:Boolean x:Key="/Default/UserDictionary/Words/=Affero/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=BCAS/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=BCES/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=BCET/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=BCJB/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=BCJS/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Braaains/@EntryIndexedValue">True</s:Boolean> <s:Boolean x:Key="/Default/UserDictionary/Words/=Braaains/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=brun/@EntryIndexedValue">True</s:Boolean> <s:Boolean x:Key="/Default/UserDictionary/Words/=brun/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=ezoiar/@EntryIndexedValue">True</s:Boolean> <s:Boolean x:Key="/Default/UserDictionary/Words/=ezoiar/@EntryIndexedValue">True</s:Boolean>
@ -86,8 +91,14 @@
<s:Boolean x:Key="/Default/UserDictionary/Words/=lolcatftw/@EntryIndexedValue">True</s:Boolean> <s:Boolean x:Key="/Default/UserDictionary/Words/=lolcatftw/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=mmpick/@EntryIndexedValue">True</s:Boolean> <s:Boolean x:Key="/Default/UserDictionary/Words/=mmpick/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=mmpicks/@EntryIndexedValue">True</s:Boolean> <s:Boolean x:Key="/Default/UserDictionary/Words/=mmpicks/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=NPEA/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=NPHG/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=PCAS/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=PCJS/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=PCKS/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Swingy/@EntryIndexedValue">True</s:Boolean> <s:Boolean x:Key="/Default/UserDictionary/Words/=Swingy/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=thumbsup/@EntryIndexedValue">True</s:Boolean> <s:Boolean x:Key="/Default/UserDictionary/Words/=thumbsup/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=UCAS/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=unfavourite/@EntryIndexedValue">True</s:Boolean> <s:Boolean x:Key="/Default/UserDictionary/Words/=unfavourite/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Unpublish/@EntryIndexedValue">True</s:Boolean> <s:Boolean x:Key="/Default/UserDictionary/Words/=Unpublish/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=yourthumb/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary> <s:Boolean x:Key="/Default/UserDictionary/Words/=yourthumb/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>

View file

@ -0,0 +1,90 @@
using System;
using System.Collections.Generic;
using System.Linq;
using LBPUnion.ProjectLighthouse.Types;
namespace LBPUnion.ProjectLighthouse.Helpers
{
public class GameVersionHelper
{
// https://www.serialstation.com/games/b89b4eb4-4e4c-4e54-b72b-f7f9dbfac125
public readonly string[] LittleBigPlanet1TitleIds =
{
"BCES00141",
"BCAS20091",
"BCUS98208",
"BCAS20078",
"BCJS70009",
"BCES00611",
"BCUS98148",
"BCAS20058",
"BCJS30018",
"UCAS40262",
"BCET70011",
"BCUS98199",
"BCJB95003",
"NPUA70045",
"NPEA00241",
"NPEA00147",
"NPHG00033",
"NPHG00035",
};
// https://serialstation.com/games/35e69aba-1872-4fd7-9d39-11ce75924040
public readonly string[] LittleBigPlanet2TitleIds =
{
"BCUS98249",
"BCES01086",
"BCAS20113",
"BCJS70024",
"BCAS20201",
"BCUS98245",
"BCES01345",
"BCJS30058",
"BCUS98372",
"BCES00850",
"BCES01346",
"BCUS90260",
"BCET70023",
"NPUA80662",
};
// https://www.serialstation.com/games/b62d53d9-fdff-4463-8134-64b81e1cbd50
// includes PS4 games
public readonly string[] LittleBigPlanet3TitleIds =
{
"CUSA00063",
"CUSA00693",
"CUSA00473",
"CUSA00810",
"CUSA00473",
"CUSA01072",
"CUSA00738",
"PCJS50003",
"BCES02068",
"BCAS20322",
"BCJS30095",
"BCES01663",
"CUSA00063",
"BCUS98362",
"PCKS90007",
"PCAS00012",
"CUSA00601",
"CUSA00810",
"CUSA00762",
"PCAS20007",
"CUSA00473",
"CUSA01077",
"CUSA01304",
};
public GameVersion FromTitleId(string titleId)
{
if (this.LittleBigPlanet1TitleIds.Contains(titleId)) return GameVersion.LittleBigPlanet1;
if (this.LittleBigPlanet2TitleIds.Contains(titleId)) return GameVersion.LittleBigPlanet2;
if (this.LittleBigPlanet3TitleIds.Contains(titleId)) return GameVersion.LittleBigPlanet3;
return GameVersion.Unknown;
}
}
}

View file

@ -0,0 +1,10 @@
namespace LBPUnion.ProjectLighthouse.Types
{
public enum GameVersion
{
LittleBigPlanet1,
LittleBigPlanet2,
LittleBigPlanet3,
Unknown,
}
}