Files
dota_factory/bin/test/data/config/buildings.toml
Malte Langkabel 3148c9154c 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
2026-07-09 11:05:58 +02:00

91 lines
1.3 KiB
TOML

[[building]]
id = "belt"
cost = 2
player_placeable = true
construction_time_seconds = 1
surface_mask = ["A>"]
[[building]]
id = "splitter"
cost = 3
player_placeable = true
construction_time_seconds = 1
surface_mask = ["<A>"]
[[building]]
id = "tunnel_entry"
cost = 5
player_placeable = true
construction_time_seconds = 3
surface_mask = ["A>"]
[[building]]
id = "tunnel_exit"
cost = 5
player_placeable = true
construction_time_seconds = 3
surface_mask = ["A>"]
[[building]]
id = "miner"
cost = 15
player_placeable = true
construction_time_seconds = 10
surface_mask = [
"AA",
"A>",
]
[[building]]
id = "smelter"
cost = 20
player_placeable = true
construction_time_seconds = 15
surface_mask = [
"AA ",
"AA>",
]
[[building]]
id = "assembler"
cost = 35
player_placeable = true
construction_time_seconds = 20
surface_mask = [
"AAA ",
"AAA>",
"AAA ",
]
[[building]]
id = "reprocessing_plant"
cost = 40
player_placeable = true
construction_time_seconds = 25
surface_mask = [
"AAA ",
"AAA>",
"AAA ",
]
[[building]]
id = "shipyard"
cost = 60
player_placeable = true
construction_time_seconds = 30
surface_mask = [
"AAAS>",
"AAAS ",
]
[[building]]
id = "salvage_bay"
cost = 25
player_placeable = true
construction_time_seconds = 15
output_buffer_capacity = 20
surface_mask = [
"SAA",
"SAA>",
]