レシピデータ修正/ポップコーン追加処理修正
This commit is contained in:
parent
9b724cf874
commit
9c7980820c
|
|
@ -106,10 +106,13 @@ public class CookingResult : MonoBehaviour
|
|||
gameData.ShopStock.AddRange(Enumerable.Repeat(recipe.RecipeId, stockCount));
|
||||
remain -= stockCount;
|
||||
|
||||
// 空タンク並び替え
|
||||
gameData.StorageTanks = gameData.StorageTanks.OrderBy(tank => tank.IsEmpty).ToList();
|
||||
// 空きのタンクを確認
|
||||
gameData.StorageTanks
|
||||
.Where(tank => tank.IsEmpty || tank.FlavorId == recipe.RecipeId && !tank.IsFull)
|
||||
.Select((tank, i) => (i, space: tank.Capacity - tank.Stock))
|
||||
.Select((tank, i) => (tank, i))
|
||||
.Where(x => x.tank.IsEmpty || x.tank.FlavorId == recipe.RecipeId && !x.tank.IsFull)
|
||||
.Select(x => (x.i, space: x.tank.Capacity - x.tank.Stock))
|
||||
.OrderBy(x => x.space)
|
||||
.ToList()
|
||||
.ForEach(x =>
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ public class RecipeData
|
|||
CornAmount = 150,
|
||||
Flavors = new List<(int id, int amount)>
|
||||
{
|
||||
(1, 1)
|
||||
(2, 1)
|
||||
}
|
||||
},
|
||||
new RecipeData
|
||||
|
|
@ -41,7 +41,7 @@ public class RecipeData
|
|||
CornAmount = 150,
|
||||
Flavors = new List<(int id, int amount)>
|
||||
{
|
||||
(6, 1)
|
||||
(7, 1)
|
||||
}
|
||||
},
|
||||
new RecipeData
|
||||
|
|
@ -53,7 +53,7 @@ public class RecipeData
|
|||
CornAmount = 150,
|
||||
Flavors = new List<(int id, int amount)>
|
||||
{
|
||||
(2, 1)
|
||||
(3, 1)
|
||||
}
|
||||
},
|
||||
new RecipeData
|
||||
|
|
@ -65,8 +65,8 @@ public class RecipeData
|
|||
CornAmount = 150,
|
||||
Flavors = new List<(int id, int amount)>
|
||||
{
|
||||
(1, 1),
|
||||
(6, 1),
|
||||
(2, 1),
|
||||
(7, 1),
|
||||
}
|
||||
},
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue