beyond-all-reason / beyond-all-reason/RecoilEngine
Fragile code in loose `LuaUI/main.lua` causes LuaUI crash
- Dominant language
- C++
- Stars
- 679
- Forks
- 290
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 40
Description
https://github.com/beyond-all-reason/RecoilEngine/blob/b081fd2a1ba0b982f00d09ae752bffb2bb58f7b4/cont/LuaUI/main.lua#L16-L17
These two lines expect specific files inside `VFS.ZIP`, so any game using that `main.lua` will just have its LuaUI crash at init.
Revert the inclusion of `utils.lua` to its previous mode (was left nil, I assume that's either RAW_FIRST or just RAW) since it worked before.
rml_setup is new so there's a choice between guarding the `VFS.Include` line with some sort of `if VFS.FileExists(..., VFS.ZIP)`, or putting rml_setup into basecontent so it's in `VFS.ZIP`. (The third option is to change the include line from ZIP to RAW(_FIRST), but I dislike it for #1483 reasons).
Contributor guide
Research direction
Start at cont/LuaUI/main.lua lines 16–17 and inspect how the two VFS.Include calls resolve files in VFS.ZIP. Compare utils.lua with its previous inclusion mode, then review the available handling for the new rml_setup file. Done means LuaUI initialization no longer crashes for games missing these files, with the chosen behavior covered by an appropriate check or content update.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua
- Domain
- game-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100