mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-03-09 20:29:06 +07:00
Better plan skipping (#5634)
This prevents the plans being skipped when there is a large number of items entering the core yet the core is still starved of that item.
This commit is contained in:
parent
72fb66e5b2
commit
f4f46eb924
@ -179,7 +179,7 @@ abstract class BuilderComp implements Posc, Statusc, Teamc, Rotc{
|
||||
//requests that you have at least *started* are considered
|
||||
if(state.rules.infiniteResources || team.rules().infiniteResources || request.breaking || core == null || request.isRotation(team)) return false;
|
||||
|
||||
return (request.stuck && !core.items.has(request.block.requirements)) || (Structs.contains(request.block.requirements, i -> !core.items.has(i.item) && Mathf.round(i.amount * state.rules.buildCostMultiplier) > 0) && !request.initialized);
|
||||
return (request.stuck && !core.items.has(request.block.requirements)) || (Structs.contains(request.block.requirements, i -> !core.items.has(i.item, Math.min(i.amount, 15)) && Mathf.round(i.amount * state.rules.buildCostMultiplier) > 0) && !request.initialized);
|
||||
}
|
||||
|
||||
void removeBuild(int x, int y, boolean breaking){
|
||||
|
Loading…
Reference in New Issue
Block a user