1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-30 23:18:08 +02:00

Use alphabetic ordering for game settings

This commit is contained in:
Ivan Savenko 2024-09-11 09:54:54 +00:00
parent 2ee4e42348
commit ca13fe04df
2 changed files with 40 additions and 40 deletions

View File

@ -37,6 +37,7 @@ GameSettings::GameSettings() = default;
GameSettings::~GameSettings() = default;
const std::vector<GameSettings::SettingOption> GameSettings::settingProperties = {
{EGameSettings::BANKS_SHOW_GUARDS_COMPOSITION, "banks", "showGuardsComposition" },
{EGameSettings::BONUSES_GLOBAL, "bonuses", "global" },
{EGameSettings::BONUSES_PER_HERO, "bonuses", "perHero" },
{EGameSettings::COMBAT_ATTACK_POINT_DAMAGE_FACTOR, "combat", "attackPointDamageFactor" },
@ -54,28 +55,39 @@ const std::vector<GameSettings::SettingOption> GameSettings::settingProperties =
{EGameSettings::CREATURES_DAILY_STACK_EXPERIENCE, "creatures", "dailyStackExperience" },
{EGameSettings::CREATURES_WEEKLY_GROWTH_CAP, "creatures", "weeklyGrowthCap" },
{EGameSettings::CREATURES_WEEKLY_GROWTH_PERCENT, "creatures", "weeklyGrowthPercent" },
{EGameSettings::DIMENSION_DOOR_EXPOSES_TERRAIN_TYPE, "spells", "dimensionDoorExposesTerrainType" },
{EGameSettings::DIMENSION_DOOR_FAILURE_SPENDS_POINTS, "spells", "dimensionDoorFailureSpendsPoints" },
{EGameSettings::DIMENSION_DOOR_ONLY_TO_UNCOVERED_TILES, "spells", "dimensionDoorOnlyToUncoveredTiles"},
{EGameSettings::DIMENSION_DOOR_TOURNAMENT_RULES_LIMIT, "spells", "dimensionDoorTournamentRulesLimit"},
{EGameSettings::DIMENSION_DOOR_TRIGGERS_GUARDS, "spells", "dimensionDoorTriggersGuards" },
{EGameSettings::DWELLINGS_ACCUMULATE_WHEN_NEUTRAL, "dwellings", "accumulateWhenNeutral" },
{EGameSettings::DWELLINGS_ACCUMULATE_WHEN_OWNED, "dwellings", "accumulateWhenOwned" },
{EGameSettings::DWELLINGS_MERGE_ON_RECRUIT, "dwellings", "mergeOnRecruit" },
{EGameSettings::HEROES_BACKPACK_CAP, "heroes", "backpackSize" },
{EGameSettings::HEROES_MINIMAL_PRIMARY_SKILLS, "heroes", "minimalPrimarySkills" },
{EGameSettings::HEROES_PER_PLAYER_ON_MAP_CAP, "heroes", "perPlayerOnMapCap" },
{EGameSettings::HEROES_PER_PLAYER_TOTAL_CAP, "heroes", "perPlayerTotalCap" },
{EGameSettings::HEROES_RETREAT_ON_WIN_WITHOUT_TROOPS, "heroes", "retreatOnWinWithoutTroops" },
{EGameSettings::HEROES_STARTING_STACKS_CHANCES, "heroes", "startingStackChances" },
{EGameSettings::HEROES_BACKPACK_CAP, "heroes", "backpackSize" },
{EGameSettings::HEROES_TAVERN_INVITE, "heroes", "tavernInvite" },
{EGameSettings::HEROES_MINIMAL_PRIMARY_SKILLS, "heroes", "minimalPrimarySkills" },
{EGameSettings::MAP_FORMAT_RESTORATION_OF_ERATHIA, "mapFormat", "restorationOfErathia" },
{EGameSettings::MAP_FORMAT_ARMAGEDDONS_BLADE, "mapFormat", "armageddonsBlade" },
{EGameSettings::MAP_FORMAT_SHADOW_OF_DEATH, "mapFormat", "shadowOfDeath" },
{EGameSettings::MAP_FORMAT_CHRONICLES, "mapFormat", "chronicles" },
{EGameSettings::MAP_FORMAT_HORN_OF_THE_ABYSS, "mapFormat", "hornOfTheAbyss" },
{EGameSettings::MAP_FORMAT_IN_THE_WAKE_OF_GODS, "mapFormat", "inTheWakeOfGods" },
{EGameSettings::MAP_FORMAT_JSON_VCMI, "mapFormat", "jsonVCMI" },
{EGameSettings::MAP_FORMAT_RESTORATION_OF_ERATHIA, "mapFormat", "restorationOfErathia" },
{EGameSettings::MAP_FORMAT_SHADOW_OF_DEATH, "mapFormat", "shadowOfDeath" },
{EGameSettings::MARKETS_BLACK_MARKET_RESTOCK_PERIOD, "markets", "blackMarketRestockPeriod" },
{EGameSettings::BANKS_SHOW_GUARDS_COMPOSITION, "banks", "showGuardsComposition" },
{EGameSettings::MODULE_COMMANDERS, "modules", "commanders" },
{EGameSettings::MODULE_STACK_ARTIFACT, "modules", "stackArtifact" },
{EGameSettings::MODULE_STACK_EXPERIENCE, "modules", "stackExperience" },
{EGameSettings::PATHFINDER_IGNORE_GUARDS, "pathfinder", "ignoreGuards" },
{EGameSettings::PATHFINDER_ORIGINAL_FLY_RULES, "pathfinder", "originalFlyRules" },
{EGameSettings::PATHFINDER_USE_BOAT, "pathfinder", "useBoat" },
{EGameSettings::PATHFINDER_USE_MONOLITH_ONE_WAY_RANDOM, "pathfinder", "useMonolithOneWayRandom" },
{EGameSettings::PATHFINDER_USE_MONOLITH_ONE_WAY_UNIQUE, "pathfinder", "useMonolithOneWayUnique" },
{EGameSettings::PATHFINDER_USE_MONOLITH_TWO_WAY, "pathfinder", "useMonolithTwoWay" },
{EGameSettings::PATHFINDER_USE_WHIRLPOOL, "pathfinder", "useWhirlpool" },
{EGameSettings::TEXTS_ARTIFACT, "textData", "artifact" },
{EGameSettings::TEXTS_CREATURE, "textData", "creature" },
{EGameSettings::TEXTS_FACTION, "textData", "faction" },
@ -86,18 +98,6 @@ const std::vector<GameSettings::SettingOption> GameSettings::settingProperties =
{EGameSettings::TEXTS_ROAD, "textData", "road" },
{EGameSettings::TEXTS_SPELL, "textData", "spell" },
{EGameSettings::TEXTS_TERRAIN, "textData", "terrain" },
{EGameSettings::PATHFINDER_IGNORE_GUARDS, "pathfinder", "ignoreGuards" },
{EGameSettings::PATHFINDER_USE_BOAT, "pathfinder", "useBoat" },
{EGameSettings::PATHFINDER_USE_MONOLITH_TWO_WAY, "pathfinder", "useMonolithTwoWay" },
{EGameSettings::PATHFINDER_USE_MONOLITH_ONE_WAY_UNIQUE, "pathfinder", "useMonolithOneWayUnique" },
{EGameSettings::PATHFINDER_USE_MONOLITH_ONE_WAY_RANDOM, "pathfinder", "useMonolithOneWayRandom" },
{EGameSettings::PATHFINDER_USE_WHIRLPOOL, "pathfinder", "useWhirlpool" },
{EGameSettings::PATHFINDER_ORIGINAL_FLY_RULES, "pathfinder", "originalFlyRules" },
{EGameSettings::DIMENSION_DOOR_ONLY_TO_UNCOVERED_TILES, "spells", "dimensionDoorOnlyToUncoveredTiles"},
{EGameSettings::DIMENSION_DOOR_EXPOSES_TERRAIN_TYPE, "spells", "dimensionDoorExposesTerrainType" },
{EGameSettings::DIMENSION_DOOR_FAILURE_SPENDS_POINTS, "spells", "dimensionDoorFailureSpendsPoints" },
{EGameSettings::DIMENSION_DOOR_TRIGGERS_GUARDS, "spells", "dimensionDoorTriggersGuards" },
{EGameSettings::DIMENSION_DOOR_TOURNAMENT_RULES_LIMIT, "spells", "dimensionDoorTournamentRulesLimit"},
{EGameSettings::TOWNS_BUILDINGS_PER_TURN_CAP, "towns", "buildingsPerTurnCap" },
{EGameSettings::TOWNS_STARTING_DWELLING_CHANCES, "towns", "startingDwellingChances" },
};

