Skip to content

Commit

Permalink
fix #10490 (#10502)
Browse files Browse the repository at this point in the history
Mark min stock requests as passive to avoid interfering with worker operation.
Fix food request equality
  • Loading branch information
Raycoms authored Dec 4, 2024
1 parent a8346fd commit f2b2311
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ public void onColonyTick(@NotNull final IColony colony)
itemStack.setCount(Math.min(itemStack.getMaxStackSize(), delta));
final MinimumStack stack = new MinimumStack(itemStack, false);
stack.setCanBeResolvedByBuilding(false);
building.createRequest(stack, false);
building.createRequest(stack, true);
}
}
else if (request != null && delta <= 0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ public void onColonyTick(@NotNull final IColony colony)
requestStack.setCount(Math.min(16, Math.min(requestStack.getMaxStackSize(), delta)));
final MinimumStack stack = new MinimumStack(requestStack, false);
stack.setCanBeResolvedByBuilding(false);
building.createRequest(stack, false);
building.createRequest(stack, true);
}
}
else if (request != null && delta <= 0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -985,7 +985,7 @@ protected void checkAndRequestArmor()

protected IAIState checkAndRequestFood()
{
if (InventoryUtils.getItemCountInItemHandler(worker.getInventoryCitizen(), stack -> building.getModule(NETHERMINER_MENU).getMenu().contains(new ItemStorage(stack))) > 16)
if (InventoryUtils.getItemCountInItemHandler(worker.getInventoryCitizen(), stack -> building.getModule(NETHERMINER_MENU).getMenu().contains(new ItemStorage(stack))) >= 16)
{
// We have enough food.
return getState();
Expand Down

0 comments on commit f2b2311

Please sign in to comment.