mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-27 22:49:25 +02:00
Show per-type object names in editor
This commit is contained in:
@@ -22,6 +22,7 @@ class CGTownInstance;
|
||||
class CGHeroInstance;
|
||||
class CGMarket;
|
||||
class CHeroClass;
|
||||
class CGCreature;
|
||||
class CBank;
|
||||
class CGBoat;
|
||||
class CFaction;
|
||||
@@ -33,6 +34,20 @@ public:
|
||||
bool isStaticObject() override;
|
||||
};
|
||||
|
||||
class CreatureInstanceConstructor : public CDefaultObjectTypeHandler<CGCreature>
|
||||
{
|
||||
public:
|
||||
bool hasNameTextID() const override;
|
||||
std::string getNameTextID() const override;
|
||||
};
|
||||
|
||||
class ResourceInstanceConstructor : public CDefaultObjectTypeHandler<CGResource>
|
||||
{
|
||||
public:
|
||||
bool hasNameTextID() const override;
|
||||
std::string getNameTextID() const override;
|
||||
};
|
||||
|
||||
class CTownInstanceConstructor : public CDefaultObjectTypeHandler<CGTownInstance>
|
||||
{
|
||||
JsonNode filtersJson;
|
||||
@@ -48,6 +63,9 @@ public:
|
||||
void randomizeObject(CGTownInstance * object, CRandomGenerator & rng) const override;
|
||||
void afterLoadFinalization() override;
|
||||
|
||||
bool hasNameTextID() const override;
|
||||
std::string getNameTextID() const override;
|
||||
|
||||
template <typename Handler> void serialize(Handler &h, const int version)
|
||||
{
|
||||
h & filtersJson;
|
||||
@@ -72,6 +90,9 @@ public:
|
||||
void randomizeObject(CGHeroInstance * object, CRandomGenerator & rng) const override;
|
||||
void afterLoadFinalization() override;
|
||||
|
||||
bool hasNameTextID() const override;
|
||||
std::string getNameTextID() const override;
|
||||
|
||||
template <typename Handler> void serialize(Handler &h, const int version)
|
||||
{
|
||||
h & filtersJson;
|
||||
|
||||
Reference in New Issue
Block a user