カスタマイズ初期設定を追加

This commit is contained in:
kimura 2022-05-13 10:24:41 +09:00
parent b932c7679a
commit 771cfa2e79
1 changed files with 14 additions and 1 deletions

View File

@ -412,7 +412,19 @@ public sealed class GameData {
if (ShopCustomizeLevel < 1)
{
ShopCustomizeLevel = 0;
ShopCustomizeLevel = 1;
}
if (ShopCustomizeMyItems.Length < 1)
{
ShopCustomizeMyItems = new[]
{
Const.ShopCustomizeDefaultCartId,
Const.ShopCustomizeDefaultDecoration1Id,
Const.ShopCustomizeDefaultDecoration2Id,
Const.ShopCustomizeDefaultStockId,
Const.ShopCustomizeDefaultSignBoardId,
};
}
// 追加した要素の初期化用
@ -437,6 +449,7 @@ public sealed class GameData {
WaitAddStock = WaitAddStock ?? new ProductStockData{Rarity = ProductRarity.Normal};
AutoCookProducts = AutoCookProducts ?? Array.Empty<int>();
ShopCustomizeSettings = ShopCustomizeSettings ?? new ShopCustomizeSettings();
ShopCustomizeMyItems = ShopCustomizeMyItems ?? Array.Empty<int>();
}
private Dictionary<int, int> ArrayToDictionary(KeyValueOfintint[] array){
var dictionary = new Dictionary<int, int>();