1
1
forked from 0ad/0ad
0ad/source/simulation2/system
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
..
CmpPtr.cpp # Rewrite of the game's simulation system 2010-01-09 19:20:14 +00:00
CmpPtr.h Replace use of safe bool by explicit bool operator. 2015-01-25 03:11:24 +00:00
Component.h Fixes macOS warnings after adding final keyword to simulation classes in 3eee3a444d. 2022-03-07 23:04:11 +00:00
ComponentManager.cpp Fix non-visual autostart, as well as client/host autostart. 2022-05-15 06:34:17 +00:00
ComponentManager.h Fix map errors from GetTemplate not being available in the sim 2022-05-09 18:13:34 +00:00
ComponentManagerSerialization.cpp Further header & precompiled cleanup, fix no-PCH builds. 2020-12-09 14:39:14 +00:00
Components.h # Rewrite of the game's simulation system 2010-01-09 19:20:14 +00:00
ComponentTest.h Fixes macOS warnings after adding final keyword to simulation classes in 3eee3a444d. 2022-03-07 23:04:11 +00:00
DynamicSubscription.cpp Convert debug_printf to take UTF-8 strings instead of wchar_t. 2015-02-14 01:45:13 +00:00
DynamicSubscription.h Further header & precompiled cleanup, fix no-PCH builds. 2020-12-09 14:39:14 +00:00
Entity.h Replace deprecated jsval with JS::Value. 2017-08-28 10:27:36 +00:00
EntityMap.h Use templates to replace explicit serialization helpers. 2020-12-19 09:10:37 +00:00
IComponent.cpp Don't include ComponentManager.h in ScriptComponent 2021-05-16 15:12:39 +00:00
IComponent.h Don't include ComponentManager.h in ScriptComponent 2021-05-16 15:12:39 +00:00
Interface.h Don't include ComponentManager.h in ScriptComponent 2021-05-16 15:12:39 +00:00
InterfaceScripted.h Split JS conversions from ScriptInterface. 2021-05-13 09:43:33 +00:00
LocalTurnManager.cpp Increase MP Command delay to 4 turns, decrease MP turns to 200ms. 2021-03-03 21:02:57 +00:00
LocalTurnManager.h Add an interface for Reinforcement Learning. 2020-08-01 10:52:59 +00:00
Message.h Remove DefPersistentRooted and unneeded includes. 2020-11-12 08:24:30 +00:00
ParamNode.cpp Drops custom utf16 string implementation (from cdd3317ded), uses C++11 one. 2021-11-29 12:10:41 +00:00
ParamNode.h Include CStrInternStatic where necessary only. 2021-05-18 11:09:54 +00:00
ReplayTurnManager.cpp Split off JSON-related function from ScriptInterface, clean up headers. 2021-05-14 10:18:03 +00:00
ReplayTurnManager.h Remember OOS on a per-client basis. 2021-03-31 15:55:19 +00:00
SimContext.cpp Simulation context cleanup, refs #3991, #3168. 2016-05-19 19:42:07 +00:00
SimContext.h Simulation context cleanup, refs #3991, #3168. 2016-05-19 19:42:07 +00:00
TurnManager.cpp Split off JSON-related function from ScriptInterface, clean up headers. 2021-05-14 10:18:03 +00:00
TurnManager.h Fix Profiler1 "time per turn". 2021-05-06 16:49:34 +00:00