$ show qrrk/Catapult
Catapult is a cross-platform desktop launcher and content manager for Cataclysm: Dark Days Ahead (DDA) and related game variants (Bright Nights, Era of Decay, etc.), built with Godot 4.5 and GDScript. It automates game installation from GitHub releases (stable and experimental), manages multiple game versions, installs mods (including the Kenan Modpack), soundpacks, and custom fonts, and provides save backup/restore functionality. The application uses a tabbed UI (Game, Mods, Soundpacks, Fonts, Backups, Settings, Debug) with asynchronous operations via signals for downloads, file extraction, and external command execution. It supports 10 languages via CSV-based translations, dynamic UI scaling (HiDPI), and multiple themes (Godot 4, Solarized, Light, Gray). The architecture relies on autoload singletons (Status, Settings, Paths, FS, Downloader, etc.) and a smart control disabling pattern to prevent user interaction during long-running tasks. The codebase demonstrates solid engineering with reusable patterns like ThemeScaler for dynamic scaling, ThreadedExec for safe external command execution, and DPITexture for resolution-independent SVG icons. However, it has some maintenance risks: hardcoded release URLs, large monolithic theme files, and a Godot version migration path (CONTRIBUTING.md references Godot 3 while CI uses Godot 4.5).
The LLM identified 3 files worth highlighting for reuse:
ThemeScaler is a self-contained class that dynamically scales a Godot theme's constants, font sizes, stylebox borders, and DPITexture sizes based on a scaling factor. It iterates over all theme items and applies multiplicative scaling, enabling HiDPI support and user-adjustable UI size. This component is reusable in any Godot 4 project that needs runtime theme scaling, requiring only a reference to the theme and a scale factor.
ThreadedExec wraps OS.execute in a separate thread, emitting an 'execution_finished' signal with the exit code and output upon completion. It prevents blocking the main thread during long-running external commands (e.g., unzip, zip, tar). The script is a standalone utility that can be reused in any Godot project requiring non-blocking command execution, with minimal dependencies (only Godot's built-in classes).
SVGTexture is a custom DPITexture that loads SVG icons from inline data or files and applies a color map for theme-aware recoloring. It listens to a global scale_changed signal to update its size dynamically, ensuring crisp icons at any DPI. This component is reusable in any Godot 4 project that needs resolution-independent, themeable vector icons, and can be extracted with minimal modification (requires a signal bus for scale changes).