Since it is very non-trivial to determine which mods change checksums
and which don't, this relies on modder goodwill (and on verification on
our end for signed mods).
The declaration is an optional "ignoreInCompatibilityChecks" boolean in
mod.json
Also rework slightly the MP lobby mod display to always show the host
mods in a clear manner.
Differential Revision: https://code.wildfiregames.com/D3968
This was SVN commit r25634.
Parses mod.json data not only in temporary JS values, but in a proper
C++ struct.
This will ultimately make it more convenient to pass more than just the
version to JS in D3968, and it enforces the schema a bit more.
Differential Revision: https://code.wildfiregames.com/D3988
This was SVN commit r25546.
As noted by Angen in a26535d023, refs 3bcf360107
When starting with incompatible mods, the non-incompatible mods were no
longer shown. This fixes that.
I think the code looks cleaner from this new control flow that
explicitly only mounts "mod".
Tested by: Angen
Differential Revision: https://code.wildfiregames.com/D3996
This was SVN commit r25510.
I didn't quite understand what was supposed to happen here. This makes
things work as before.
While at it, fix a conversion bug & do some more tweaks.
Differential Revision: https://code.wildfiregames.com/D3990
This was SVN commit r25475.
- Non-visual replays now automatically try to load the replay mods. This
removes the annoyance that -mod=public usually had to be passed.
- MountMods is no longer called in InitVfs but later, making it possible
to load the game in one pass & simplifying things considerably.
- Explicitly ignore duplicates when loading mods
- Interface cleanup: failed mods and incompatible mods were redundant,
only incompatible mods is kept.
- Interface cleanup: `AreModsCompatible`becomes
`CheckForIncompatibleMods`, which becomes a private pure function,
simplifying the control flow somewhat.
- Interface cleanup: `CheckAndEnableMods` is just `EnableMods`, which
explicitly updates loaded & incompatible mods.
- `CacheEnabledModVersions` becomes private and is called on behalf of
the user, removing the need to be careful about updating that (fixes my
concern at 44ec2e324e)
Overall, the logic around mounting & enabled mods should be easier to
understand.
Differential Revision: https://code.wildfiregames.com/D3982
This was SVN commit r25474.
`Mod` currently modifies 4 global arrays, including some that are
'public'.
The logic flow is easier to understand if this becomes a real class with
const-correctness and public/private methods.
Differential Revision: https://code.wildfiregames.com/D3981
This was SVN commit r25469.
Refs 64bfa089af and 44ec2e324e
When a .zip file is encountered by the VFS population, it reads the info
for all files in the archives. This is quite slow for the public archive
(400-500ms on my computer), which means calling GetEngineInfo()
repeatedly is impossible.
By only opening the external mod.json, we skip most of the work. The
archive can still be opened if needed as fallback.
Differential Revision: https://code.wildfiregames.com/D3216
This was SVN commit r25446.
Follows 34b1920e7b.
JSON functions and ToString are movec to their own headers.
Also clean out a few PersistentRooted usage to use the 2-phase init to
clean up scriptInterface usage.
With these functions split off, we can finally clean out headers and
remove ScriptInterface.h from most of them, in favour of smaller and
more precise headers.
Take the opportunity to clarify some comments regarding Mutability.
Differential Revision: https://code.wildfiregames.com/D3961
This was SVN commit r25434.
make linter happy
add missing break to loop if correct comparator has been found, reported
by @Langbart
Differential revision: D3945
Tested by: @Langbart
This was SVN commit r25414.
Fixing following problems:
Issue number one:
Enable mod with a23 compatibility in a23b.
Save configuration.
Start a24.
Better result:
Mod will be enabled and invisible in mod selection screen producing
various errors.
Worse result:
Game will crash and refuse to start.
Issue number two:
Mods can silently set loaded mods without restarting the engine, so mods
can unlist themselves from compatibility detection.
Solution:
Enable necessary mods instead if running with gui and open mod page.
Open information window on top of mod page to infom why mod page is
showing up.
On mod page show mods which failed in compatibility check and color the
resposnible ones.
Disable start button without enabled mods.
Show non existed mods if they failed in compatibility check.
Else just log to mainlog and close.
Another fixes:
Display in enabled mods really enabled mods as current logic confuses
players about which mods they have enabled and is not helpful (ref
#4881)
Note:
this will not solve issue with mods claiming being compatible with
engine version while in fact being incompatible.
Comments by: @vladislavbelov, @Stan, @Imarok
Tested by: @wraitii
Differential revision: D3592
Fixes: #6044#4881
This was SVN commit r25410.
SM52 essentially replaces JSRuntime with JSContext (though JSContext
itself was replaced with JSCompartment).
To prepare for this migration, rename all Runtime-related things to
Context.
Part of the SM52 migration, stage: SM45 compatible.
Patch by: Itms
Refs #4893
Differential Revision: https://code.wildfiregames.com/D3091
This was SVN commit r24181.
Caches the loaded mod versions, so that GetEngineInfo doesn't read the
zip and json files everytime and returns about 1000 times faster.
Adds two missing includes.
The lobby froze multiple times every few seconds on updateGameList().
The gamesetup page was slowed down with every stanza sent and the
load savegame selection page was slowed down per savegame selection,
proportional to the number of installed zipped mods.
Introduced by: d5807cd59f and eca956a513
Differential Revision: https://code.wildfiregames.com/D1518
Reviewed By: wraitii
Comments By: Imarok (in D1512, P121), leper (in the lobby)
This was SVN commit r21823.