デバッグのレシピリセット修正
This commit is contained in:
parent
1f06eb5d68
commit
cbeff6aeff
|
|
@ -98,7 +98,7 @@ public class DebugOptionManager : MonoBehaviour
|
||||||
// 所持素材
|
// 所持素材
|
||||||
gameData.Material.Clear();
|
gameData.Material.Clear();
|
||||||
// レシピ
|
// レシピ
|
||||||
gameData.MyRecipes = GetMyRecipe(gameData.ViewedShopLevel);
|
gameData.MyRecipes = GetMyRecipe(gameData.ViewedShopLevel, true);
|
||||||
// フライパン
|
// フライパン
|
||||||
gameData.Pans = new[] { Const.DefaultPanId };
|
gameData.Pans = new[] { Const.DefaultPanId };
|
||||||
}).AddTo(this);
|
}).AddTo(this);
|
||||||
|
|
@ -369,12 +369,15 @@ public class DebugOptionManager : MonoBehaviour
|
||||||
}).AddTo(this);
|
}).AddTo(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static int[] GetMyRecipe(int level)
|
private static int[] GetMyRecipe(int level, bool clearShopRecipe = false)
|
||||||
{
|
{
|
||||||
var shopLevelList = SpreadsheetDataManager.Instance.GetBaseDataList<ShopLevelData>(Const.ShopLevelDataSheet);
|
var productList = SpreadsheetDataManager.Instance.GetBaseDataList<ProductData>(Const.ProductDataSheet);
|
||||||
return GameDataManager.GameData.MyRecipes.Except(shopLevelList.Select(data => data.id))
|
var levelUpAchievedList = productList.Where(data => data.shopLevel != Const.SpecialShopLevel).ToList();
|
||||||
.Union(shopLevelList.Where(data => data.shopLevel <= level).Select(data => data.id))
|
var levelUpAchievedRecipeList = levelUpAchievedList.Where(data => data.shopLevel <= level).Select(data => data.id);
|
||||||
.ToArray();
|
var shopRecipe = clearShopRecipe
|
||||||
|
? GameDataManager.GameData.MyRecipes.Except(levelUpAchievedList.Select(data => data.id))
|
||||||
|
: Array.Empty<int>();
|
||||||
|
return levelUpAchievedRecipeList.Union(shopRecipe).ToArray();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue