1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-15 00:05:02 +02:00

Implemented boat selection for town shipyards

This commit is contained in:
Ivan Savenko
2023-06-07 19:51:44 +03:00
parent 6aedb99117
commit 487f441f47
18 changed files with 101 additions and 43 deletions

View File

@ -289,11 +289,25 @@ CGObjectInstance * BoatInstanceConstructor::create(std::shared_ptr<const ObjectT
return boat;
}
std::string BoatInstanceConstructor::getBoatAnimationName() const
{
return actualAnimation;
}
void BoatInstanceConstructor::configureObject(CGObjectInstance * object, CRandomGenerator & rng) const
{
}
void BoatInstanceConstructor::afterLoadFinalization()
{
if (layer == EPathfindingLayer::SAIL)
{
if (getTemplates(TerrainId(ETerrainId::WATER)).empty())
logMod->warn("Boat of type %s has no templates suitable for water!", getJsonKey());
}
}
void MarketInstanceConstructor::initTypeData(const JsonNode & input)
{
for(auto & element : input["modes"].Vector())