Skip to content

Commit

Permalink
fixup 4197f27
Browse files Browse the repository at this point in the history
Compute the correct default of "require_X", which is true for era
and false for modification.
  • Loading branch information
cbeck88 committed Mar 15, 2015
1 parent 47384e6 commit b6d6471
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/saved_game.cpp
Expand Up @@ -244,7 +244,8 @@ void saved_game::expand_mp_events()
{
// Note the addon_id if this mod is required to play the game in mp
std::string require_attr = "require_" + mod.type;
if (cfg.has_attribute("addon_id") && !cfg["addon_id"].empty() && cfg[require_attr].to_bool(true)) {
bool require_default = (mod.type == "era"); // By default, eras have "require_era = true", and mods have "require_modification = false"
if (!cfg["addon_id"].empty() && cfg[require_attr].to_bool(require_default)) {
config addon_data = config_of("id",cfg["addon_id"])("version", cfg["addon_version"])("min_version", cfg["addon_min_version"]);
mp_game_settings::addon_version_info new_data(addon_data);

Expand Down

0 comments on commit b6d6471

Please sign in to comment.