1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-14 10:12:59 +02:00
vcmi/lib
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
..
battle Merge pull request #4808 from Laserlicht/prism_breath 2024-10-28 12:29:41 +02:00
bonuses Merge branch 'develop' into mechanical_bonus 2024-10-31 15:14:51 +02:00
campaign Better handling of encoding detection for maps and campaigns 2024-10-30 11:54:35 +00:00
constants Split CHeroHandler.cpp/.h into 1 file per class 2024-10-13 14:01:09 +00:00
entities Split CHeroHandler.cpp/.h into 1 file per class 2024-10-13 14:01:09 +00:00
events Fix typos using https://github.com/crate-ci/typos 2024-06-24 03:47:19 +02:00
filesystem Fix crash on exporting maps for translation 2024-10-25 21:41:24 +00:00
gameState Merge pull request #4763 from IvanSavenko/herohandler_split 2024-10-14 19:05:48 +03:00
json Always load json configs from mod that references it 2024-10-31 14:49:11 +00:00
logging Fix miscellaneous issues discovered by Sonar 2024-08-12 18:26:30 +00:00
mapObjectConstructors Merge pull request #4348 from MichalZr6/hill_fort_changes 2024-10-30 14:00:35 +02:00
mapObjects Merge pull request #4348 from MichalZr6/hill_fort_changes 2024-10-30 14:00:35 +02:00
mapping Better handling of encoding detection for maps and campaigns 2024-10-30 11:54:35 +00:00
minizip Fix typos using https://github.com/crate-ci/typos 2024-06-24 03:47:19 +02:00
modding Always load json configs from mod that references it 2024-10-31 14:49:11 +00:00
network Fix miscellaneous issues discovered by Sonar 2024-08-12 18:26:30 +00:00
networkPacks Merge pull request #4766 from SoundSSGood/fused-artifacts 2024-10-16 15:08:20 +03:00
pathfinder Reduce usage of pointers to VLC entities 2024-10-10 12:28:08 +00:00
rewardable Split CHeroHandler.cpp/.h into 1 file per class 2024-10-13 14:01:09 +00:00
rmg Implemented translation support for random map descriptions 2024-10-25 20:41:19 +00:00
serializer Basic support for configurable flaggable objects 2024-10-25 16:48:10 +00:00
spells Split CHeroHandler.cpp/.h into 1 file per class 2024-10-13 14:01:09 +00:00
texts Better handling of encoding detection for maps and campaigns 2024-10-30 11:54:35 +00:00
vstd Fix: licenses, pragma guards, StdInc 2024-03-29 07:48:52 +02:00
AI_Base.h
ArtifactUtils.cpp Fused identical artifacts 2024-10-15 16:51:29 +03:00
ArtifactUtils.h ArtifactUtils::createArtifact ArtifactUtils::createNewArtifactInstance unified 2024-09-04 21:25:55 +03:00
BasicTypes.cpp added MECHANICAL bonus 2024-10-24 21:30:51 +02:00
BattleFieldHandler.cpp introduce getModScope method toEntity class and subclasses 2024-08-10 16:08:04 +02:00
BattleFieldHandler.h introduce getModScope method toEntity class and subclasses 2024-08-10 16:08:04 +02:00
CAndroidVMHelper.cpp
CAndroidVMHelper.h
CArtHandler.cpp Fused identical artifacts 2024-10-15 16:51:29 +03:00
CArtHandler.h Fused identical artifacts 2024-10-15 16:51:29 +03:00
CArtifactInstance.cpp CArtPlace now works with artifact ID 2024-10-20 12:56:54 +03:00
CArtifactInstance.h CArtPlace now works with artifact ID 2024-10-20 12:56:54 +03:00
CBonusTypeHandler.cpp Always load json configs from mod that references it 2024-10-31 14:49:11 +00:00
CBonusTypeHandler.h
CConfigHandler.cpp Rename toJson to toString/toCompactString for consistency 2024-02-26 12:55:49 +02:00
CConfigHandler.h Moved json files to new directory, split on per-class basis 2024-02-14 13:08:24 +02:00
CConsoleHandler.cpp Do not try to shoot at 2nd hex of wide creatures 2024-08-14 10:38:59 +00:00
CConsoleHandler.h Fix typos using https://github.com/crate-ci/typos 2024-06-24 03:47:19 +02:00
CCreatureHandler.cpp Reduce usage of pointers to VLC entities 2024-10-10 12:28:08 +00:00
CCreatureHandler.h Reduce usage of pointers to VLC entities 2024-10-10 12:28:08 +00:00
CCreatureSet.cpp Split CHeroHandler.cpp/.h into 1 file per class 2024-10-13 14:01:09 +00:00
CCreatureSet.h Reduce usage of pointers to VLC entities 2024-10-10 12:28:08 +00:00
CGameInfoCallback.cpp fix crash 2024-10-19 15:25:26 +02:00
CGameInfoCallback.h code review 2024-10-12 23:01:14 +02:00
CGameInterface.cpp Extracted handling of type ID's from serializer into a separate class 2024-08-26 19:48:46 +00:00
CGameInterface.h Extracted handling of type ID's from serializer into a separate class 2024-08-26 19:48:46 +00:00
CMakeLists.txt Basic support for configurable flaggable objects 2024-10-25 16:48:10 +00:00
Color.h icon drawing 2024-08-15 00:21:02 +02:00
ConstTransitivePtr.h
CPlayerState.cpp Fix some of the new warnings from sonarcloud 2024-10-11 10:45:29 +00:00
CPlayerState.h Implemented serialization of local player state in json form 2024-10-08 20:04:32 +00:00
CRandomGenerator.cpp Integrating changes from PR #4251 - add logging for rng 2024-07-16 15:31:58 +00:00
CRandomGenerator.h Replaced most of usages of CRandomGenerator with vstd::RNG in library 2024-07-16 13:13:07 +00:00
CScriptingModule.cpp
CScriptingModule.h
CSkillHandler.cpp Merge pull request #4812 from SoundSSGood/secSkillPlace 2024-10-30 13:33:39 +02:00
CSkillHandler.h suggested changes 2024-10-28 21:58:35 +02:00
CSoundBase.h Fix issues introduced by fixing typos 2024-06-27 08:38:04 +00:00
CStack.cpp Replace pointer with reference in pack apply functions 2024-10-07 14:59:46 +00:00
CStack.h Unified handling of battle sides ID's 2024-08-11 20:54:44 +00:00
CStopWatch.h
CThreadHelper.cpp Added changing thread name for FreeBSD 2024-05-12 15:10:29 +00:00
CThreadHelper.h
ExceptionsCommon.h Show error message on load if mod has broken creature instead of 2024-06-01 11:49:51 +00:00
ExtraOptionsInfo.cpp
ExtraOptionsInfo.h
FunctionList.h
GameCallbackHolder.h
GameConstants.h
GameSettings.cpp Merge branch 'develop' into spell 2024-10-07 12:55:23 +02:00
GameSettings.h It is now possible to define game settings in rmg template 2024-09-05 15:16:28 +00:00
IBonusTypeHandler.h
IGameCallback.cpp Split CHeroHandler.cpp/.h into 1 file per class 2024-10-13 14:01:09 +00:00
IGameCallback.h Fix some of the new warnings from sonarcloud 2024-10-11 10:45:29 +00:00
IGameEventsReceiver.h IMarket suggestions 2024-08-20 18:49:48 +03:00
IGameSettings.h Merge branch 'develop' into spell 2024-10-07 12:55:23 +02:00
IHandlerBase.cpp lib now uses shared_ptr for entities. Removed manual memory management. 2024-05-17 15:04:05 +00:00
IHandlerBase.h lib now uses shared_ptr for entities. Removed manual memory management. 2024-05-17 15:04:05 +00:00
int3.h Fix SonarCloud issues 2024-03-02 14:08:03 +01:00
LoadProgress.cpp
LoadProgress.h Fixes 2024-03-29 12:28:14 +02:00
LogicalExpression.cpp Split CGeneralTextHandler file into 1 file per class form 2024-07-20 12:55:17 +00:00
LogicalExpression.h Moved json files to new directory, split on per-class basis 2024-02-14 13:08:24 +02:00
ObstacleHandler.cpp introduce modScope into ObstacleInfo 2024-08-12 13:57:27 +02:00
ObstacleHandler.h introduce modScope into ObstacleInfo 2024-08-12 13:57:27 +02:00
Point.h
Rect.cpp
Rect.h First iteration of upscaled rendering 2024-08-17 15:25:25 +00:00
ResourceSet.cpp Unified income handling, added IOwnableObject interface 2024-08-28 12:40:44 +00:00
ResourceSet.h Unified income handling, added IOwnableObject interface 2024-08-28 12:40:44 +00:00
RiverHandler.cpp Minor refactoring of translations: 2024-10-06 19:42:15 +00:00
RiverHandler.h introduce getModScope method toEntity class and subclasses 2024-08-10 16:08:04 +02:00
RoadHandler.cpp Minor refactoring of translations: 2024-10-06 19:42:15 +00:00
RoadHandler.h introduce getModScope method toEntity class and subclasses 2024-08-10 16:08:04 +02:00
ScopeGuard.h
ScriptHandler.cpp
ScriptHandler.h Moved json files to new directory, split on per-class basis 2024-02-14 13:08:24 +02:00
StartInfo.cpp Split CHeroHandler.cpp/.h into 1 file per class 2024-10-13 14:01:09 +00:00
StartInfo.h Removed save compatibility with 1.4 2024-08-29 18:51:53 +00:00
StdInc.cpp Fix: licenses, pragma guards, StdInc 2024-03-29 07:48:52 +02:00
StdInc.h Fix: licenses, pragma guards, StdInc 2024-03-29 07:48:52 +02:00
TerrainHandler.cpp Minor refactoring of translations: 2024-10-06 19:42:15 +00:00
TerrainHandler.h introduce getModScope method toEntity class and subclasses 2024-08-10 16:08:04 +02:00
TurnTimerInfo.cpp Fix typos using https://github.com/crate-ci/typos 2024-06-24 03:47:19 +02:00
TurnTimerInfo.h Fix typos using https://github.com/crate-ci/typos 2024-06-24 03:47:19 +02:00
UnlockGuard.h
vcmi_endian.h
VCMI_Lib.cpp Split CHeroHandler.cpp/.h into 1 file per class 2024-10-13 14:01:09 +00:00
VCMI_Lib.h Added GameSettings to gamestate, potentially allowing to define game 2024-09-05 15:16:27 +00:00
VCMIDirs.cpp Fix typos using https://github.com/crate-ci/typos 2024-06-24 03:47:19 +02:00
VCMIDirs.h