orbit/js
Brian Fertig 520cba85f6 Add mining economy: rock shrink, split/shatter, and mineral hold
- Extract minerals from the latched asteroid at ratePerSec × miningSpeed; each mineral shrinks the rock by 1 px so the beam stays latched to its rim.
- Break rocks that lose ~1/3 of their original size: large ones halve in place (beam keeps mining one half), small ones shatter into pieces that fly home and load the hold.
- Add ship.minerals hold with addMinerals/setMinerals capped at stats.mineralStorage; a full hold ends the run instead of grinding the rock away.
- Persist the hold in save/restore (captureState writes ship.minerals, applyRestore restores it) and keep legacy saves working when the field is absent.
- Play new mining_split sfx on each break and surface split/absorbed/storageFull events as console toasts.
- Expose AsteroidCluster rock surgery (setSize/addRock/removeMember) for runtime splits, and add headless Phaser stub + loader plus a mining test suite covering extraction, halving, shattering, full-hold stop, and the hold API.
2026-09-05 11:18:35 -06:00
..
config
entities Add mining economy: rock shrink, split/shatter, and mineral hold 2026-09-05 11:18:35 -06:00
galaxy
mining Add mining economy: rock shrink, split/shatter, and mineral hold 2026-09-05 11:18:35 -06:00
reputation
save Add mining economy: rock shrink, split/shatter, and mineral hold 2026-09-05 11:18:35 -06:00
scan Add deep-scan sonar pulse replacing the Build action button 2026-09-05 00:29:17 -06:00
scenes Add mining economy: rock shrink, split/shatter, and mineral hold 2026-09-05 11:18:35 -06:00
tether Add deep-scan sonar pulse replacing the Build action button 2026-09-05 00:29:17 -06:00
ui Add music system, UI SFX, and ship base stats 2026-09-05 10:10:18 -06:00
utils Add music system, UI SFX, and ship base stats 2026-09-05 10:10:18 -06:00
vendor
visuals
main.js