the transporters should only fill the fleet office up to a certain amount, it should not be infinite but ensure that the tax will always be paid if resources are available #223
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Implemented in commit
fe3ae97onmain. Full suite: 167/167 passed.What was wrong
An office declared a flat buffer - 60 ore, 30 gas, 30 energy - whatever sat in its berth. Two faults, and the ticket names both:
What it does now
It asks for exactly what its own berth is charged, four charge intervals deep. Enough that the tax is payable whenever the bank has anything - a transporter round trip fits comfortably inside four intervals - and no more, so an office cannot become a hoard. This uses the idiom already in the codebase for outposts and workshops, which compute world-dependent demand the same way rather than declaring it.
An office whose berth is empty asks for nothing dynamic. A small floor stays in the definition (10 ore, 6 gas, 6 energy) deliberately: without it a newly crewed berth would start from zero and could starve before its first delivery landed.
Verification
New
test_fleet_office_stock.gd: an office asks for at least its own charges rather than a flat figure; asks for far less of a resource its berth never spends; stops asking once stocked, and does not ask again when over-stocked; and a deeper berth - dearer under #220 - asks for more ore and for energy where an interceptor berth asks for neither.One correction worth recording: I first asserted the request equals exactly four charges, which failed - an interceptor's charge is 1 ore, so four of them come to less than the floor, and the floor correctly wins. The assertion now checks the request covers four charges, with the scaling proven at the deeper berth where the dynamic term dominates.