1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00

Support for loading custom bonuses, slightly less hardcoded Skeleton

Transformer
This commit is contained in:
Ivan Savenko
2025-06-09 12:53:44 +03:00
parent 51832c4fb9
commit a305ed28bb
12 changed files with 76 additions and 64 deletions

View File

@@ -36,6 +36,7 @@ private:
std::map<int, std::string> valueDescriptions;
std::string identifier;
bool creatureNature;
bool hidden;
};
@@ -56,6 +57,8 @@ public:
BonusType stringToBonus(const std::string & name) const;
const std::string bonusToString(BonusType bonus) const;
bool isCreatureNatureBonus(BonusType bonus) const;
std::vector<BonusType> getAllObjets() const;
private:
void loadItem(const JsonNode & source, CBonusType & dest, const std::string & name) const;