beacon: add production breakdown panel #42

Merged
Timmy merged 6 commits from feature/production-breakdown into main 2026-04-10 09:35:53 +00:00
Owner

Adds a 'PRODUCTION BREAKDOWN' section to the stats panel that shows exactly which buildings contribute to each resource rate.

  • Shows per-building contribution with proportional bars
  • Includes Timmy harmony bonuses and Bilbo randomness
  • Shows Allegro trust penalty when trust < 5
  • Delta calculation catches passive sources (ops from users, Pact trust)
  • Only appears once player has 2+ buildings
  • Negative contributions shown in red (e.g., Allegro idle, debuffs)
Adds a 'PRODUCTION BREAKDOWN' section to the stats panel that shows exactly which buildings contribute to each resource rate. - Shows per-building contribution with proportional bars - Includes Timmy harmony bonuses and Bilbo randomness - Shows Allegro trust penalty when trust < 5 - Delta calculation catches passive sources (ops from users, Pact trust) - Only appears once player has 2+ buildings - Negative contributions shown in red (e.g., Allegro idle, debuffs)
Timmy added 6 commits 2026-04-10 09:25:58 +00:00
Offline progress previously only calculated code, compute, knowledge, users,
and impact. Players returning after time away missed rescues, ops, trust,
creativity, and harmony accumulation. The welcome-back message now also
only shows resources that actually had positive rates, reducing noise.
- Progress bar shows % toward next phase threshold based on totalCode
- Milestone chips show upcoming code milestones with pulse animation on next target
- Recently completed milestones shown with green checkmark
- All elements use the existing cyber-monastic aesthetic
Active play now rewards consecutive clicks: each click within 2s of
the last builds a combo multiplier up to 5x. The WRITE CODE button
flashes on click and a floating number shows the amount gained,
turning gold at high combo. Phase progression also adds base click
power (+2 per phase). Combo decays with a visible progress bar.

Makes clicking relevant at every stage of the game, not just the
first 30 seconds.
Two changes:

1. Fixed bug where creativity was added TWICE per tick:
   - Line 930 (removed): unconditionally added creativityRate * dt
   - Line 954: conditionally adds only when ops >= 90% of max
   The conditional gate was the intent ('Creativity generates only when
   ops at max') but the unconditional add defeated it. Removed the
   unconditional addition so creativity actually respects the ops-max
   constraint as designed.

2. Added keyboard shortcuts for operations:
   - 1 = Ops -> Code
   - 2 = Ops -> Compute
   - 3 = Ops -> Knowledge
   - 4 = Ops -> Trust
   Only active when body is focused (not in input fields). SPACE
   still does Write Code. Added shortcut hint to init log.
Events now create lasting debuffs instead of vanishing on the next tick.
Players see an ACTIVE PROBLEMS panel with resolution costs and can spend
resources to fix each problem. Added 2 new events (Memory Leak, Community
Drama) alongside the reworked originals. Events Resolved stat tracked.

Key changes:
- Events push persistent debuffs with applyFn instead of one-shot rate tweaks
- updateRates() applies active debuffs each tick (they persist until resolved)
- New resolveEvent(id) function: spend resources to clear a debuff
- ACTIVE PROBLEMS UI shows debuffs with cost and fix buttons
- Save/load reconstitutes debuff objects from saved IDs
- 2 new events: Memory Leak (datacenter), Community Drama (community+low harmony)
- Events Resolved counter in statistics
Players can now see exactly which buildings contribute to each resource
rate, including Timmy harmony bonuses, Bilbo randomness, Allegro trust
penalties, and passive generation. Appears once 2+ buildings are built.

Also includes minor fixes:
- Production bars sort by absolute contribution (negative rates visible)
- Delta calculation catches passive sources (ops from users, Pact trust)
Timmy merged commit cb2e48bf9a into main 2026-04-10 09:35:53 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Timmy_Foundation/the-beacon#42