allow the probabilistic recipe output of the reprocessing plant to yield more than 1 item of a type per cycle
This commit is contained in:
@@ -53,13 +53,21 @@ double computeShipyardProductionTimeSeconds(
|
||||
// True when a production cycle could start right now, ignoring output-buffer space.
|
||||
bool hasInputsToStart(const GameConfig& config, const Building& b);
|
||||
|
||||
// True when the building's output side can take `outputItemCount` more items beside
|
||||
// what it already holds. An emerging item has not left the building yet and so still
|
||||
// counts against the capacity (REQ-MAT-OUTPUT-EMERGE, REQ-MAT-OUTPUT-BUFFER).
|
||||
bool outputBufferHasRoom(const Building& b, int outputItemCount);
|
||||
// True when the building can take `itemCount` more items of `type` beside what it
|
||||
// already holds of it. An emerging item has not left the building yet and so still
|
||||
// counts against that material's capacity (REQ-MAT-OUTPUT-EMERGE, REQ-MAT-OUTPUT-BUFFER).
|
||||
bool outputBufferHasRoom(const Building& b, const ItemType& type, int itemCount);
|
||||
|
||||
// True when every output a cycle of this recipe could produce would fit -- the gate a
|
||||
// cycle has to pass before it may start (REQ-MAT-CYCLE). For a deterministic recipe that
|
||||
// is its own outputs. A Reprocessing Plant rolls one of its outputs per cycle
|
||||
// (REQ-BLD-REPROCESSING), so each possibility is judged on its own and all must fit: the
|
||||
// roll is committed the moment the cycle starts, and testing every outcome rather than
|
||||
// the rolled one is what keeps a stalled output belt from biasing the distribution.
|
||||
bool recipeOutputsFit(const Building& b, const RecipeDef& recipe);
|
||||
|
||||
// True when a production cycle could actually start right now: some candidate recipe
|
||||
// has its inputs *and* its output fits (REQ-MAT-CYCLE). Stricter than
|
||||
// has its inputs *and* passes recipeOutputsFit (REQ-MAT-CYCLE). Stricter than
|
||||
// hasInputsToStart, which looks at the input buffers alone.
|
||||
bool canStartCycle(const GameConfig& config, const Building& b);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user