mirror of
https://github.com/vcmi/vcmi.git
synced 2026-06-19 22:57:37 +02:00
hide bonus
This commit is contained in:
@@ -203,6 +203,7 @@ JsonNode Bonus::toJsonNode() const
|
||||
root["updater"] = updater->toJsonNode();
|
||||
if(propagator)
|
||||
root["propagator"].String() = vstd::findKey(bonusPropagatorMap, propagator);
|
||||
root["hidden"].Bool() = hidden;
|
||||
return root;
|
||||
}
|
||||
|
||||
|
||||
@@ -75,6 +75,8 @@ struct DLL_LINKAGE Bonus : public std::enable_shared_from_this<Bonus>, public Se
|
||||
MetaString description;
|
||||
PlayerColor bonusOwner = PlayerColor::CANNOT_DETERMINE;
|
||||
|
||||
bool hidden;
|
||||
|
||||
Bonus(BonusDuration::Type Duration, BonusType Type, BonusSource Src, si32 Val, BonusSourceID sourceID);
|
||||
Bonus(BonusDuration::Type Duration, BonusType Type, BonusSource Src, si32 Val, BonusSourceID sourceID, BonusSubtypeID subtype);
|
||||
Bonus(BonusDuration::Type Duration, BonusType Type, BonusSource Src, si32 Val, BonusSourceID sourceID, BonusSubtypeID subtype, BonusValueType ValType);
|
||||
@@ -92,6 +94,8 @@ struct DLL_LINKAGE Bonus : public std::enable_shared_from_this<Bonus>, public Se
|
||||
h & description;
|
||||
if (h.hasFeature(Handler::Version::CUSTOM_BONUS_ICONS))
|
||||
h & customIconPath;
|
||||
if (h.hasFeature(Handler::Version::BONUS_HIDDEN))
|
||||
h & hidden;
|
||||
h & additionalInfo;
|
||||
h & turnsRemain;
|
||||
h & valType;
|
||||
|
||||
Reference in New Issue
Block a user