diff --git a/SharedProject/Utils/PathHelper.cs b/SharedProject/Utils/PathHelper.cs index e522552..140d90d 100644 --- a/SharedProject/Utils/PathHelper.cs +++ b/SharedProject/Utils/PathHelper.cs @@ -21,4 +21,9 @@ public static class PathHelper { return Path.Combine(GetRootPath(), "data"); } + + public static string GetDatatablePath() + { + return Path.Combine(GetDataPath(), "datatable"); + } } \ No newline at end of file diff --git a/TaikoLocalServer/Services/GameDataService.cs b/TaikoLocalServer/Services/GameDataService.cs index 57db30c..975bb40 100644 --- a/TaikoLocalServer/Services/GameDataService.cs +++ b/TaikoLocalServer/Services/GameDataService.cs @@ -135,24 +135,25 @@ public class GameDataService : IGameDataService public async Task InitializeAsync() { var dataPath = PathHelper.GetDataPath(); + var datatablePath = PathHelper.GetDatatablePath(); + + var musicInfoPath = Path.Combine(datatablePath, $"{Constants.MUSIC_INFO_BASE_NAME}.json"); + var encryptedInfo = Path.Combine(datatablePath, $"{Constants.MUSIC_INFO_BASE_NAME}.bin"); - var musicInfoPath = Path.Combine(dataPath, $"{Constants.MUSIC_INFO_BASE_NAME}.json"); - var encryptedInfo = Path.Combine(dataPath, $"{Constants.MUSIC_INFO_BASE_NAME}.bin"); + var wordlistPath = Path.Combine(datatablePath, $"{Constants.WORDLIST_BASE_NAME}.json"); + var encryptedWordlist = Path.Combine(datatablePath, $"{Constants.WORDLIST_BASE_NAME}.bin"); - var wordlistPath = Path.Combine(dataPath, $"{Constants.WORDLIST_BASE_NAME}.json"); - var encryptedWordlist = Path.Combine(dataPath, $"{Constants.WORDLIST_BASE_NAME}.bin"); + var musicOrderPath = Path.Combine(datatablePath, $"{Constants.MUSIC_ORDER_BASE_NAME}.json"); + var encryptedMusicOrder = Path.Combine(datatablePath, $"{Constants.MUSIC_ORDER_BASE_NAME}.bin"); - var musicOrderPath = Path.Combine(dataPath, $"{Constants.MUSIC_ORDER_BASE_NAME}.json"); - var encryptedMusicOrder = Path.Combine(dataPath, $"{Constants.MUSIC_ORDER_BASE_NAME}.bin"); + var donCosRewardPath = Path.Combine(datatablePath, $"{Constants.DON_COS_REWARD_BASE_NAME}.json"); + var encryptedDonCosReward = Path.Combine(datatablePath, $"{Constants.DON_COS_REWARD_BASE_NAME}.bin"); - var donCosRewardPath = Path.Combine(dataPath, $"{Constants.DON_COS_REWARD_BASE_NAME}.json"); - var encryptedDonCosReward = Path.Combine(dataPath, $"{Constants.DON_COS_REWARD_BASE_NAME}.bin"); + var shougouPath = Path.Combine(datatablePath, $"{Constants.SHOUGOU_BASE_NAME}.json"); + var encryptedShougou = Path.Combine(datatablePath, $"{Constants.SHOUGOU_BASE_NAME}.bin"); - var shougouPath = Path.Combine(dataPath, $"{Constants.SHOUGOU_BASE_NAME}.json"); - var encryptedShougou = Path.Combine(dataPath, $"{Constants.SHOUGOU_BASE_NAME}.bin"); - - var neiroPath = Path.Combine(dataPath, $"{Constants.NEIRO_BASE_NAME}.json"); - var encryptedNeiro = Path.Combine(dataPath, $"{Constants.NEIRO_BASE_NAME}.bin"); + var neiroPath = Path.Combine(datatablePath, $"{Constants.NEIRO_BASE_NAME}.json"); + var encryptedNeiro = Path.Combine(datatablePath, $"{Constants.NEIRO_BASE_NAME}.bin"); var danDataPath = Path.Combine(dataPath, settings.DanDataFileName); var gaidenDataPath = Path.Combine(dataPath, settings.GaidenDataFileName); diff --git a/TaikoWebUI/Services/GameDataService.cs b/TaikoWebUI/Services/GameDataService.cs index e1c0197..6bff9c1 100644 --- a/TaikoWebUI/Services/GameDataService.cs +++ b/TaikoWebUI/Services/GameDataService.cs @@ -60,7 +60,7 @@ public class GameDataService : IGameDataService private async Task GetData(string dataBaseUrl, string fileBaseName) where T : notnull { - var data = await client.GetFromJsonAsync($"{dataBaseUrl}/data/{fileBaseName}.json"); + var data = await client.GetFromJsonAsync($"{dataBaseUrl}/data/datatable/{fileBaseName}.json"); data.ThrowIfNull(); return data; } diff --git a/TaikoWebUI/TaikoWebUI.csproj b/TaikoWebUI/TaikoWebUI.csproj index 7206932..6cfe5c6 100644 --- a/TaikoWebUI/TaikoWebUI.csproj +++ b/TaikoWebUI/TaikoWebUI.csproj @@ -23,29 +23,25 @@ - + PreserveNewest - + PreserveNewest - + PreserveNewest - + PreserveNewest - + PreserveNewest - + PreserveNewest - - - - \ No newline at end of file