Separate datatable folder
This commit is contained in:
parent
e88ac1fe42
commit
6522005893
@ -21,4 +21,9 @@ public static class PathHelper
|
||||
{
|
||||
return Path.Combine(GetRootPath(), "data");
|
||||
}
|
||||
|
||||
public static string GetDatatablePath()
|
||||
{
|
||||
return Path.Combine(GetDataPath(), "datatable");
|
||||
}
|
||||
}
|
@ -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);
|
||||
|
@ -60,7 +60,7 @@ public class GameDataService : IGameDataService
|
||||
|
||||
private async Task<T> GetData<T>(string dataBaseUrl, string fileBaseName) where T : notnull
|
||||
{
|
||||
var data = await client.GetFromJsonAsync<T>($"{dataBaseUrl}/data/{fileBaseName}.json");
|
||||
var data = await client.GetFromJsonAsync<T>($"{dataBaseUrl}/data/datatable/{fileBaseName}.json");
|
||||
data.ThrowIfNull();
|
||||
return data;
|
||||
}
|
||||
|
@ -23,29 +23,25 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Update="wwwroot\data\musicinfo.bin">
|
||||
<Content Update="wwwroot\data\datatable\musicinfo.bin">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\data\music_order.bin">
|
||||
<Content Update="wwwroot\data\datatable\music_order.bin">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\data\wordlist.bin">
|
||||
<Content Update="wwwroot\data\datatable\wordlist.bin">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\data\music_order.json">
|
||||
<Content Update="wwwroot\data\datatable\music_order.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\data\musicinfo.json">
|
||||
<Content Update="wwwroot\data\datatable\musicinfo.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\data\wordlist.json">
|
||||
<Content Update="wwwroot\data\datatable\wordlist.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="wwwroot\data" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
</Project>
|
Loading…
x
Reference in New Issue
Block a user