feat: resource collection with E-key interaction (Phase 4.3)

Mineral veins yield metals (Fe, Cu, Zn, Au, Sn), geysers yield S/H.
Resources spawn as ECS entities with gold/orange dot sprites on tiles.
E-key collects nearest resource in range into inventory. Resources
deplete after collection. Visual feedback text. 12 new tests (174 total).

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Денис Шкабатур
2026-02-12 13:25:35 +03:00
parent cf36c0adce
commit e77b9df6e4
5 changed files with 501 additions and 11 deletions

View File

@@ -39,3 +39,9 @@ export const ChemicalComposition = {
export const PlayerTag = {
_tag: [] as number[],
};
/** Harvestable resource — mineral veins, geysers, etc. */
export const Resource = {
quantity: [] as number[], // remaining items to collect
interactRange: [] as number[], // max interaction distance in pixels
};