How savonneuse/midair-script works
Script Midair is a desktop and command-line calculator for finding sand/hammer TNT-cannon ratios. Users enter barrel positions and limits in the GUI, run a cancellable search, then inspect and sort solutions; the CLI accepts a JSON preset and prints text or JSON results. The solver derives barrel effects and searches candidate powers using the physics routines. The README also documents preset import/export and ranking criteria. UI styling and reusable widgets are shown as an internal layer. Some GUI details are omitted because the app source excerpt is partial.
Main entry points: app.rs Desktop workflow · main.rs Application launcher · cli.rs CLI preset runner · solver.rs Ratio search and ranking
Components 9
Application entry
- Application launcher
src/main.rs
User interfaces
- Desktop workflow
src/app.rs - CLI preset runner
src/cli.rs - Console attachment
src/console.rs
Calculation engine
- Ratio search and ranking
src/solver.rs - Barrel physics
src/physics.rs
UI presentation
- Reusable controls
src/widgets.rs - Visual theme
src/theme.rs
Other components
- User
Connections 14
- User → Application launcher: launches
README.md - Application launcher → Desktop workflow: starts GUI
src/main.rs - Application launcher → CLI preset runner: dispatches CLI
src/main.rs - Application launcher → Console attachment: attaches console
src/main.rs - User → Desktop workflow: enters parameters
README.md - Desktop workflow → Ratio search and ranking: runs search
src/app.rs - Ratio search and ranking → Barrel physics: calculates barrels
src/solver.rs - Ratio search and ranking → Desktop workflow: returns solutions
src/app.rs - User → CLI preset runner: provides preset
README.md - CLI preset runner → Ratio search and ranking: runs search
src/cli.rs - CLI preset runner → User: prints results
src/cli.rs - Desktop workflow → Reusable controls: uses controls
src/app.rs - Desktop workflow → Visual theme: installs styling
src/app.rs - Reusable controls → Visual theme: uses palette
src/widgets.rs