How missingdll/foundry-calc works
Foundry Calculator is a browser production-planning SPA. Users choose recipes and production goals, configure machines and bonuses, then receive machine/material requirements and interactive flow diagrams; settings persist in the browser, and plans can be shared or transferred. The graph also preserves the documented power and savegame UI areas, versioned game data, and the repository’s extractor/save-reader utilities. README statements support the main calculation workflow; sampled source is incomplete, so unsampled subsystem links are omitted.
Main entry points: state.js Plan state · calculation.js Production calculator · extract_game_data.py Game data extractor · ui-recipes.js Recipe browser
Components 17
Production planning
- Recipe browser
app/ui-recipes.js - Production calculator
app/calculation.js - Result tables
app/calculation.js - Flow visualizations
app/visualization.js
Interface and state
- Plan state
app/state.js - Settings controls
app/ui-settings.js - Navigation and sharing
app/ui-nav.js - Theme system
app/theme.js - Power interface
app/ui-power.js - Savegame interface
app/ui-savegame.js
Game data
- Version registry
data/version-registry.js - Versioned game data
data/versions/v0.6.0.26518/game-data.js - Versioned recipes
data/versions/v0.6.0.26518/recipes.js - Icon maps
data/icons.js
Data utilities
- Game data extractor
extract_game_data.py - Savegame reader
read_savegame.py
Other components
- Planner user
Connections 14
- Planner user → Recipe browser: selects recipes
README.md - Planner user → Settings controls: sets goals
README.md - Recipe browser → Plan state: updates selection
README.md - Settings controls → Plan state: updates settings
README.md - Plan state → Production calculator: triggers recalculation
README.md - Production calculator → Result tables: renders requirements
README.md - Production calculator → Flow visualizations: builds flow graph
README.md - Planner user → Navigation and sharing: exports or imports plans
README.md - Plan state → Navigation and sharing: persists plan
README.md - Planner user → Theme system: chooses theme
README.md - Theme system → Flow visualizations: updates Sankey colors
README.md - Game data extractor → Versioned game data: generates data
extract_game_data.py - Game data extractor → Versioned recipes: generates recipes
extract_game_data.py - Savegame reader → Game data extractor: uses template data
read_savegame.py