mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-26 03:52:01 +02:00
respect headeronly
This commit is contained in:
parent
be61daa95a
commit
b16f721b39
@ -608,6 +608,9 @@ std::vector< std::vector<ui8> > CampaignHandler::getFile(std::unique_ptr<CInputS
|
||||
auto data = loader.load(resource)->readAll();
|
||||
ret.push_back(std::vector<ui8>(data.first.get(), data.first.get() + data.second));
|
||||
|
||||
if(headerOnly)
|
||||
return ret;
|
||||
|
||||
// load scenarios
|
||||
JsonNode header(reinterpret_cast<const std::byte*>(data.first.get()), data.second, VCMP_HEADER_FILE_NAME);
|
||||
for(auto scenario : header["scenarios"].Vector())
|
||||
|
Loading…
x
Reference in New Issue
Block a user