mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +02:00
Implement IOwnableObject interface for shipyard
This commit is contained in:
@@ -1227,6 +1227,21 @@ BoatId CGShipyard::getBoatType() const
|
|||||||
return createdBoat;
|
return createdBoat;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const IOwnableObject * CGShipyard::asOwnable() const
|
||||||
|
{
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
ResourceSet CGShipyard::dailyIncome() const
|
||||||
|
{
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
|
||||||
|
std::vector<CreatureID> CGShipyard::providedCreatures() const
|
||||||
|
{
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
|
||||||
void CGDenOfthieves::onHeroVisit (const CGHeroInstance * h) const
|
void CGDenOfthieves::onHeroVisit (const CGHeroInstance * h) const
|
||||||
{
|
{
|
||||||
cb->showObjectWindow(this, EOpenWindowMode::THIEVES_GUILD, h, false);
|
cb->showObjectWindow(this, EOpenWindowMode::THIEVES_GUILD, h, false);
|
||||||
|
|||||||
@@ -346,7 +346,7 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class DLL_LINKAGE CGShipyard : public CGObjectInstance, public IShipyard
|
class DLL_LINKAGE CGShipyard : public CGObjectInstance, public IShipyard, public IOwnableObject
|
||||||
{
|
{
|
||||||
friend class ShipyardInstanceConstructor;
|
friend class ShipyardInstanceConstructor;
|
||||||
|
|
||||||
@@ -358,6 +358,10 @@ protected:
|
|||||||
const IObjectInterface * getObject() const override;
|
const IObjectInterface * getObject() const override;
|
||||||
BoatId getBoatType() const override;
|
BoatId getBoatType() const override;
|
||||||
|
|
||||||
|
const IOwnableObject * asOwnable() const final;
|
||||||
|
ResourceSet dailyIncome() const override;
|
||||||
|
std::vector<CreatureID> providedCreatures() const override;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
using CGObjectInstance::CGObjectInstance;
|
using CGObjectInstance::CGObjectInstance;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user