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

Cleaned up IShipyard interface

This commit is contained in:
Ivan Savenko
2023-06-07 01:55:21 +03:00
parent a94b68e6aa
commit 6aedb99117
15 changed files with 72 additions and 109 deletions

View File

@@ -224,8 +224,6 @@ bool CGTownInstance::hasCapitol() const
}
CGTownInstance::CGTownInstance():
IShipyard(this),
IMarket(),
town(nullptr),
builded(0),
destroyed(0),
@@ -590,6 +588,19 @@ void CGTownInstance::getOutOffsets( std::vector<int3> &offsets ) const
offsets = {int3(-1,2,0), int3(-3,2,0)};
}
CGTownInstance::EGeneratorState CGTownInstance::shipyardStatus() const
{
if (!hasBuilt(BuildingID::SHIPYARD))
return EGeneratorState::UNKNOWN;
return IShipyard::shipyardStatus();
}
const IObjectInterface * CGTownInstance::getObject() const
{
return this;
}
void CGTownInstance::mergeGarrisonOnSiege() const
{
auto getWeakestStackSlot = [&](ui64 powerLimit)