Repository navigation
build: export the mission source parser for other projects - #1205
Merged
Merged
Conversation
vdmkenny
added a commit
to OpenReliant/openreliant-editor
that referenced
this pull request
Oct 14, 2026
The editor's first code: the [design](https://github.com/OpenReliant/openreliant-editor/blob/main/design/README.md)'s interface, with Mission mode's Script view working. - **Stack:** Zig 0.17, SDL3 and SDL_GPU from the same package as OpenReliant, Dear ImGui 1.92.9b's docking branch through Dear Bindings' C API, ImGuiColorTextEdit through a C shim, IBM Plex Sans, JetBrains Mono, Lucide's icons and Newtown. OpenReliant comes in as a package, pinned at the commit that exports its library and mission source parser (OpenReliant/openreliant#1205). - **Shell:** the menu bar, the toolbar, the dock layout of panels, the status bar, the start screen, the command palette and the Keys settings, as the design's pages draw them. Every action is declared once (`src/commands.zig`) with its icon, menu and keys on Windows and Linux and on macOS. - **Games come from their profile** (`src/game.zig`): StarLancer's reads its commands, conditions and records from OpenReliant's tables, and builds and decompiles with OpenReliant's compiler. Its data is kept apart from the library calls, so that profiles can become files a Game mode edits (#11). - **Script view:** opens a mod's missions, a mission file (decompiled to source beside it) or one of the game's own missions (as the source of a new mod); colours the game's words; checks the source as it's typed, with the problem in the gutter, under the text, on the outline and in Problems, and fixes for a name that isn't declared; completion and hover help from the catalogues, and the Reference panel; the outline and the inspector; breakpoints in the gutter; Build, with the script listing; Play in game and Play from part, which start `openreliant` on the mission. - **Text as in the design:** each font size the design uses is a font of its own, drawn at its exact size, and each line sits on the baseline a browser gives it (`gui.textTop`). The design's pictures now show the name in Newtown: browsers refused the font's file, which the design's copy fixes. - **Like OpenReliant:** an icon of its own made as OpenReliant's, OR with EDITOR under it, in the window, the Dock and the Windows executable, with OpenReliant's Windows manifest; `--version` from the version release-please keeps in `build.zig.zon`; release-please and the release workflow that builds the six systems' archives with checksums and attestations. The first release is 0.0.1. - **Greyed out, each with its issue:** the Scene view (#2), the Blocks view (#3), Mod mode (#4), the debugger and the editor link (#5), the guided first mission (#6), new mods from templates (#7), editing records with forms (#8), `.hog` mods (#9), the General and Appearance settings (#10). **Differs from the design:** comments aren't in italics and the ships' icons are outlines, since the text editor draws in one font and Lucide's icons are outlines only; the fold arrows sit before the line numbers, where the text editor draws them; completion inserts a command's name alone, without the values to tab through (#12); and code is laid out 8 pixels a character where the design has 7.5. Checked: the tests in Debug and ReleaseFast, the screens against the design's pages with `--screenshot`, and `--check-missions` on an installed game, where each of the 44 stock missions opens as source and builds back to the same mission. CI builds and tests on Linux, macOS and Windows. Part of OpenReliant/openreliant#1126.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Other Zig projects, such as the editor, can now use OpenReliant's library and its mission source parser:
build.zigexports thesource_parsermodule next toopenreliant.docs/guideandexamples/mods, which the modules embed and the build lists while it configures. Without them, a dependent's build stopped at "can't open examples/mods".I checked it with a scratch project that fetches the package from a
git archiveof this branch and builds a mission throughsource_parser.build.Left: a dependent still fetches every library the game builds on (#1204).
Closes #1060