-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change from .net Framework 4.7 to .net 6. Now supports MelonLoader v0…
….6. (No longer supports MelonLoader v0.5)
- Loading branch information
1 parent
9c4eda4
commit 7d772bf
Showing
40 changed files
with
2,100 additions
and
2,365 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
6 changes: 6 additions & 0 deletions
6
.idea/.idea.ArchipelagoMuseDash/.idea/projectSettingsUpdater.xml
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,16 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio Version 16 | ||
VisualStudioVersion = 16.0.32106.194 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ArchipelagoMuseDash", "ArchipelagoMuseDash\ArchipelagoMuseDash.csproj", "{6AA329FC-0CBE-4A61-B134-3BF77DDC61DC}" | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ArchipelagoMuseDash", "ArchipelagoMuseDash\ArchipelagoMuseDash.csproj", "{05E7D5E9-53C7-4D12-AF67-D67B35549301}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{6AA329FC-0CBE-4A61-B134-3BF77DDC61DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{6AA329FC-0CBE-4A61-B134-3BF77DDC61DC}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{6AA329FC-0CBE-4A61-B134-3BF77DDC61DC}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{6AA329FC-0CBE-4A61-B134-3BF77DDC61DC}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {D75C2A32-9C67-42CB-85EA-B60AAE376CD9} | ||
{05E7D5E9-53C7-4D12-AF67-D67B35549301}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{05E7D5E9-53C7-4D12-AF67-D67B35549301}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{05E7D5E9-53C7-4D12-AF67-D67B35549301}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{05E7D5E9-53C7-4D12-AF67-D67B35549301}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
EndGlobal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,12 @@ | ||
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation"> | ||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=API/@EntryIndexedValue">API</s:String> | ||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=DB/@EntryIndexedValue">DB</s:String> | ||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=URL/@EntryIndexedValue">URL</s:String> | ||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Localisation/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary> | ||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=SB/@EntryIndexedValue">SB</s:String> | ||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=SS/@EntryIndexedValue">SS</s:String> | ||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Deactive/@EntryIndexedValue">True</s:Boolean> | ||
<s:Boolean x:Key="/Default/UserDictionary/Words/=deathlink/@EntryIndexedValue">True</s:Boolean> | ||
<s:Boolean x:Key="/Default/UserDictionary/Words/=favourited/@EntryIndexedValue">True</s:Boolean> | ||
<s:Boolean x:Key="/Default/UserDictionary/Words/=jank/@EntryIndexedValue">True</s:Boolean> | ||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Randomiser/@EntryIndexedValue">True</s:Boolean> | ||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Touhou/@EntryIndexedValue">True</s:Boolean> | ||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Uids/@EntryIndexedValue">True</s:Boolean> | ||
<s:Boolean x:Key="/Default/UserDictionary/Words/=UNPLAYED/@EntryIndexedValue">True</s:Boolean> | ||
<s:Boolean x:Key="/Default/UserDictionary/Words/=_0020sel/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,78 +1,76 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using Assets.Scripts.Database; | ||
using Assets.Scripts.PeroTools.Managers; | ||
|
||
namespace ArchipelagoMuseDash { | ||
/// <summary> | ||
/// Contains information about the game's songs, in a way that is easier to access for us. | ||
/// </summary> | ||
public class AlbumDatabase { | ||
Dictionary<string, MusicInfo> _songsByItemName = new Dictionary<string, MusicInfo>(); | ||
Dictionary<string, Il2CppSystem.Collections.Generic.List<MusicInfo>> _songsByAlbum = new Dictionary<string, Il2CppSystem.Collections.Generic.List<MusicInfo>>(); | ||
|
||
public const int CHINESE_LOC_INDEX = 0; | ||
public const int ENGLISH_LOC_INDEX = 1; | ||
public const string RANDOM_PANEL_UID = "?"; | ||
|
||
public void Setup() { | ||
_songsByAlbum.Clear(); | ||
_songsByItemName.Clear(); | ||
|
||
var list = new Il2CppSystem.Collections.Generic.List<MusicInfo>(); | ||
GlobalDataBase.dbMusicTag.GetAllMusicInfo(list); | ||
|
||
_songsByAlbum = new Dictionary<string, Il2CppSystem.Collections.Generic.List<MusicInfo>>(); | ||
_songsByItemName = new Dictionary<string, MusicInfo>(); | ||
|
||
var configManager = ConfigManager.instance; | ||
if (configManager == null) | ||
throw new Exception("Config Manage was null when trying to load songs."); | ||
|
||
var albumConfig = configManager.GetConfigObject<DBConfigAlbums>(-1); | ||
var albumLocalisation = configManager.GetConfigObject<DBConfigAlbums>(-1).GetLocal(ENGLISH_LOC_INDEX); | ||
|
||
foreach (var musicInfo in list) { | ||
if (musicInfo.uid == RANDOM_PANEL_UID) | ||
continue; | ||
|
||
var albumLocal = albumLocalisation.GetLocalTitleByIndex(albumConfig.GetAlbumInfoByAlbumJsonIndex(musicInfo.albumJsonIndex).listIndex); | ||
|
||
var songName = GetItemNameFromMusicInfo(musicInfo); | ||
_songsByItemName.Add(songName, musicInfo); | ||
|
||
if (!_songsByAlbum.TryGetValue(albumLocal, out var albumList)) { | ||
albumList = new Il2CppSystem.Collections.Generic.List<MusicInfo>(); | ||
_songsByAlbum.Add(albumLocal, albumList); | ||
} | ||
albumList.Add(musicInfo); | ||
} | ||
} | ||
using Il2CppAssets.Scripts.Database; | ||
using Il2CppAssets.Scripts.PeroTools.Managers; | ||
|
||
public bool TryGetMusicInfo(string itemName, out MusicInfo info) => _songsByItemName.TryGetValue(itemName, out info); | ||
public MusicInfo GetMusicInfo(string itemName) => _songsByItemName[itemName]; | ||
namespace ArchipelagoMuseDash; | ||
|
||
public bool TryGetAlbum(string itemName, out Il2CppSystem.Collections.Generic.List<MusicInfo> infos) => _songsByAlbum.TryGetValue(itemName, out infos); | ||
/// <summary> | ||
/// Contains information about the game's songs, in a way that is easier to access for us. | ||
/// </summary> | ||
public class AlbumDatabase { | ||
private Dictionary<string, MusicInfo> _songsByItemName = new(); | ||
private Dictionary<string, List<MusicInfo>> _songsByAlbum = new(); | ||
|
||
public Il2CppSystem.Collections.Generic.List<MusicInfo> GetAlbum(string itemName) => _songsByAlbum[itemName]; | ||
public const int CHINESE_LOC_INDEX = 0; | ||
public const int ENGLISH_LOC_INDEX = 1; | ||
public const string RANDOM_PANEL_UID = "?"; | ||
|
||
public string GetItemNameFromMusicInfo(MusicInfo musicInfo) { | ||
var localisedSongName = ArchipelagoStatic.SongNameChanger.GetSongName(musicInfo); | ||
return $"{localisedSongName}"; | ||
} | ||
public void Setup() { | ||
_songsByAlbum.Clear(); | ||
_songsByItemName.Clear(); | ||
|
||
public string GetLocalisedSongNameForMusicInfo(MusicInfo musicInfo) { | ||
var configManager = ConfigManager.instance; | ||
var songLocal = configManager.GetConfigObject<DBConfigALBUM>(musicInfo.albumJsonIndex).GetLocal().GetLocalAlbumInfoByIndex(musicInfo.listIndex); | ||
return songLocal.name; | ||
} | ||
var list = new Il2CppSystem.Collections.Generic.List<MusicInfo>(); | ||
GlobalDataBase.dbMusicTag.GetAllMusicInfo(list); | ||
|
||
_songsByAlbum = new Dictionary<string, List<MusicInfo>>(); | ||
_songsByItemName = new Dictionary<string, MusicInfo>(); | ||
|
||
var configManager = ConfigManager.instance; | ||
if (configManager == null) | ||
throw new Exception("Config Manage was null when trying to load songs."); | ||
|
||
var albumConfig = configManager.GetConfigObject<DBConfigAlbums>(); | ||
var albumLocalisation = configManager.GetConfigObject<DBConfigAlbums>().GetLocal(ENGLISH_LOC_INDEX); | ||
|
||
foreach (var musicInfo in list) { | ||
if (musicInfo.uid == RANDOM_PANEL_UID) | ||
continue; | ||
|
||
public string GetLocalisedAlbumNameForMusicInfo(MusicInfo musicInfo) { | ||
var configManager = ConfigManager.instance; | ||
var albumConfig = configManager.GetConfigObject<DBConfigAlbums>(-1); | ||
var albumLocalisation = configManager.GetConfigObject<DBConfigAlbums>(-1).GetLocal(); | ||
var albumLocal = albumLocalisation.GetLocalTitleByIndex(albumConfig.GetAlbumInfoByAlbumJsonIndex(musicInfo.albumJsonIndex).listIndex); | ||
return albumLocal; | ||
|
||
var songName = GetItemNameFromMusicInfo(musicInfo); | ||
_songsByItemName.Add(songName, musicInfo); | ||
|
||
if (!_songsByAlbum.TryGetValue(albumLocal, out var albumList)) { | ||
albumList = new List<MusicInfo>(); | ||
_songsByAlbum.Add(albumLocal, albumList); | ||
} | ||
albumList.Add(musicInfo); | ||
} | ||
} | ||
} | ||
|
||
public bool TryGetMusicInfo(string itemName, out MusicInfo info) => _songsByItemName.TryGetValue(itemName, out info); | ||
public MusicInfo GetMusicInfo(string itemName) => _songsByItemName[itemName]; | ||
|
||
public bool TryGetAlbum(string itemName, out List<MusicInfo> infos) => _songsByAlbum.TryGetValue(itemName, out infos); | ||
|
||
public List<MusicInfo> GetAlbum(string itemName) => _songsByAlbum[itemName]; | ||
|
||
public string GetItemNameFromMusicInfo(MusicInfo musicInfo) { | ||
var localisedSongName = ArchipelagoStatic.SongNameChanger.GetSongName(musicInfo); | ||
return $"{localisedSongName}"; | ||
} | ||
|
||
public string GetLocalisedSongNameForMusicInfo(MusicInfo musicInfo) { | ||
var configManager = ConfigManager.instance; | ||
var songLocal = configManager.GetConfigObject<DBConfigALBUM>(musicInfo.albumJsonIndex).GetLocal().GetLocalAlbumInfoByIndex(musicInfo.listIndex); | ||
return songLocal.name; | ||
} | ||
|
||
public string GetLocalisedAlbumNameForMusicInfo(MusicInfo musicInfo) { | ||
var configManager = ConfigManager.instance; | ||
var albumConfig = configManager.GetConfigObject<DBConfigAlbums>(); | ||
var albumLocalisation = configManager.GetConfigObject<DBConfigAlbums>().GetLocal(); | ||
var albumLocal = albumLocalisation.GetLocalTitleByIndex(albumConfig.GetAlbumInfoByAlbumJsonIndex(musicInfo.albumJsonIndex).listIndex); | ||
return albumLocal; | ||
} | ||
} |
Oops, something went wrong.