Port mining extraction semantics into the source node #20
Labels
No labels
burndown-2026-08
autonomy
async-consult
autonomy
epic
autonomy
headless
autonomy
live-collab
c#
priority
P0
priority
P1
priority
P2
priority
P3
priority
P4
role/advocate
role/director
role/exec
role/frontend
role/gamedev
role/human
role/platform
role/qa
role/science
role/sysadmin
state
ambient
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
coilyco-gaming/factory-game-v3#20
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?
Build the next core simulation step after #19. This is core Rust logic, not Bevy/viewer/deploy work.
Current state on
main:source_stockpile: 9). After three hauls the scenario runs dry and the sim idles.MiningComponentCoresemantics have not been ported: finite deposit extraction per tick, and the manifest (create-from-nothing) path.Goal:
Port
Assets/Scripts/Components/MiningComponent.cssemantics into the Rust kernel so the source node extracts ore from a finite deposit at a fixed per-tick speed, with the manifest path represented for items flagged create-from-nothing. Energy/battery stays out of scope.Implementation guidance:
miningmodule tofactory_simwith a typed extractor: target item, mining speed, and a deposit state that is either finite-remaining or manifest.mining_speedper tick from deposit to the source stockpile, bounded by stockpile capacity, and stop at zero.mining_speedper tick into the stockpile, capacity-bounded, mirroring the C#CreateFromNothingbranch.factory_content::ItemDefinitiongainscreate_from_nothing. Scenario definitions gain deposit size and mining speed in place of the pre-filled stockpile.Acceptance criteria:
cargo test --workspacepasses.docs/factory-sim.mdanddocs/FEATURES.mdupdated where terminology changes.Out of scope:
Landed on
mainin115bf2d(feat: port mining extraction into the source node).What shipped:
factory_sim::miningmodule with a typedMiningExtractor(target item, speed,Deposit::Finite(remaining)orDeposit::Manifest), ported fromMiningComponentCoreminus the energy cost, which stays out of scope.factory_content::ItemDefinitiongainscreate_from_nothing(with astonestarter item exercising the manifest path).ScenarioDefinitionreplacessource_stockpilewithsource_deposit+mining_speed(iron-bars: deposit 9, speed 3).Verification:
cargo test --workspacepasses - 8 tests, including finite-deposit depletion-to-zero, capacity-bounded manifest creation, and scenario-level deposit depletion. The pre-existing dispatch/route/determinism tests pass unchanged because mining-before-intents preserves the prior tick timeline.ward exec testandpre-commit run --all-filesboth green.WARD-OUTCOME: done