mirror of
https://github.com/vcmi/vcmi.git
synced 2025-08-10 22:31:40 +02:00
Merge pull request #5540 from GeorgeK1ng/campaign_sets
Make campaign sets modable
This commit is contained in:
@@ -48,6 +48,7 @@
|
||||
#include "../../lib/TerrainHandler.h"
|
||||
#include "../../lib/UnlockGuard.h"
|
||||
#include "../../lib/GameLibrary.h"
|
||||
#include "../../lib/json/JsonUtils.h"
|
||||
|
||||
bool mapSorter::operator()(const std::shared_ptr<ElementInfo> aaa, const std::shared_ptr<ElementInfo> bbb)
|
||||
{
|
||||
@@ -962,7 +963,7 @@ void SelectionTab::handleUnsupportedSavegames(const std::vector<ResourcePath> &
|
||||
|
||||
void SelectionTab::parseCampaigns(const std::unordered_set<ResourcePath> & files)
|
||||
{
|
||||
auto campaignSets = JsonNode(JsonPath::builtin("config/campaignSets.json"));
|
||||
auto campaignSets = JsonUtils::assembleFromFiles("config/campaignSets.json");
|
||||
auto mainmenu = JsonNode(JsonPath::builtin("config/mainmenu.json"));
|
||||
|
||||
allItems.reserve(files.size());
|
||||
|
@@ -60,6 +60,7 @@
|
||||
#include "../../lib/GameConstants.h"
|
||||
#include "../../lib/CRandomGenerator.h"
|
||||
#include "../../lib/GameLibrary.h"
|
||||
#include "../../lib/json/JsonUtils.h"
|
||||
|
||||
ISelectionScreenInfo * SEL = nullptr;
|
||||
|
||||
@@ -305,7 +306,7 @@ CMenuEntry::CMenuEntry(CMenuScreen * parent, const JsonNode & config)
|
||||
}
|
||||
|
||||
CMainMenuConfig::CMainMenuConfig()
|
||||
: campaignSets(JsonPath::builtin("config/campaignSets.json"))
|
||||
: campaignSets(JsonUtils::assembleFromFiles("config/campaignSets.json"))
|
||||
, config(JsonPath::builtin("config/mainmenu.json"))
|
||||
{
|
||||
if (!config["scenario-selection"].isStruct())
|
||||
|
Reference in New Issue
Block a user