mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-15 00:05:02 +02:00
- Added faction-specific dwellings
- Fixed generation of terrain-specific objects
This commit is contained in:
@ -218,6 +218,17 @@ bool CDwellingInstanceConstructor::producesCreature(const CCreature * crea) cons
|
||||
return false;
|
||||
}
|
||||
|
||||
std::vector<const CCreature *> CDwellingInstanceConstructor::getProducedCreatures() const
|
||||
{
|
||||
std::vector<const CCreature *> creatures; //no idea why it's 2D, to be honest
|
||||
for (auto & entry : availableCreatures)
|
||||
{
|
||||
for (const CCreature * cre : entry)
|
||||
creatures.push_back(cre);
|
||||
}
|
||||
return creatures;
|
||||
}
|
||||
|
||||
CBankInstanceConstructor::CBankInstanceConstructor()
|
||||
{
|
||||
}
|
||||
|
@ -13,6 +13,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
class CGObjectInstance;
|
||||
class CGTownInstance;
|
||||
class CGHeroInstance;
|
||||
class CGDwelling;
|
||||
@ -123,6 +124,7 @@ public:
|
||||
void configureObject(CGObjectInstance * object, CRandomGenerator & rng) const;
|
||||
|
||||
bool producesCreature(const CCreature * crea) const;
|
||||
std::vector<const CCreature *> getProducedCreatures() const;
|
||||
|
||||
template <typename Handler> void serialize(Handler &h, const int version)
|
||||
{
|
||||
|
Reference in New Issue
Block a user