View File

@ -15,6 +15,7 @@ class JsonNode;
enum class EGameSettings
{
BANKS_SHOW_GUARDS_COMPOSITION,
BONUSES_GLOBAL,
BONUSES_PER_HERO,
COMBAT_ATTACK_POINT_DAMAGE_FACTOR,
@ -26,26 +27,45 @@ enum class EGameSettings
COMBAT_GOOD_LUCK_DICE,
COMBAT_GOOD_MORALE_DICE,
COMBAT_LAYOUTS,
COMBAT_ONE_HEX_TRIGGERS_OBSTACLES,
CREATURES_ALLOW_ALL_FOR_DOUBLE_MONTH,
CREATURES_ALLOW_RANDOM_SPECIAL_WEEKS,
CREATURES_DAILY_STACK_EXPERIENCE,
CREATURES_WEEKLY_GROWTH_CAP,
CREATURES_WEEKLY_GROWTH_PERCENT,
DIMENSION_DOOR_EXPOSES_TERRAIN_TYPE,
DIMENSION_DOOR_FAILURE_SPENDS_POINTS,
DIMENSION_DOOR_ONLY_TO_UNCOVERED_TILES,
DIMENSION_DOOR_TOURNAMENT_RULES_LIMIT,
DIMENSION_DOOR_TRIGGERS_GUARDS,
DWELLINGS_ACCUMULATE_WHEN_NEUTRAL,
DWELLINGS_ACCUMULATE_WHEN_OWNED,
DWELLINGS_MERGE_ON_RECRUIT,
HEROES_BACKPACK_CAP,
HEROES_MINIMAL_PRIMARY_SKILLS,
HEROES_PER_PLAYER_ON_MAP_CAP,
HEROES_PER_PLAYER_TOTAL_CAP,
HEROES_RETREAT_ON_WIN_WITHOUT_TROOPS,
HEROES_STARTING_STACKS_CHANCES,
HEROES_BACKPACK_CAP,
HEROES_TAVERN_INVITE,
HEROES_MINIMAL_PRIMARY_SKILLS,
MAP_FORMAT_ARMAGEDDONS_BLADE,
MAP_FORMAT_CHRONICLES,
MAP_FORMAT_HORN_OF_THE_ABYSS,
MAP_FORMAT_IN_THE_WAKE_OF_GODS,
MAP_FORMAT_JSON_VCMI,
MAP_FORMAT_RESTORATION_OF_ERATHIA,
MAP_FORMAT_SHADOW_OF_DEATH,
MARKETS_BLACK_MARKET_RESTOCK_PERIOD,
BANKS_SHOW_GUARDS_COMPOSITION,
MODULE_COMMANDERS,
MODULE_STACK_ARTIFACT,
MODULE_STACK_EXPERIENCE,
PATHFINDER_IGNORE_GUARDS,
PATHFINDER_ORIGINAL_FLY_RULES,
PATHFINDER_USE_BOAT,
PATHFINDER_USE_MONOLITH_ONE_WAY_RANDOM,
PATHFINDER_USE_MONOLITH_ONE_WAY_UNIQUE,
PATHFINDER_USE_MONOLITH_TWO_WAY,
PATHFINDER_USE_WHIRLPOOL,
TEXTS_ARTIFACT,
TEXTS_CREATURE,
TEXTS_FACTION,
@ -56,28 +76,8 @@ enum class EGameSettings
TEXTS_ROAD,
TEXTS_SPELL,
TEXTS_TERRAIN,
MAP_FORMAT_RESTORATION_OF_ERATHIA,
MAP_FORMAT_ARMAGEDDONS_BLADE,
MAP_FORMAT_SHADOW_OF_DEATH,
MAP_FORMAT_CHRONICLES,
MAP_FORMAT_HORN_OF_THE_ABYSS,
MAP_FORMAT_JSON_VCMI,
MAP_FORMAT_IN_THE_WAKE_OF_GODS,
PATHFINDER_USE_BOAT,
PATHFINDER_IGNORE_GUARDS,
PATHFINDER_USE_MONOLITH_TWO_WAY,
PATHFINDER_USE_MONOLITH_ONE_WAY_UNIQUE,
PATHFINDER_USE_MONOLITH_ONE_WAY_RANDOM,
PATHFINDER_USE_WHIRLPOOL,
PATHFINDER_ORIGINAL_FLY_RULES,
TOWNS_BUILDINGS_PER_TURN_CAP,
TOWNS_STARTING_DWELLING_CHANCES,
COMBAT_ONE_HEX_TRIGGERS_OBSTACLES,
DIMENSION_DOOR_ONLY_TO_UNCOVERED_TILES,
DIMENSION_DOOR_EXPOSES_TERRAIN_TYPE,
DIMENSION_DOOR_FAILURE_SPENDS_POINTS,
DIMENSION_DOOR_TRIGGERS_GUARDS,
DIMENSION_DOOR_TOURNAMENT_RULES_LIMIT,
OPTIONS_COUNT,
OPTIONS_BEGIN = BONUSES_GLOBAL