Fix Salvage Bay drop-off: config-driven output-buffer capacity
Salvage ships flew to their assigned Salvage Bay with full cargo and waited there forever without delivering. A Salvage Bay's outputBuffer.capacity was never initialized (stayed 0), so deliverScrapToSalvageBay always rejected the hand-over, cargo never drained, and DeliverScrap stayed the winning behavior indefinitely. Give the bay a config-driven output-buffer capacity: - BuildingDef gains optional outputBufferCapacity; ConfigLoader parses the new output_buffer_capacity key. - salvage_bay in both buildings.toml files sets it to 20. - initSalvageBayBuffer applies it on both operational-creation paths (construction completion and placeImmediate). - REQ-BLD-SALVAGE-BAY documents the config-sized buffer and hand-over. - Tests: config parse assertion and end-to-end delivery hand-over. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VGNNLeFWhVzvxkK9qVXP2K
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <optional>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
@@ -18,6 +19,10 @@ struct BuildingDef
|
||||
// Stored as raw strings here; parsing into per-cell tiles + output ports
|
||||
// happens when buildings are placed, not at load time.
|
||||
std::vector<std::string> surfaceMask;
|
||||
|
||||
// Output-buffer holding size for buildings without a recipe-driven buffer.
|
||||
// Only the Salvage Bay sets this (REQ-BLD-SALVAGE-BAY).
|
||||
std::optional<int> outputBufferCapacity;
|
||||
};
|
||||
|
||||
struct BuildingsConfig
|
||||
|
||||
Reference in New Issue
Block a user