Follows rP26584.
Piping the autostart through a GUI page is easy but requires using the GUI in non-visual mode, which is problematic since it's not initialised.
As discussed here https://code.wildfiregames.com/D4527#196557 the GUI isn't actually needed, only the ability to load external scripts.
This diff adds an 'entrypoint' script in the new autostart folder that gets called with this unique ability, setting things up properly. The mod mod gets a placeholder.
While at it:
- Fix some issues with networked autostart:
- Players were not assigned slots.
- The host didn't actually wait for other players.
- Move gamesettings from gui/gamesettings/ to gamesettings/. This moves attributes as well.
- Move autostart files from gui/autostart/ to autostart/. Note that gui/autostart/ still exists as it's used in the tutorial button from the main menu.
- rename the JSI_VFS functions to be explicitly about their function: the ability to write and the potential restricted folders.
- Don't require autostart when using --autostart-client in non-visual mode.
Should work in any combination of visual, non-visual & host / client business. Note that autostarting a visual host will black-screen until all clients are connected (would be nice to show something, but I'm lazy).
This diff highlights that:
- Some files in gui/common should probably be moved elsewhere
Game attributes should probably be moved elsewhere- Template loading code is kinda not great, see e.g. D4612 (though I'm not convinced that approach is better).
- Our gamesetup code still has some work to be generic, the reliance on objects in the regular classes makes them rather unusable.