1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-06 09:09:40 +02:00

Enable Limiter nesting with AllOf, AnyOf, NoneOf (#439)

* Renamed LimiterList to AllOfLimiter and added AnyOfLimiter, NoneOfLimiter
* Updated bonus schema to new limiter format
This commit is contained in:
Henning Koehler
2018-04-01 23:17:34 +12:00
committed by ArseniyShestakov
parent 6ddcb079a4
commit 82f334b503
8 changed files with 252 additions and 95 deletions

View File

@@ -139,6 +139,9 @@ void registerTypesMapObjectTypes(Serializer &s)
s.template registerType<IUpdater, GrowsWithLevelUpdater>();
s.template registerType<IUpdater, TimesHeroLevelUpdater>();
s.template registerType<IUpdater, TimesStackLevelUpdater>();
s.template registerType<ILimiter, AnyOfLimiter>();
s.template registerType<ILimiter, NoneOfLimiter>();
//new types (other than netpacks) must register here
//order of type registration is critical for loading old savegames
}
@@ -178,7 +181,7 @@ void registerTypesMapObjects2(Serializer &s)
// Limiters
//s.template registerType<ILimiter>();
s.template registerType<ILimiter, LimiterList>();
s.template registerType<ILimiter, AllOfLimiter>();
s.template registerType<ILimiter, CCreatureTypeLimiter>();
s.template registerType<ILimiter, HasAnotherBonusLimiter>();
s.template registerType<ILimiter, CreatureNativeTerrainLimiter>();