Up to now `eslint-plugin-brace-rules` was used to enforce a common brace
style for JavaScript code. This plugin was however updated the last time
over 9 years ago and will be incompatible with ESLint v10, as that
[removes `context.getSourceCode()`][1], the plugin relies on.
To keep the eslint config working with ESLint v10, this replaces
`eslint-plugin-brace-rules` with the [`@stylistic/brace-style`][2] rule
from `@stylistic/eslint-plugin`, a package we already use.
While `@stylistic/brace-style` doesn't offer an option to format braces
in exactly the same way as before, the "allman" style seems to be the
one closest to the existing code.
[1]: https://eslint.org/blog/2025/11/eslint-v10.0.0-alpha.0-released/#removed-deprecated-rule-context-members
[2]: https://eslint.style/rules/brace-style
When the root page gets closed the engine quits instead or crashing.
The root pages are changed to use that mechanism to quit the engine.
This removes the need of `Engine.Exit` for the GUI.
Avoid cases of filenames
Update years in terms and other legal(ish) documents
Don't update years in license headers, since change is not meaningful
Will add linter rule in seperate commit
Happy recompiling everyone!
Original Patch By: Nescio
Comment By: Gallaecio
Differential Revision: D2620
This was SVN commit r27786.
remove path from javascript
path is defined by the configuration scope
combine some calls
remove not needed calls
Differential revision: D4616
Accepted by: @Freagarach, @nani
Comments by: @phosit
This was SVN commit r27192.
Differential revision: D4209
Since some revision wraitii will probbaly know, I am not going to look
for it, guiobjects require exact data type so casting does not work when
it is not done beforehand.
Error reported by Stan.
Now installing pyromod should not trigger errors.
This was SVN commit r25849.
In case mod is missing some required field, for example label or version
for some reason, mod page would stop functioning.
Adding default to empty string in list and filter.
Differential revision: D4028
This was SVN commit r25639.
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.
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.
This helps to see compatible mods in the list, which can get a bit long.
For incompatible mods in disabled section use gray colour.
For incompatible mods in enabled section use red colour (what can happen
when using arguments to start the game or they can be in config file).
Add option to filter compatible mods, this does not affect enabled
section, because if there is incompatible mod, it is error and it needs
to be always visible.
Add function recomputeCompatibility and g_ModsCompatibility to avoid
recomputing aredependenciesmet when coloring mods, because every column
is colored separately.
Disable enable mod button if mod is incompatible.
Remove all dependencies met messages as they are now replaced by this
mechanism.
fix getSelectedModUrl in process
Differential revision: D3687
Fixes: #6053
Tested by: @Freagarach
Comments by: @vladislavbelov
This was SVN commit r25095.
All functionality in applyFilters is handled by displayModLists and
modSelected functions.
This is also fixing issue of triggering selected event on the same list
multiple times and not updating mod description and buttons when
applying filters.
Differential revision: D3722
This was SVN commit r25094.
When closing the mod downloader, the list of enabled mod is reset, which
can lead to an out-of-index assertion failing in the engine if an
enabled mod was selected before.
Reported by: Vas
Fixes#6001
Differential Revision: https://code.wildfiregames.com/D3537
This was SVN commit r24854.
different font colour
no need to delete the text, when one wants to write there something
text displayed is not a value so field is technically empty
will disappear when user writes some character
will appear when user deletes all characters
we can get rid of text value "Filter" in mod selection screen and ugly
hack around it
Differential Revision: D2460
Comments by: vladislavbelov, elexis
This was SVN commit r24433.
Fixing problem with filters reported in 64bfa089af.
Use filtered version of mods for manipulation in javascript instead non
filtered one.
Fixing following problems when filter is applied:
not enabling selected mod
displaying wrong tooltip
getting out of bounds error when using keyboard arrows to select
next/previous mod
This is also disabling possibility to sort enabled mods manually when
filters are applied. See comment in moveCurrItem for more details.
Differential Revision: https://code.wildfiregames.com/D1944
This was SVN commit r23269.
mod.io is a new platform for sharing mods, that 0 A.D. can make use of
in order to download mods and install them.
Based on patch by leper, numerous changes from s0600204, vladislavbelov,
Imarok, elexis, temple and myself.
Differential Revision: https://code.wildfiregames.com/D1029
This was SVN commit r21759.
pyrogenesis can now take a zip file (rename it to .pyromod for direct
file association following 943a61e4ea) and install it. It then starts
the mod selector.
Patch by vladislavbelov, with contributions from Imarok, elexis and
myself.
Differential Revision: https://code.wildfiregames.com/D1142
This was SVN commit r21726.
Reported By: leper
Reviewed By: Vladislav
Alternatively one might consider mod label and description translations
contained in the mod.json.
This was SVN commit r21341.
The mod "name" may only consist of alphanumeric characters, underscore
and dash, because it should be used for mod dependency checks.
Drop two special characters from the "version" property.
Differential Revision: https://code.wildfiregames.com/D1093
Res #4427, d3ce5289b6
Reviewed By: Itms
This was SVN commit r20637.
Such a property should be well defined, but currently it contains
arbitrary text and is redundant with the description.
Differential Revision: https://code.wildfiregames.com/D1082
Refs #4890
Discussed with: leper
Reviewed By: wraitii
This was SVN commit r20575.
Complete documentation and validation of loaded mods proposed in D1093.
Differential Revision: https://code.wildfiregames.com/D1081
Reviewed By: wraitii, Itms
This was SVN commit r20574.
Refactor functions and unify sort dropdown choices.
Move colors to globals so that they are easily modifiable, even from
external files, refs fd034c9bcd / D911.
Fix broken "Dependency not met" translation and wrong equal comparison
operator description (== vs =), refs 64bfa089af.
Use localeCompare, simpler loops and array functions, JSdoc syntax,
ternaries, deepfreeze, let keyword and prefix increment operator.
Renames to increase descriptiveness and consistency.
Remove duplication, tautologic and unsatisfiable conditions, dead code,
unused variables and GUI object names, example within example,
unneeded variables, parentheses, TODOs, strict checks and keep XML
element, misleading linebreaks, pointless comments and "Mods Loaded"
string and the switch fall-through.
This was SVN commit r20552.