mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +02:00
All objects that can be owned by player now implement IOwnableObject
This commit is contained in:
@@ -132,6 +132,11 @@ const IOwnableObject * CGMine::asOwnable() const
|
||||
return this;
|
||||
}
|
||||
|
||||
std::vector<CreatureID> CGMine::providedCreatures() const
|
||||
{
|
||||
return {};
|
||||
}
|
||||
|
||||
ResourceSet CGMine::dailyIncome() const
|
||||
{
|
||||
ResourceSet result;
|
||||
@@ -974,6 +979,21 @@ void CGSignBottle::serializeJsonOptions(JsonSerializeFormat& handler)
|
||||
handler.serializeStruct("text", message);
|
||||
}
|
||||
|
||||
const IOwnableObject * CGGarrison::asOwnable() const
|
||||
{
|
||||
return this;
|
||||
}
|
||||
|
||||
ResourceSet CGGarrison::dailyIncome() const
|
||||
{
|
||||
return {};
|
||||
}
|
||||
|
||||
std::vector<CreatureID> CGGarrison::providedCreatures() const
|
||||
{
|
||||
return {};
|
||||
}
|
||||
|
||||
void CGGarrison::onHeroVisit (const CGHeroInstance *h) const
|
||||
{
|
||||
auto relations = cb->gameState()->getPlayerRelations(h->tempOwner, tempOwner);
|
||||
@@ -1277,6 +1297,21 @@ void CGObelisk::setPropertyDer(ObjProperty what, ObjPropertyID identifier)
|
||||
}
|
||||
}
|
||||
|
||||
const IOwnableObject * CGLighthouse::asOwnable() const
|
||||
{
|
||||
return this;
|
||||
}
|
||||
|
||||
ResourceSet CGLighthouse::dailyIncome() const
|
||||
{
|
||||
return {};
|
||||
}
|
||||
|
||||
std::vector<CreatureID> CGLighthouse::providedCreatures() const
|
||||
{
|
||||
return {};
|
||||
}
|
||||
|
||||
void CGLighthouse::onHeroVisit( const CGHeroInstance * h ) const
|
||||
{
|
||||
if(h->tempOwner != tempOwner)
|
||||
|
||||
Reference in New Issue
Block a user