mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-21 00:19:29 +02:00
Reworked and fixed gendered hero sprites on adventure map
This commit is contained in:
@ -72,17 +72,21 @@ public:
|
||||
|
||||
class CHeroInstanceConstructor : public CDefaultObjectTypeHandler<CGHeroInstance>
|
||||
{
|
||||
JsonNode filtersJson;
|
||||
protected:
|
||||
bool objectFilter(const CGObjectInstance * obj, std::shared_ptr<const ObjectTemplate> tmpl) const override;
|
||||
struct HeroFilter
|
||||
{
|
||||
HeroTypeID fixedHero;
|
||||
bool allowMale;
|
||||
bool allowFemale;
|
||||
};
|
||||
|
||||
std::map<std::string, HeroFilter> filters;
|
||||
const CHeroClass * heroClass = nullptr;
|
||||
|
||||
std::shared_ptr<const ObjectTemplate> getOverride(TerrainId terrainType, const CGObjectInstance * object) const override;
|
||||
void initTypeData(const JsonNode & input) override;
|
||||
|
||||
public:
|
||||
const CHeroClass * heroClass = nullptr;
|
||||
std::map<std::string, LogicalExpression<HeroTypeID>> filters;
|
||||
|
||||
void randomizeObject(CGHeroInstance * object, vstd::RNG & rng) const override;
|
||||
void afterLoadFinalization() override;
|
||||
|
||||
bool hasNameTextID() const override;
|
||||
std::string getNameTextID() const override;
|
||||
|
Reference in New Issue
Block a user