From cbeff6aeff6a9a28329874696ffaf66a08540c85 Mon Sep 17 00:00:00 2001 From: kimura Date: Mon, 15 Aug 2022 10:41:33 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=87=E3=83=90=E3=83=83=E3=82=B0=E3=81=AE?= =?UTF-8?q?=E3=83=AC=E3=82=B7=E3=83=94=E3=83=AA=E3=82=BB=E3=83=83=E3=83=88?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DebugOption/Scripts/DebugOptionManager.cs | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/popcorn/Assets/MyGame/Scenes/DebugOption/Scripts/DebugOptionManager.cs b/popcorn/Assets/MyGame/Scenes/DebugOption/Scripts/DebugOptionManager.cs index 27c783e6..22e72393 100644 --- a/popcorn/Assets/MyGame/Scenes/DebugOption/Scripts/DebugOptionManager.cs +++ b/popcorn/Assets/MyGame/Scenes/DebugOption/Scripts/DebugOptionManager.cs @@ -98,7 +98,7 @@ public class DebugOptionManager : MonoBehaviour // 所持素材 gameData.Material.Clear(); // レシピ - gameData.MyRecipes = GetMyRecipe(gameData.ViewedShopLevel); + gameData.MyRecipes = GetMyRecipe(gameData.ViewedShopLevel, true); // フライパン gameData.Pans = new[] { Const.DefaultPanId }; }).AddTo(this); @@ -369,12 +369,15 @@ public class DebugOptionManager : MonoBehaviour }).AddTo(this); } - private static int[] GetMyRecipe(int level) + private static int[] GetMyRecipe(int level, bool clearShopRecipe = false) { - var shopLevelList = SpreadsheetDataManager.Instance.GetBaseDataList(Const.ShopLevelDataSheet); - return GameDataManager.GameData.MyRecipes.Except(shopLevelList.Select(data => data.id)) - .Union(shopLevelList.Where(data => data.shopLevel <= level).Select(data => data.id)) - .ToArray(); + var productList = SpreadsheetDataManager.Instance.GetBaseDataList(Const.ProductDataSheet); + var levelUpAchievedList = productList.Where(data => data.shopLevel != Const.SpecialShopLevel).ToList(); + var levelUpAchievedRecipeList = levelUpAchievedList.Where(data => data.shopLevel <= level).Select(data => data.id); + var shopRecipe = clearShopRecipe + ? GameDataManager.GameData.MyRecipes.Except(levelUpAchievedList.Select(data => data.id)) + : Array.Empty(); + return levelUpAchievedRecipeList.Union(shopRecipe).ToArray(); } #endif }