自動調理で空のタンクがあってもすべて受け取れず破棄画面が出るのを修正
This commit is contained in:
parent
e82750e7ca
commit
954da581fa
|
|
@ -58,10 +58,16 @@ namespace MyGame.Scenes.Main.Scripts
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (gameData.StorageTanks.Exists(data => data.FlavorId == productData.id && data.Capacity - data.Stock >= productData.volume))
|
// 空以外の補充可能な空きがあるタンクを優先して判定する
|
||||||
|
if (gameData.StorageTanks.Exists(data => !data.IsEmpty && data.FlavorId == productData.id && data.Capacity - data.Stock >= productData.volume))
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if (emptyTankCount > 0)
|
||||||
|
{
|
||||||
|
emptyTankCount--;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
discardProductList.Add(productData);
|
discardProductList.Add(productData);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue