- 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. |
||
|---|---|---|
| .. | ||
| config | ||
| entities | ||
| galaxy | ||
| mining | ||
| reputation | ||
| save | ||
| scan | ||
| scenes | ||
| tether | ||
| ui | ||
| utils | ||
| vendor | ||
| visuals | ||
| main.js | ||