mirror of
https://github.com/vcmi/vcmi.git
synced 2025-07-01 00:45:26 +02:00
Fixed issue that allowed to build multiple boats in town. Renamed state() to sth more sensible.
This commit is contained in:
@ -6744,7 +6744,7 @@ int3 IBoatGenerator::bestLocation() const
|
||||
return int3 (-1,-1,-1);
|
||||
}
|
||||
|
||||
IBoatGenerator::EGeneratorState IBoatGenerator::state() const
|
||||
IBoatGenerator::EGeneratorState IBoatGenerator::shipyardStatus() const
|
||||
{
|
||||
int3 tile = bestLocation();
|
||||
const TerrainTile *t = IObjectInterface::cb->getTile(tile);
|
||||
@ -6772,7 +6772,7 @@ IBoatGenerator::IBoatGenerator(const CGObjectInstance *O)
|
||||
|
||||
void IBoatGenerator::getProblemText(MetaString &out, const CGHeroInstance *visitor) const
|
||||
{
|
||||
switch(state())
|
||||
switch(shipyardStatus())
|
||||
{
|
||||
case BOAT_ALREADY_BUILT:
|
||||
out.addTxt(MetaString::GENERAL_TXT, 51);
|
||||
@ -6848,7 +6848,7 @@ void CGShipyard::onHeroVisit( const CGHeroInstance * h ) const
|
||||
if(!cb->gameState()->getPlayerRelations(tempOwner, h->tempOwner))
|
||||
cb->setOwner(this, h->tempOwner);
|
||||
|
||||
auto s = state();
|
||||
auto s = shipyardStatus();
|
||||
if(s != IBoatGenerator::GOOD)
|
||||
{
|
||||
InfoWindow iw;
|
||||
|
Reference in New Issue
Block a user