1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-10-08 23:22:25 +02:00

add error

This commit is contained in:
Laserlicht
2025-09-29 02:19:35 +02:00
parent 21bc568e59
commit 2625b44979

View File

@@ -23,6 +23,7 @@
#include "RoadPlacer.h"
#include "WaterAdopter.h"
#include "../TileInfo.h"
#include "../../entities/ResourceTypeHandler.h"
#include <vstd/RNG.h>
@@ -67,6 +68,12 @@ bool MinePlacer::placeMines(ObjectManager & manager)
mineHandler = handler;
}
if(!mineHandler)
{
logGlobal->error("No mine for resource %s found!", res.toResource()->getJsonKey());
continue;
}
const auto & rmginfo = mineHandler->getRMGInfo();
auto mine = std::dynamic_pointer_cast<CGMine>(mineHandler->create(map.mapInstance->cb, nullptr));
mine->producedResource = res;