hide bonus

This commit is contained in:
Laserlicht
2025-07-08 11:59:16 +02:00
committed by GitHub
parent 46072a1d60
commit cf32f00472
7 changed files with 17 additions and 2 deletions
+1
View File
@@ -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;
}
+4
View File
@@ -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;