From fdd5f8a506ff783e9b11bca99465b618ff69be55 Mon Sep 17 00:00:00 2001 From: Brian Fertig Date: Sat, 5 Sep 2026 10:29:02 -0600 Subject: [PATCH] Small adjustments to prepare for mining. --- data/sfx.json | 2 +- data/ship.json | 5 +++-- js/entities/Ship.js | 2 ++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/data/sfx.json b/data/sfx.json index 51efe4e..b6bb8b9 100644 --- a/data/sfx.json +++ b/data/sfx.json @@ -1,7 +1,7 @@ { "_comment": "Sound effects. enabled = master switch (also skips the load). volume is 0..1. construct = text typing in (the dossier, menus decoding in); deconstruct = text UNDECODING (the dossier collapsing) — reserved for the text only, never for closing UI; discovery = a new object coming into view; mining = the mining arm powering up (the 'Extending Mining Arm...' reach); mining_loop = the hum that LOOPS while the mining beam is live (starts when the arm finishes extending, stops when the sequence ends — stopping mining itself plays no sound); scan = the DEEP SCAN pulse going out (the command deck's SCAN button); ui_hover = the tick on HOVER of a clickable item (menu/deck buttons, compass name tags, panel buttons, save slots); ui_click = the tick on CLICK of a clickable item (the SCAN slot plays its own sonar ping instead of ui_click); ui_window = the whoosh when a window OPENS (the mining pop-up, the comms/landing panel); ui_close = the tick when a UI element is CANCELLED/CLOSED (the menu sub-bar, the save vault, the confirm dialog). Convention: the key here IS the play name — playSfx('') plays the asset queued as 'sfx_'.", "enabled": true, - "volume": 0.55, + "volume": 1, "construct": "assets/fx/type-construct.mp3", "deconstruct": "assets/fx/type-deconstruct.mp3", "discovery": "assets/fx/discovery.mp3", diff --git a/data/ship.json b/data/ship.json index 697a8c0..cb7de2e 100644 --- a/data/ship.json +++ b/data/ship.json @@ -17,10 +17,11 @@ "arriveRadius": 8, "arriveSpeed": 50, "stats": { - "_comment": "Base stats — the ship's starting condition, before any upgrades (builds/research layer deltas on top). hullIntegrity = the hull's max health (damage it can take); shields = damage absorbed in front of the hull; cargoHold = goods capacity; mineralStorage = minerals capacity. Exposed as ship.stats (js/entities/Ship.js); combat/trading/mining systems will read these as capacities.", + "_comment": "Base stats — the ship's starting condition, before any upgrades (builds/research layer deltas on top). hullIntegrity = the hull's max health (damage it can take); shields = damage absorbed in front of the hull; cargoHold = goods capacity; mineralStorage = minerals capacity; miningSpeed = multiplier on mining rate (1 = baseline). Exposed as ship.stats (js/entities/Ship.js); combat/trading/mining systems will read these as capacities.", "hullIntegrity": 100, "shields": 0, "cargoHold": 100, - "mineralStorage": 250 + "mineralStorage": 250, + "miningSpeed": 1 } } diff --git a/js/entities/Ship.js b/js/entities/Ship.js index 4e4f424..5c72ec1 100644 --- a/js/entities/Ship.js +++ b/js/entities/Ship.js @@ -26,6 +26,7 @@ import { toColor } from '../utils/Color.js'; * - shields → damage absorbed in front of the hull * - cargoHold → goods capacity * - mineralStorage → minerals capacity + * - miningSpeed → multiplier on mining rate (1 = baseline) */ export class Ship extends Phaser.Physics.Arcade.Sprite { static TEXTURE_KEY = '__ship'; @@ -100,6 +101,7 @@ export class Ship extends Phaser.Physics.Arcade.Sprite { shields: config.get('ship.stats.shields', 0), cargoHold: config.get('ship.stats.cargoHold', 100), mineralStorage: config.get('ship.stats.mineralStorage', 250), + miningSpeed: config.get('ship.stats.miningSpeed', 1), }; // World size = size × scale. Sheet frames are frameWidth px wide; the