feat(modapi): game.flags and flagChanged take a mod's content flags by their ids #2657

Merged
HumanBean merged 2 commits from ChloeNow/Longshot:feat/modapi-flags-by-id-v2 into mod-api 2026-11-28 00:18:16 +00:00
Contributor

Summary

The runtime takes a mod's content by its id (items.grant(":Rupee7")), but its flags only by their game names. A mod
that declares a flag with content.flag({ id: "Seen" }) has to write "M1a2b3c4d.Seen" everywhere it uses it: the
FNV-1a hash of its own id, worked out by hand. content.md lists :id for flags as not yet.

Now game.flags.get, has and set, and flagChanged's filter, take a mod's content flags by their ids, as the rest
of the runtime takes its content:

flagChanged.on((e) => log.info(`${e.flag}: ${e.value}`), { flag: ":ChestOpened" });   // e.flag: "M37444242.ChestOpened"
flags.set(":ChestOpened", 1);
flags.get("other/mod:Seen");                                                           // another mod's
  • ":id" is the calling mod's own flag, "owner/name:id" another mod's; each is read as the game name content.flag
    makes (content::plan::word and the id). A game name is taken as it is. A mod's tests, which the game runs as
    tests:<id>, name its flags as the mod does.
  • flagChanged tells the flag's game name in e.flag, whichever way the listener named it: the filter is kept as the
    game name when the listener subscribes, so it matches the event.
  • In game.flags and the flagChanged filter, a name with a : that names no flag (no id after it, an id that is not a declaration's) is UnknownNameError; has() is false. The test game's flag() returns undefined for such a name.
  • The test game's flag() and setFlag() take the same names (it runs the same services).

Read first: flag_name and flag_watch_refused in game/crates/api/src/services/game.rs, then watch_refused in
game/crates/script/src/runtime.rs and its caller in script/src/bind/mod.rs (api_on: the filter the hook hands
back is the one kept). The test game: flag_name in game/crates/modtool/src/testing_game/hooks.rs.

This is #2572 moved onto the current mod-api (rewritten since), on a new branch so the pull request is only this
change; #2572 can close. It was #2287's change to the C mod API first. Part of #1958's Modding API; targets mod-api.

Testing

Tested: Windows 11, NVIDIA GeForce RTX 4060 Laptop GPU, driver 621.24. In the game: a quick build of current
mod-api with this change and the flow patches' (#2656), dev.py game-tests, the repository's kokiri-start. A
mod's own test passes: the mod reads its content flag as ":Seen" (0, has true, ":9Seen" refused with
UnknownNameError), sets it (game.flags.set Mf7b05380.Seen 0 -> 1 in the log), flagChanged tells
Mf7b05380.Seen 0 -> 1, and the test's game.flag(":Seen") reads 1 (a mod's tests, run as tests:<id>, name its
flags as the mod does). Checks: cargo test -p api -p script -p modtool (api's flag_name against an FNV-1a written
out in the test: a game name, the mod's own, another's, six names refused; script's service hooks keeping a :id
filter as its game name; modtool's testing_game: a mod that reads, writes and watches its flag as ":Seen", e.flag
its game name, a bad name returning undefined from the test's flag(), the test's flag(":Seen")); cargo check --workspace --all-targets; cargo run -p schema-gen -- --check; rustfmt. Two tests fail on mod-api itself and here, on Windows:
api's a_content_mods_changed_module_runs_again_and_its_outputs_are_served and modtool's
eden_and_ryujinx_mods_are_found_with_their_switches.

Still to test:

  • Linux, and clippy with warnings as errors: mise run rust and mise run test (by hand, or CI)

Measurements

Nothing to measure: a name without a : costs one search for it; a :id name is one FNV-1a over the mod's id per call, and flagChanged names it once, at on().

Risks

