1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-14 10:12:59 +02:00
Commit Graph

11 Commits

Author SHA1 Message Date
Ivan Savenko
6056d385ed Always load json configs from mod that references it
This should fix rather common problem with mods, where two unrelated mods
accidentally use same file name for a config file, leading to very unclear
conflict since this result in a file override.

Now all config files referenced in mod.json are loaded specifically from
filesystem of mod that referenced it. In other words, it is no longer
possible for one mod to override config from another mod.

As a side effect, this allows mods to use shorter directory layout, e.g.
`config/modName/xxx.json` can now be safely replaced with `config/
xxx.json` without fear of broken mod if there is another mod with same
path to config. Similarly, now all mods can use `config/translation/
language.json` scheme for translation files

Since this is no longer a problem, I've also simplified directory layout
of our built-in 'vcmi' mod, by moving all files from `config/vcmi`
directory directly to `config` directory.

- Overrides for miscellaneous configs like mainmenu.json should works as
before
- Images / animations (png's or def's) work as before (and may still
result in confict)
- Rebalance mods work as before and can modify another mod via standard
`modName:objectName` syntax
2024-10-31 14:49:11 +00:00
Ivan Savenko
2399a5a765
Merge pull request #4712 from IvanSavenko/detect_conflict
Detection of potential conflicts between mods
2024-10-07 17:57:52 +03:00
Ivan Savenko
8e4152bc81 It is now possible to define objects directly in mod.json instead of
using path to file with object definition
2024-10-06 19:42:15 +00:00
Ivan Savenko
d849e53499 Implement detection of mod compatibility patches 2024-10-06 16:11:32 +00:00
Ivan Savenko
d0aba56a5e Analyze json object modifications to detect mod conflicts 2024-10-06 13:58:41 +00:00
Alexander Wilms
02e429e973 Fix typos using https://github.com/crate-ci/typos
Changes were reviewed manually
2024-06-24 03:47:19 +02:00
Ivan Savenko
757f77378d Remove unused code 2024-02-26 12:55:49 +02:00
Ivan Savenko
08a27663f9 Reworked JsonNode constructors to more logical form 2024-02-26 12:55:49 +02:00
Ivan Savenko
3740f8b02f Moved bonus parsing to a new file 2024-02-14 15:48:06 +02:00
Ivan Savenko
0b7bf56597 Remove old files 2024-02-14 14:02:41 +02:00
Ivan Savenko
c3957c2c2a Moved json files to new directory, split on per-class basis 2024-02-14 13:08:24 +02:00