Skip to content

Preflight V1#1186

Merged
WilsontheWolf merged 3 commits intomainfrom
preflight
Feb 2, 2026
Merged

Preflight V1#1186
WilsontheWolf merged 3 commits intomainfrom
preflight

Conversation

@WilsontheWolf
Copy link
Member

@WilsontheWolf WilsontheWolf commented Feb 1, 2026

This adds a new mechanism I've dubbed "preflight". It's also bundled up with lovely 0.9.0 changes (0.9.0 is required), as it depends on a few of the new features. In practice this PR implements:

  • Preflight loading
    • Mods are loaded (not run) before the game starts, and if there are conflicts of a lovely module, it will disable it and restart the game.
    • (note theres probably some jank around multiple mods in the same directory and this system. I decided it's not worth my time to fix this one somewhat rare case).
  • ZIP loading
    • Replaces feat: basic zip loading #985
    • Works fully, including SMODS being a zip, enabling/disabling zips
    • This requires a modifed NFS. I've renamed our nativefs module to a module called SMODS.nativefs and can be accessed at the global SMODS.NFS. This is to prevent a mod vendoring NFS and overriding our global breaking zip loading. It should probably be mentioned in the release notes to use SMODS.NFS. (The global NFS and nativefs modules still exist for backward compatibility)
  • Restarting uses love.event.quit("restart")
    • This was enabled by changes in lovely 0.8.0, but we waited for 0.9.0 because we could reload patches then reload like this.
    • This should fix some jank with the old system such as double consoles, detaching from the process in terminals, better mobile support.
    • If mods make threads, this might break. I'm not aware of mods that do make threads, and preflight v2 will probably have some sort of thread helper so mods can be torn down correctly.
  • A WIP ui system.
    • This is designed to be used for the preflight loading screen and a new crash handler, but due to wanting to push the lovely changes asap, the code using this was commented out. V2 will be using this, but I didn't want to remove the code for now. For review, preflight/sharedUI is not used

Couple things I'm going to do right after I make this (didn't want to delay for this)

  • Rebase on latest changes (probably will get squashed)
  • Proper error message for older lovelys
  • Clean up some files

Additional Info:

  • I didn't modify api's or I've made a PR to the wiki repo.
  • I didn't modify api's or I've updated lsp definitions.
  • I didn't make new lovely files or all new lovely files have appropriate priority.

@WilsontheWolf WilsontheWolf changed the title janky preflight Preflight V1 Feb 1, 2026
@WilsontheWolf WilsontheWolf merged commit 884bc7a into main Feb 2, 2026
@WilsontheWolf
Copy link
Member Author

Fuck it we ball

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants