1
1
forked from 0ad/0ad
0ad/source/simulation2
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
..
components Fix non-visual autostart, as well as client/host autostart. 2022-05-15 06:34:17 +00:00
docs Migrate DEFINE_INTERFACE_METHOD_* to the ScriptFunction wrappers. 2021-05-01 08:01:30 +00:00
helpers Remove leftover terrain-based movement cost code. 2022-01-29 08:22:28 +00:00
scripting Fixes macOS warnings after adding final keyword to simulation classes in 3eee3a444d. 2022-03-07 23:04:11 +00:00
serialization Remove JS_New in favour of JS::Construct in preparation for SM91 2022-01-12 16:51:32 +00:00
system Fix non-visual autostart, as well as client/host autostart. 2022-05-15 06:34:17 +00:00
tests Remove leftover terrain-based movement cost code. 2022-01-29 08:22:28 +00:00
MessageTypes.h Adds final keyword to simulation component classes. 2022-03-03 22:42:26 +00:00
Simulation2.cpp Move GenericName, History and Icon from the civ-JSON to cmpIdentity. 2022-02-05 06:24:45 +00:00
Simulation2.h Move GenericName, History and Icon from the civ-JSON to cmpIdentity. 2022-02-05 06:24:45 +00:00
TypeList.h Add a simple 'pushing' logic to unit motion to improve movement. 2021-04-02 16:30:59 +00:00