1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-04-02 22:05:43 +02:00

remove json campaign override

This commit is contained in:
Laserlicht 2025-01-02 21:42:32 +01:00 committed by GitHub
parent c5b8a4fd61
commit dc406ae906
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -50,14 +50,12 @@ void CampaignHandler::readCampaign(Campaign * ret, const std::vector<ui8> & inpu
{ {
JsonNode jsonCampaign(reinterpret_cast<const std::byte*>(input.data()), input.size(), filename); JsonNode jsonCampaign(reinterpret_cast<const std::byte*>(input.data()), input.size(), filename);
readHeaderFromJson(*ret, jsonCampaign, filename, modName, encoding); readHeaderFromJson(*ret, jsonCampaign, filename, modName, encoding);
ret->overrideCampaign();
for(auto & scenario : jsonCampaign["scenarios"].Vector()) for(auto & scenario : jsonCampaign["scenarios"].Vector())
{ {
auto scenarioID = static_cast<CampaignScenarioID>(ret->scenarios.size()); auto scenarioID = static_cast<CampaignScenarioID>(ret->scenarios.size());
ret->scenarios[scenarioID] = readScenarioFromJson(scenario); ret->scenarios[scenarioID] = readScenarioFromJson(scenario);
} }
ret->overrideCampaignScenarios();
} }
} }