rimlike/autoload
megaproxy d819c13a9d Phase 18 — Audio (music director + SFX catalog + bus wiring)
Adds an AudioManager autoload with three buses (Master, Music routed to
Master, SFX routed to Master), a small catalog of looping music + one-shot
SFX, and a single persistent AudioStreamPlayer for the music director.

Music
* Day and night loops swap on Clock.phase_changed (night during the night
  phase, day everywhere else). Tracks pulled from Retro Farming Music 1
  (day) and Cozy Melodies Pack 1 (night), both loopable OGG.

SFX
* Tree.fell, Rock.mined, BigRock.mined → tree_fell / mine_tick.
* EventBus.pawn_took_damage → combat_hit (Sword Pack 1).
* EventBus.storyteller_event_fired → ui_confirm sting.
* EventBus.alert_added → ui_click.
* play_sfx is rate-limited per key (80ms cooldown) so fast-sim doesn't
  saturate the mixer.

Settings + suspend
* SettingsMenu master/music/sfx sliders now live-bind to the bus dB via
  Audio.set_*_linear (linear → dB internally, 0 → -80dB silence). The
  ambient slider is intentionally unwired; no ambient bus this pass.
* NOTIFICATION_APPLICATION_PAUSED + FOCUS_OUT mute the Master bus to
  match the existing "no background sim" rule. Resume + focus restore it.

Bundle housekeeping
* Two zipped packs in the ElvGames bundle (Cozy Melodies Pack 1, Retro
  Farming Music 1) extracted in place to keep pack identity intact for
  the license/credits string. 8 OGG files curated into audio/ at ~5.3MB.

Verified end-to-end via MCP runtime: buses online, day_loop plays at
boot, manual phase swap day→night→day round-trips, slider linear→dB
mapping correct (0.5 → -6.02dB, 0.0 → -80dB), tree_fell SFX triggers.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-15 18:54:36 +01:00
..
audio.gd Phase 18 — Audio (music director + SFX catalog + bus wiring) 2026-05-15 18:54:36 +01:00
audio.gd.uid Phase 18 — Audio (music director + SFX catalog + bus wiring) 2026-05-15 18:54:36 +01:00
audit.gd Phase 0 scaffold + asset audit findings 2026-05-10 20:09:11 +01:00
audit.gd.uid Make main scene root Node2D so editor defaults to 2D view 2026-05-10 20:19:09 +01:00
autosave.gd Phase 16: Save/load full coverage + autosave + UI 2026-05-11 19:24:59 +01:00
autosave.gd.uid Phase 16: Save/load full coverage + autosave + UI 2026-05-11 19:24:59 +01:00
clock.gd Phase 17: Touch UX (PawnDetail+BuildDrawer+WorkMatrix+AlertsLog+Settings) 2026-05-11 19:45:35 +01:00
clock.gd.uid Phase 11 — Day/night cycle + Lighting (taken before Phase 9 per recommendation) 2026-05-11 15:54:15 +01:00
event_bus.gd Alerts: wire room_too_large, no_stockpile_accepts, bill_blocked 2026-05-12 13:16:25 +01:00
event_bus.gd.uid Make main scene root Node2D so editor defaults to 2D view 2026-05-10 20:19:09 +01:00
game_state.gd Phase 17: Touch UX (PawnDetail+BuildDrawer+WorkMatrix+AlertsLog+Settings) 2026-05-11 19:45:35 +01:00
game_state.gd.uid Make main scene root Node2D so editor defaults to 2D view 2026-05-10 20:19:09 +01:00
save_system.gd Add BigRock: 2×2 mineable boulder with full mining/path/save support 2026-05-12 14:34:24 +01:00
save_system.gd.uid Make main scene root Node2D so editor defaults to 2D view 2026-05-10 20:19:09 +01:00
sim.gd Phase 1 — 80² world, 6-layer TileMap, camera rig, tick loop, speed UI 2026-05-10 20:37:02 +01:00
sim.gd.uid Make main scene root Node2D so editor defaults to 2D view 2026-05-10 20:19:09 +01:00
storyteller.gd Storyteller: restore sim speed after auto_pause event dismissal 2026-05-12 12:17:15 +01:00
storyteller.gd.uid Phase 15: Storyteller (25 events, daily roll, banner+modal UI) 2026-05-11 19:01:35 +01:00
strings.gd Phase 17: Touch UX (PawnDetail+BuildDrawer+WorkMatrix+AlertsLog+Settings) 2026-05-11 19:45:35 +01:00
strings.gd.uid Make main scene root Node2D so editor defaults to 2D view 2026-05-10 20:19:09 +01:00
weather.gd Phase 12: Seasons + Weather (rolls, rain, storm, wet/cold) 2026-05-11 16:39:34 +01:00
weather.gd.uid Phase 12: Seasons + Weather (rolls, rain, storm, wet/cold) 2026-05-11 16:39:34 +01:00
world.gd Phase 16: Save/load full coverage + autosave + UI 2026-05-11 19:24:59 +01:00
world.gd.uid Make main scene root Node2D so editor defaults to 2D view 2026-05-10 20:19:09 +01:00