1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-23 00:28:08 +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

@ -1915,12 +1915,6 @@ void CGSirens::onHeroVisit( const CGHeroInstance * h ) const
}
}
cb->showInfoDialog(&iw);
}
CGShipyard::CGShipyard()
:IShipyard(this)
{
}
void CGShipyard::getOutOffsets( std::vector<int3> &offsets ) const
@ -1935,6 +1929,11 @@ void CGShipyard::getOutOffsets( std::vector<int3> &offsets ) const
};
}
const IObjectInterface * CGShipyard::getObject() const
{
return this;
}
void CGShipyard::onHeroVisit( const CGHeroInstance * h ) const
{
if(!cb->gameState()->getPlayerRelations(tempOwner, h->tempOwner))
@ -1960,6 +1959,11 @@ void CGShipyard::serializeJsonOptions(JsonSerializeFormat& handler)
serializeJsonOwner(handler);
}
BoatId CGShipyard::getBoatType() const
{
return EBoatId::BOAT_GOOD;
}
void CCartographer::onHeroVisit( const CGHeroInstance * h ) const
{
//if player has not bought map of this subtype yet and underground exist for stalagmite cartographer