A game flag's name never holds a :, so no name that worked before reads anything else now. The generated docs'
schema hash (docs/modding/*.md) conflicts with any other schema change: whichever of this and #2656 merges second
needs cargo run -p schema-gen again. A filter given as :id
tells e.flag as the game name, which a listener comparing e.flag to the text it gave would not expect: the docs and
the record's doc say so.

Checklist

Ready for review

  • One topic, on current mod-api; the title is a Conventional Commit.
  • Tested on my own PC, in the game for a change the game runs, as Testing says.
  • mise run test passes (any failure that also fails on main is named).
  • Measured against main, or Measurements says why there is nothing to measure.
  • No game files, build output or hand-edited generated files; third_party/ untouched; nothing GPL-incompatible.

When it applies

  • A check under tests/ that reads changed source is updated, not weakened.
  • Host code builds on Windows (llvm-mingw) and Linux, with UTF-8 paths.
  • Docs updated.
  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.

Ready to merge

  • Everything in Still to test has run, its results in Tested.
  • Tier 1 hardware it can affect is tested (docs/dev/standards.md, "Hardware tiers").
  • Approved in review, every comment answered.
  • CI passes on the head; on current main, measured again or a comment says why the numbers still hold.

🤖 Generated with Claude Code

## Summary The runtime takes a mod's content by its id (`items.grant(":Rupee7")`), but its flags only by their game names. A mod that declares a flag with `content.flag({ id: "Seen" })` has to write `"M1a2b3c4d.Seen"` everywhere it uses it: the FNV-1a hash of its own id, worked out by hand. `content.md` lists `:id` for flags as not yet. Now `game.flags.get`, `has` and `set`, and `flagChanged`'s filter, take a mod's content flags by their ids, as the rest of the runtime takes its content: ```ts flagChanged.on((e) => log.info(`${e.flag}: ${e.value}`), { flag: ":ChestOpened" }); // e.flag: "M37444242.ChestOpened" flags.set(":ChestOpened", 1); flags.get("other/mod:Seen"); // another mod's ``` - `":id"` is the calling mod's own flag, `"owner/name:id"` another mod's; each is read as the game name `content.flag` makes (`content::plan::word` and the id). A game name is taken as it is. A mod's tests, which the game runs as `tests:<id>`, name its flags as the mod does. - `flagChanged` tells the flag's game name in `e.flag`, whichever way the listener named it: the filter is kept as the game name when the listener subscribes, so it matches the event. - In `game.flags` and the `flagChanged` filter, a name with a `:` that names no flag (no id after it, an id that is not a declaration's) is `UnknownNameError`; `has()` is false. The test game's `flag()` returns `undefined` for such a name. - The test game's `flag()` and `setFlag()` take the same names (it runs the same services). Read first: `flag_name` and `flag_watch_refused` in `game/crates/api/src/services/game.rs`, then `watch_refused` in `game/crates/script/src/runtime.rs` and its caller in `script/src/bind/mod.rs` (`api_on`: the filter the hook hands back is the one kept). The test game: `flag_name` in `game/crates/modtool/src/testing_game/hooks.rs`. This is #2572 moved onto the current `mod-api` (rewritten since), on a new branch so the pull request is only this change; #2572 can close. It was #2287's change to the C mod API first. Part of #1958's Modding API; targets `mod-api`. ## Testing **Tested:** Windows 11, NVIDIA GeForce RTX 4060 Laptop GPU, driver 621.24. In the game: a quick build of current `mod-api` with this change and the flow patches' (#2656), `dev.py game-tests`, the repository's `kokiri-start`. A mod's own test passes: the mod reads its content flag as `":Seen"` (0, `has` true, `":9Seen"` refused with `UnknownNameError`), sets it (`game.flags.set Mf7b05380.Seen 0 -> 1` in the log), `flagChanged` tells `Mf7b05380.Seen 0 -> 1`, and the test's `game.flag(":Seen")` reads 1 (a mod's tests, run as `tests:<id>`, name its flags as the mod does). Checks: `cargo test -p api -p script -p modtool` (api's `flag_name` against an FNV-1a written out in the test: a game name, the mod's own, another's, six names refused; script's service hooks keeping a `:id` filter as its game name; modtool's testing_game: a mod that reads, writes and watches its flag as `":Seen"`, `e.flag` its game name, a bad name returning `undefined` from the test's `flag()`, the test's `flag(":Seen")`); `cargo check --workspace --all-targets`; `cargo run -p schema-gen -- --check`; rustfmt. Two tests fail on `mod-api` itself and here, on Windows: `api`'s `a_content_mods_changed_module_runs_again_and_its_outputs_are_served` and `modtool`'s `eden_and_ryujinx_mods_are_found_with_their_switches`. **Still to test:** - Linux, and clippy with warnings as errors: `mise run rust` and `mise run test` (by hand, or CI) ## Measurements Nothing to measure: a name without a `:` costs one search for it; a `:id` name is one FNV-1a over the mod's id per call, and `flagChanged` names it once, at `on()`. ## Risks A game flag's name never holds a `:`, so no name that worked before reads anything else now. The generated docs' schema hash (`docs/modding/*.md`) conflicts with any other schema change: whichever of this and #2656 merges second needs `cargo run -p schema-gen` again. A filter given as `:id` tells `e.flag` as the game name, which a listener comparing `e.flag` to the text it gave would not expect: the docs and the record's doc say so. ## Checklist ### Ready for review - [x] One topic, on current `mod-api`; the title is a Conventional Commit. - [x] Tested on my own PC, in the game for a change the game runs, as Testing says. - [ ] `mise run test` passes (any failure that also fails on `main` is named). <!-- Windows run as Testing says; clippy and Linux: CI --> - [x] Measured against `main`, or Measurements says why there is nothing to measure. - [x] No game files, build output or hand-edited generated files; `third_party/` untouched; nothing GPL-incompatible. ### When it applies - [x] A check under `tests/` that reads changed source is updated, not weakened. - [ ] Host code builds on Windows (llvm-mingw) and Linux, with UTF-8 paths. <!-- Windows built and played; Linux: CI --> - [x] Docs updated. - [x] AI assistance recorded with `Assisted-by:` / `Co-Authored-By:` trailers. ### Ready to merge - [ ] Everything in Still to test has run, its results in Tested. - [ ] Tier 1 hardware it can affect is tested (docs/dev/standards.md, "Hardware tiers"). - [ ] Approved in review, every comment answered. - [ ] CI passes on the head; on current `main`, measured again or a comment says why the numbers still hold. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
feat(modapi): game.flags and flagChanged take a mod's content flags by their ids (":Seen")
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, build (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
PR description / Description follows the template (pull_request_target) Successful in 6s
Guide screenshots / Guide images and local UI source review (pull_request) Has been cancelled
Third-party parts / As their notes say (pull_request) Has been cancelled
Third-party parts / The same as upstream (pull_request) Has been cancelled
ce89a911de
The runtime takes a mod's content by its id (items.grant(":Rupee7")), but its flags only by their game names: a mod
wrote "M1a2b3c4d.Seen", the FNV-1a hash of its own id worked out by hand. content.md listed ":id" for flags as not yet.

game.flags.get, has and set, and flagChanged's filter, now take ":Seen", the calling mod's own flag, and
"owner/name:Seen", another mod's, read as the game name content.flag makes (content::plan::word and the id). A game
name is taken as it is; a name with a ":" that names no flag (no id after it, an id that is not a declaration's) is
UnknownNameError, and has() is false. A mod's tests, which the game runs as "tests:<id>", name its flags as the mod
does.

api::services::game::flag_name names it. flagChanged keeps a ":id" filter as its game name, so the event's flag (its
game name, whichever way the listener named it) matches it: flag_watch_refused, and the script host's watch_refused
hook, may answer with the filter the host keeps in place of the one given (script::bind's api_on). The test game
(modtool's testing_game) runs the same services, and its flag() and setFlag() take the same names.

Tests: api's flag_name against an FNV-1a written out in the test (a game name, the mod's own, another's, six names
refused); script's service hooks keeping a ":id" filter as its game name; modtool's testing_game test of a mod that
reads, writes and watches its flag as ":Seen" (e.flag the game name, a bad name refused, the test's flag(":Seen")).

This replaces #2287, which made the same change to the C mod API.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Author
Contributor

Tested in game: Windows 11, RTX 4060 Laptop, a quick build of current mod-api with this and the flow patches: a mod's own test passes in play (dev.py game-tests, kokiri-start): it reads its flag as ":Seen", sets it (game.flags.set Mf7b05380.Seen 0 -> 1), flagChanged tells it, and the test's game.flag(":Seen") reads 1.

Tested in game: Windows 11, RTX 4060 Laptop, a quick build of current mod-api with this and the flow patches: a mod's own test passes in play (dev.py game-tests, kokiri-start): it reads its flag as ":Seen", sets it (game.flags.set Mf7b05380.Seen 0 -> 1), flagChanged tells it, and the test's game.flag(":Seen") reads 1.
Member

Possibly related, for context:

  • PR #2656 WIP: feat(mods): flow patches, new events in an event flow — Flow-patch PR shares generated schema/docs; description notes this PR and merge-order regeneration
Possibly related, for context: - PR #2656 WIP: feat(mods): flow patches, new events in an event flow — Flow-patch PR shares generated schema/docs; description notes this PR and merge-order regeneration
Owner
@review
BeanBot left a comment

Recommendation: Request changes. The fake test game throws for an invalid content flag ID, while the in-game test runner returns undefined for the same call. The new test therefore encourages behavior that cannot pass in both runners.

Mods can name content flags by ID for reads, writes and change subscriptions, avoiding hand-computed game names. The translation is small, but the test-game mismatch makes tests less portable between the fake and real game.

Blocking (1): must change before merging.

  1. L2: It conflicts with its base branch: bring it up to date (@​fix or @​rebase try first). (for the author)

Should fix (1): not blocking, but worth doing before merging.

  • L1 game/crates/modtool/src/testing_game/hooks.rs:445: The fake runner throws for an invalid content flag ID, but the in-game runner's game.flag first calls flags.has, which returns false for that ID, and consequently returns undefined. (more on the line) Do: Make fake game.flag return the same missing-value result as the in-game runner for invalid IDs, and update the test to exercise the same behavior in both runners.

@fix can do L1.

Checks: Still running: Guide screenshots / Guide images and local UI source review (pull_request), Third-party parts / As their notes say (pull_request), Third-party parts / The same as upstream (pull_request).

More: does it help, other systems, switches, what was read

Does it help: Yes for the demonstrated own-flag flow: the author reports a Windows in-game test that read, wrote and watched :Seen. Cross-mod names and invalid-name behavior have not been demonstrated in that run.

Other systems: The change affects script subscriptions, game flag reads and writes, and both test runners. It does not change rendering or GPU-specific code. Windows was exercised in game; Linux and the remaining checks are still listed as untested.

Switches: None.

Reviewed: ce89a911de against 3391f978eb: Read AGENTS.md, CONTRIBUTING.md, the pull request template, applicable standards, the diff and commit message, and the changed flag service and test-game paths with their callers. Skimmed the remaining portions of the large changed Rust files and generated documentation; docs/review-checklist.md and the sibling Tooling checkout were absent.; nothing run (a code review).

Checked and fine:

  • The commit records AI assistance.
  • No game-derived files, switches, renderer interface changes or third-party changes appear in the diff.
  • The retained subscription filter uses the translated game name, matching the emitted flag name.

Testing: No code or tests were run, as requested. The author reports a Windows in-game run and crate checks; Linux and clippy remain outstanding, and three CI checks are still running.

Overlaps and merge order: #2572 is described as superseded by this pull request. The author notes a generated schema documentation conflict with #2656; regenerate after whichever merges second.


Automated code review by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.

**Recommendation: Request changes.** The fake test game throws for an invalid content flag ID, while the in-game test runner returns undefined for the same call. The new test therefore encourages behavior that cannot pass in both runners. Mods can name content flags by ID for reads, writes and change subscriptions, avoiding hand-computed game names. The translation is small, but the test-game mismatch makes tests less portable between the fake and real game. **Blocking (1)**: must change before merging. 1. **L2**: It conflicts with its base branch: bring it up to date (`@​fix` or `@​rebase` try first). *(for the author)* **Should fix (1)**: not blocking, but worth doing before merging. - **L1** `game/crates/modtool/src/testing_game/hooks.rs:445`: The fake runner throws for an invalid content flag ID, but the in-game runner's game.flag first calls flags.has, which returns false for that ID, and consequently returns undefined. (more on the line) **Do:** Make fake game.flag return the same missing-value result as the in-game runner for invalid IDs, and update the test to exercise the same behavior in both runners. `@fix` can do L1. **Checks:** Still running: `Guide screenshots / Guide images and local UI source review (pull_request)`, `Third-party parts / As their notes say (pull_request)`, `Third-party parts / The same as upstream (pull_request)`. <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Yes for the demonstrated own-flag flow: the author reports a Windows in-game test that read, wrote and watched :Seen. Cross-mod names and invalid-name behavior have not been demonstrated in that run. **Other systems:** The change affects script subscriptions, game flag reads and writes, and both test runners. It does not change rendering or GPU-specific code. Windows was exercised in game; Linux and the remaining checks are still listed as untested. **Switches:** None. **Reviewed:** ce89a911de3c against 3391f978ebd9: Read AGENTS.md, CONTRIBUTING.md, the pull request template, applicable standards, the diff and commit message, and the changed flag service and test-game paths with their callers. Skimmed the remaining portions of the large changed Rust files and generated documentation; docs/review-checklist.md and the sibling Tooling checkout were absent.; nothing run (a code review). **Checked and fine:** - The commit records AI assistance. - No game-derived files, switches, renderer interface changes or third-party changes appear in the diff. - The retained subscription filter uses the translated game name, matching the emitted flag name. **Testing:** No code or tests were run, as requested. The author reports a Windows in-game run and crate checks; Linux and clippy remain outstanding, and three CI checks are still running. **Overlaps and merge order:** #2572 is described as superseded by this pull request. The author notes a generated schema documentation conflict with #2656; regenerate after whichever merges second. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.</sub>
@ -436,3 +444,2 @@
"flag" => {
let name = str_of(a, "flag(name): the name")?;
Ok(match g.world.flag(name) {
let name = flag_name(g, str_of(a, "flag(name): the name")?, "flag")?;
Member

L1 (should fix): The fake runner throws for an invalid content flag ID, but the in-game runner's game.flag first calls flags.has, which returns false for that ID, and consequently returns undefined.

When: A test calling game.flag(":9Seen") passes the new assert.throws in the fake runner but fails when run in the game, where the call returns undefined.

Do: Make fake game.flag return the same missing-value result as the in-game runner for invalid IDs, and update the test to exercise the same behavior in both runners.

**L1** (should fix): The fake runner throws for an invalid content flag ID, but the in-game runner's game.flag first calls flags.has, which returns false for that ID, and consequently returns undefined. *When:* A test calling game.flag(":9Seen") passes the new assert.throws in the fake runner but fails when run in the game, where the call returns undefined. **Do:** Make fake game.flag return the same missing-value result as the in-game runner for invalid IDs, and update the test to exercise the same behavior in both runners.
Owner
@fix
BeanBot force-pushed feat/modapi-flags-by-id-v2 from ce89a911de
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, build (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
PR description / Description follows the template (pull_request_target) Successful in 6s
Guide screenshots / Guide images and local UI source review (pull_request) Has been cancelled
Third-party parts / As their notes say (pull_request) Has been cancelled
Third-party parts / The same as upstream (pull_request) Has been cancelled
to d12d86ca5b
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, build (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 15s
Third-party parts / As their notes say (pull_request) Successful in 19s
PR description / Description follows the template (pull_request_target) Failing after 5s
2026-11-27 23:45:31 +00:00
Compare
BeanBot left a comment

Recommendation: Approve. The fake test game now returns the missing-value result for invalid flag IDs, without disabling flag ID support. The supplied base diff contains extensive changes beyond the described feature and was not fully reviewed, so the pull request is not ready for a merge judgment. Nothing blocking is left. Recommend approval; not approved on the forge.

What @fix changed
I changed this pull request: the new head is d12d86ca5b. I rebased it onto mod-api (3f47557067).

Conflicts resolved

  • docs/modding/permissions.md: Restored the complete permissions table with the base additions and combined schema fingerprint.
  • docs/modding/reference.md: Restored the complete reference with the base additions and flag documentation.
  • docs/modding/scripting.md: Restored the complete guide and generated-version marker with the combined schema fingerprint. I edited its description to match the change.

Changed

  • Align fake game.flag with the in-game runner: Updated game/crates/modtool/src/testing_game/hooks.rs:445 to return the missing-value result for invalid IDs, and game/crates/modtool/src/testing_game/tests.rs:292 to expect undefined. Tests were not run, as requested.

Nothing was built or run: the checks run again on the new head.

Mods can address content flags by ID, and the fake test game now treats invalid IDs as missing values. The reported Windows game run demonstrates the main flow.

Checks: they run again on this head; a failure shows on the pull request.

Also noticed (3; not asked for, not blocking)
  • Linux testing and the listed checks remain pending.
  • The supplied base diff includes extensive changes outside the described flag feature, including renderer, builder and third-party changes.
  • The fix report names L1, but the supplied ledger contains no open items.
More: does it help, other systems, switches, what was read

Does it help: Yes for the described feature: the author reports reading, setting and watching a mod flag by ID in a Windows game run. This is not a performance change.

Other systems: The fix changes the fake test game's flag read; its JavaScript wrapper converts the null result to undefined. Linux behavior and the full base diff were not verified.

Switches: None in the described flag change; switches in the much larger supplied base diff were not reviewed.

Reviewed: d12d86ca5b against 3f47557067: Read the fix diff, repository rules and pull request template; inspected the flag resolver, fake-game hook, test and JavaScript wrapper. The much larger diff against the supplied base and its other changed files were not read in full.; nothing run (a code review).

Checked and fine:

  • An invalid ID returns the same null sentinel as a missing fake-game flag, which the wrapper exposes as undefined.
  • Valid IDs still pass through the shared flag name resolver.

Testing: No commands from the project or tests were run. The author reports a Windows in-game run and checks; CI has not run on this head.

Overlaps and merge order: #2572 is described as superseded; #2656 overlaps generated schema documentation and may require regeneration after merging.


Automated code review by BeanBot (gpt-6.1-terra), asked for by BeanBot, after its fix. Nothing was run; a maintainer decides.

**Recommendation: Approve.** The fake test game now returns the missing-value result for invalid flag IDs, without disabling flag ID support. The supplied base diff contains extensive changes beyond the described feature and was not fully reviewed, so the pull request is not ready for a merge judgment. Nothing blocking is left. Recommend approval; not approved on the forge. **What `@fix` changed** I changed this pull request: the new head is d12d86ca5b99. I rebased it onto `mod-api` (3f4755706727). **Conflicts resolved** - docs/modding/permissions.md: Restored the complete permissions table with the base additions and combined schema fingerprint. - docs/modding/reference.md: Restored the complete reference with the base additions and flag documentation. - docs/modding/scripting.md: Restored the complete guide and generated-version marker with the combined schema fingerprint. I edited its description to match the change. **Changed** - **Align fake game.flag with the in-game runner**: Updated game/crates/modtool/src/testing_game/hooks.rs:445 to return the missing-value result for invalid IDs, and game/crates/modtool/src/testing_game/tests.rs:292 to expect undefined. Tests were not run, as requested. Nothing was built or run: the checks run again on the new head. Mods can address content flags by ID, and the fake test game now treats invalid IDs as missing values. The reported Windows game run demonstrates the main flow. **Checks:** they run again on this head; a failure shows on the pull request. <details> <summary>Also noticed (3; not asked for, not blocking)</summary> - Linux testing and the listed checks remain pending. - The supplied base diff includes extensive changes outside the described flag feature, including renderer, builder and third-party changes. - The fix report names L1, but the supplied ledger contains no open items. </details> <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Yes for the described feature: the author reports reading, setting and watching a mod flag by ID in a Windows game run. This is not a performance change. **Other systems:** The fix changes the fake test game's flag read; its JavaScript wrapper converts the null result to undefined. Linux behavior and the full base diff were not verified. **Switches:** None in the described flag change; switches in the much larger supplied base diff were not reviewed. **Reviewed:** d12d86ca5b99 against 3f4755706727: Read the fix diff, repository rules and pull request template; inspected the flag resolver, fake-game hook, test and JavaScript wrapper. The much larger diff against the supplied base and its other changed files were not read in full.; nothing run (a code review). **Checked and fine:** - An invalid ID returns the same null sentinel as a missing fake-game flag, which the wrapper exposes as undefined. - Valid IDs still pass through the shared flag name resolver. **Testing:** No commands from the project or tests were run. The author reports a Windows in-game run and checks; CI has not run on this head. **Overlaps and merge order:** #2572 is described as superseded; #2656 overlaps generated schema documentation and may require regeneration after merging. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by BeanBot, after its fix. Nothing was run; a maintainer decides.</sub>
HumanBean changed title from WIP: feat(modapi): game.flags and flagChanged take a mod's content flags by their ids to feat(modapi): game.flags and flagChanged take a mod's content flags by their ids 2026-11-28 00:17:54 +00:00
HumanBean merged commit 37c16741d7 into mod-api 2026-11-28 00:18:16 +00:00
HumanBean deleted branch feat/modapi-flags-by-id-v2 2026-11-28 00:18:16 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MagicBeanDev/Longshot!2657
No description provided.