0ad/source/ps/scripting
wraitii 557fa0312e Fix non-visual autostart, as well as client/host autostart.
Follows 8eecc39e71.

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 initialized.
The GUI is not needed, only its ability to load scripts, so this diff
fixes the problem by adding 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.

Other changes:
- 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.

Starting the autostart client/host has poor UX in some situations, but
improving that feature is beyond the scope of this diff.

Suggestions for future work:
- Some files in gui/common should probably be moved elsewhere
- Template loading code is duplicated
- The gamesetup code still needs work for proper UI/logic separation.

Help & comments by: smiley

Reported by: vladislav / Langbart
Fixes #6513

Differential Revision: https://code.wildfiregames.com/D4628
This was SVN commit r26879.
2022-05-15 06:34:17 +00:00
..
JSInterface_ConfigDB.cpp There have been quite a bit of number of questions how to change scale of the gui, because this option is hidden from the user. 2021-10-17 10:58:51 +00:00
JSInterface_ConfigDB.h Do not require restart when chaning Background pause option 2021-08-27 18:54:20 +00:00
JSInterface_Console.cpp Refactor all usage of RegisterFunction to ScriptFunction::Register 2021-03-02 20:01:14 +00:00
JSInterface_Console.h Introduce C++ templates replacements for DEFINE_INTERFACE_X and RegisterFunction macros 2021-03-01 20:52:24 +00:00
JSInterface_Debug.cpp Split ScriptRequest in its own header. 2021-05-03 16:07:26 +00:00
JSInterface_Debug.h Refactor all usage of RegisterFunction to ScriptFunction::Register 2021-03-02 20:01:14 +00:00
JSInterface_Game.cpp Let the Gamesetup.cpp Autostart (starting from cl) use the gamesettings via the autostart gui page. 2022-03-06 21:12:16 +00:00
JSInterface_Game.h Refactor all usage of RegisterFunction to ScriptFunction::Register 2021-03-02 20:01:14 +00:00
JSInterface_Hotkey.cpp Uses correct value_type to iterate over the map in JSInterface_Hotkey. Refs a4852c4c01. 2022-05-02 10:03:34 +00:00
JSInterface_Hotkey.h Introduce C++ templates replacements for DEFINE_INTERFACE_X and RegisterFunction macros 2021-03-01 20:52:24 +00:00
JSInterface_Main.cpp Set the size of the overlaybox without relying on the arbitrary initSize 2022-03-02 16:27:11 +00:00
JSInterface_Main.h Refactor all usage of RegisterFunction to ScriptFunction::Register 2021-03-02 20:01:14 +00:00
JSInterface_Mod.cpp Fix downloanded mods not showing in list until restart 2021-08-22 09:54:16 +00:00
JSInterface_Mod.h Introduce C++ templates replacements for DEFINE_INTERFACE_X and RegisterFunction macros 2021-03-01 20:52:24 +00:00
JSInterface_ModIo.cpp Split off Object-related functions from ScriptInterface 2021-05-13 17:23:52 +00:00
JSInterface_ModIo.h Refactor all usage of RegisterFunction to ScriptFunction::Register 2021-03-02 20:01:14 +00:00
JSInterface_SavedGame.cpp Split off Object-related functions from ScriptInterface 2021-05-13 17:23:52 +00:00
JSInterface_SavedGame.h Refactor all usage of RegisterFunction to ScriptFunction::Register 2021-03-02 20:01:14 +00:00
JSInterface_UserReport.cpp Split ScriptRequest in its own header. 2021-05-03 16:07:26 +00:00
JSInterface_UserReport.h Refactor all usage of RegisterFunction to ScriptFunction::Register 2021-03-02 20:01:14 +00:00
JSInterface_VFS.cpp Fix non-visual autostart, as well as client/host autostart. 2022-05-15 06:34:17 +00:00
JSInterface_VFS.h Fix non-visual autostart, as well as client/host autostart. 2022-05-15 06:34:17 +00:00
JSInterface_VisualReplay.cpp Fix replay folders with special characters. 2021-11-19 11:34:26 +00:00
JSInterface_VisualReplay.h Refactor all usage of RegisterFunction to ScriptFunction::Register 2021-03-02 20:01:14 +00:00