Costume select complete
This commit is contained in:
parent
0888581d27
commit
d75b1a4d9f
@ -1,16 +0,0 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace SharedProject.Models;
|
||||
|
||||
public class CostumeData
|
||||
{
|
||||
public uint Head { get; set; }
|
||||
|
||||
public uint Body { get; set; }
|
||||
|
||||
public uint Face { get; set; }
|
||||
|
||||
public uint Kigurumi { get; set; }
|
||||
|
||||
public uint Puchi { get; set; }
|
||||
}
|
@ -11,7 +11,7 @@
|
||||
<MudGrid Class="my-4 pb-10">
|
||||
<MudItem xs="12" md="8">
|
||||
<MudPaper Elevation="0" Outlined="true">
|
||||
<MudTabs ActivePanelIndex="0" Rounded="true" Border="true" PanelClass="pa-8">
|
||||
<MudTabs Rounded="true" Border="true" PanelClass="pa-8">
|
||||
<MudTabPanel Text="Profile">
|
||||
<MudStack Spacing="4">
|
||||
<h2>Profile Options</h2>
|
||||
@ -56,7 +56,8 @@
|
||||
@for (uint i = 0; i < GameDataService.COSTUME_HEAD_MAX; i++)
|
||||
{
|
||||
var index = i;
|
||||
<MudSelectItem Value="@index">@index</MudSelectItem>
|
||||
var costumeTitle = GameDataService.headMap[index];
|
||||
<MudSelectItem Value="@index">@index - @costumeTitle</MudSelectItem>
|
||||
}
|
||||
</MudSelect>
|
||||
|
||||
@ -64,7 +65,8 @@
|
||||
@for (uint i = 0; i < GameDataService.COSTUME_BODY_MAX; i++)
|
||||
{
|
||||
var index = i;
|
||||
<MudSelectItem Value="@index">@index</MudSelectItem>
|
||||
var costumeTitle = GameDataService.bodyMap[index];
|
||||
<MudSelectItem Value="@index">@index - @costumeTitle</MudSelectItem>
|
||||
}
|
||||
</MudSelect>
|
||||
|
||||
@ -72,7 +74,8 @@
|
||||
@for (uint i = 0; i < GameDataService.COSTUME_FACE_MAX; i++)
|
||||
{
|
||||
var index = i;
|
||||
<MudSelectItem Value="@index">@index</MudSelectItem>
|
||||
var costumeTitle = GameDataService.faceMap[index];
|
||||
<MudSelectItem Value="@index">@index - @costumeTitle</MudSelectItem>
|
||||
}
|
||||
</MudSelect>
|
||||
|
||||
@ -80,7 +83,8 @@
|
||||
@for (uint i = 0; i < GameDataService.COSTUME_KIGURUMI_MAX; i++)
|
||||
{
|
||||
var index = i;
|
||||
<MudSelectItem Value="@index">@index</MudSelectItem>
|
||||
var costumeTitle = GameDataService.kigurumiMap[index];
|
||||
<MudSelectItem Value="@index">@index - @costumeTitle</MudSelectItem>
|
||||
}
|
||||
</MudSelect>
|
||||
|
||||
@ -88,7 +92,8 @@
|
||||
@for (uint i = 0; i < GameDataService.COSTUME_PUCHI_MAX; i++)
|
||||
{
|
||||
var index = i;
|
||||
<MudSelectItem Value="@index">@index</MudSelectItem>
|
||||
var costumeTitle = GameDataService.puchiMap[index];
|
||||
<MudSelectItem Value="@index">@index - @costumeTitle</MudSelectItem>
|
||||
}
|
||||
</MudSelect>
|
||||
</MudStack>
|
||||
|
@ -13,14 +13,18 @@ public class GameDataService : IGameDataService
|
||||
|
||||
private ImmutableDictionary<uint, DanData> danMap = null!;
|
||||
|
||||
private ImmutableDictionary<uint, CostumeData> costumeMap = null!;
|
||||
|
||||
public const uint COSTUME_HEAD_MAX = 138;
|
||||
public const uint COSTUME_FACE_MAX = 57;
|
||||
public const uint COSTUME_BODY_MAX = 154;
|
||||
public const uint COSTUME_KIGURUMI_MAX = 152;
|
||||
public const uint COSTUME_PUCHI_MAX = 127;
|
||||
public const uint COSTUME_COLOR_MAX = 62;
|
||||
|
||||
public static string[] headMap = new string[COSTUME_HEAD_MAX];
|
||||
public static string[] faceMap = new string[COSTUME_FACE_MAX];
|
||||
public static string[] bodyMap = new string[COSTUME_BODY_MAX];
|
||||
public static string[] kigurumiMap = new string[COSTUME_KIGURUMI_MAX];
|
||||
public static string[] puchiMap = new string[COSTUME_PUCHI_MAX];
|
||||
|
||||
public GameDataService(HttpClient client)
|
||||
{
|
||||
@ -69,6 +73,51 @@ public class GameDataService : IGameDataService
|
||||
musicMap[songId].Index = index;
|
||||
}
|
||||
}
|
||||
|
||||
for (var i = 0; i < COSTUME_HEAD_MAX; i++)
|
||||
{
|
||||
var index = i;
|
||||
var key = $"costume_head_{index}";
|
||||
|
||||
var costumeWordlistItem = dict.GetValueOrDefault(key, new WordListEntry());
|
||||
headMap[index] = costumeWordlistItem.JapaneseText;
|
||||
}
|
||||
|
||||
for (var i = 0; i < COSTUME_FACE_MAX; i++)
|
||||
{
|
||||
var index = i;
|
||||
var key = $"costume_face_{index}";
|
||||
|
||||
var costumeWordlistItem = dict.GetValueOrDefault(key, new WordListEntry());
|
||||
faceMap[index] = costumeWordlistItem.JapaneseText;
|
||||
}
|
||||
|
||||
for (var i = 0; i < COSTUME_BODY_MAX; i++)
|
||||
{
|
||||
var index = i;
|
||||
var key = $"costume_body_{index}";
|
||||
|
||||
var costumeWordlistItem = dict.GetValueOrDefault(key, new WordListEntry());
|
||||
bodyMap[index] = costumeWordlistItem.JapaneseText;
|
||||
}
|
||||
|
||||
for (var i = 0; i < COSTUME_KIGURUMI_MAX; i++)
|
||||
{
|
||||
var index = i;
|
||||
var key = $"costume_kigurumi_{index}";
|
||||
|
||||
var costumeWordlistItem = dict.GetValueOrDefault(key, new WordListEntry());
|
||||
kigurumiMap[index] = costumeWordlistItem.JapaneseText;
|
||||
}
|
||||
|
||||
for (var i = 0; i < COSTUME_PUCHI_MAX; i++)
|
||||
{
|
||||
var index = i;
|
||||
var key = $"costume_puchi_{index}";
|
||||
|
||||
var costumeWordlistItem = dict.GetValueOrDefault(key, new WordListEntry());
|
||||
puchiMap[index] = costumeWordlistItem.JapaneseText;
|
||||
}
|
||||
}
|
||||
|
||||
public string GetMusicNameBySongId(uint songId)
|
||||
@ -94,11 +143,6 @@ public class GameDataService : IGameDataService
|
||||
return danMap.GetValueOrDefault(danId, new DanData());
|
||||
}
|
||||
|
||||
public string GetCostumeTitleById(uint costumeId, string type)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
public int GetMusicStarLevel(uint songId, Difficulty difficulty)
|
||||
{
|
||||
var success = musicMap.TryGetValue(songId, out var musicDetail);
|
||||
|
@ -8,8 +8,6 @@ public interface IGameDataService
|
||||
|
||||
public string GetMusicArtistBySongId(uint songId);
|
||||
|
||||
public string GetCostumeTitleById(uint costumeId, string type);
|
||||
|
||||
public SongGenre GetMusicGenreBySongId(uint songId);
|
||||
|
||||
public int GetMusicIndexBySongId(uint songId);
|
||||
|
Loading…
Reference in New Issue
Block a user