Skip to content

[pull] master from beyond-all-reason:master - #226

Merged
pull[bot] merged 4 commits into
ExaDev:masterfrom
beyond-all-reason:master
Sep 12, 2026
Merged

[pull] master from beyond-all-reason:master#226
pull[bot] merged 4 commits into
ExaDev:masterfrom
beyond-all-reason:master

Conversation

@pull

@pull pull Bot commented Sep 12, 2026

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

eun-ice and others added 4 commits September 12, 2026 06:22
### Work done

Fix the order menu showing an enemy unit as "Fire at will" again after
changing its fire state in godmode and reselecting it, even when the
unit received the command.

`Spring.GetUnitStates` can return no value for enemy units because
godmode control does not grant allied read access. The shared fire-state
reader previously converted that missing value to "Fire at will". Only
when `Spring.IsGodModeEnabled()` is true, it now falls back to the
unit's fire-state command description and returns nil if neither source
is available. Custom fire-state rules parameters retain priority. With
godmode disabled, the previous behavior is preserved, including the
default for unavailable states; no command descriptions are queried by
the fallback.

#### Test steps

- [x] Reproduced the incorrect fallback with mocked Spring APIs before
the fix; nine Lua checks cover own/enemy units, all four engine fire
states, custom Defend priority, and missing/invalid units.
- [x] 120 additional mocked checks compare godmode-disabled results
against the implementation before this PR, covering valid/invalid units,
both modoption settings, available/missing engine states and custom
rules states. All match, and the fallback never queries command
descriptions without godmode.
- [x] `stylua --check modules/custom_firestate_defs.lua` and `git diff
--check` pass.
- [ ] In a local game with cheats and godmode enabled, select an enemy
unit, change its fire state, deselect and reselect it. Verify the menu
keeps showing the actual state. Repeat with left/right click and an
own-team unit, then with godmode disabled. In-game validation is still
pending.

### AI / LLM usage statement

OpenAI Codex investigated the bug, implemented the change, ran the
mocked checks, and prepared this PR.
@pull pull Bot locked and limited conversation to collaborators Sep 12, 2026
@pull pull Bot added the ⤵️ pull label Sep 12, 2026
@pull
pull Bot merged commit d1c0b23 into ExaDev:master Sep 12, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants