1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-06 09:09:40 +02:00

Adventure map shipyard nwo has configurable boat type

This commit is contained in:
Ivan Savenko
2023-06-08 00:04:13 +03:00
parent 487f441f47
commit 4d947be287
11 changed files with 109 additions and 24 deletions

View File

@@ -29,17 +29,12 @@ CGObjectInstance * HillFortInstanceConstructor::create(std::shared_ptr<const Obj
if(tmpl)
fort->appearance = tmpl;
fort->upgradeCostPercentage = parameters["upgradeCostFactor"].convertTo<std::vector<int>>();
return fort;
}
void HillFortInstanceConstructor::configureObject(CGObjectInstance * object, CRandomGenerator & rng) const
{
HillFort * fort = dynamic_cast<HillFort *>(object);
if(!fort)
throw std::runtime_error("Unexpected object instance in HillFortInstanceConstructor!");
fort->upgradeCostPercentage = parameters["upgradeCostFactor"].convertTo<std::vector<int>>();
}
std::unique_ptr<IObjectInfo> HillFortInstanceConstructor::getObjectInfo(std::shared_ptr<const ObjectTemplate> tmpl) const