@@ -220,7 +220,7 @@ ModConfiguration::ModConfiguration(std::string worldpath)
220
220
Settings worldmt_settings;
221
221
worldmt_settings.readConfigFile (worldmt.c_str ());
222
222
std::vector<std::string> names = worldmt_settings.getNames ();
223
- std::set<std::string> exclude_mod_names ;
223
+ std::set<std::string> include_mod_names ;
224
224
for (std::vector<std::string>::iterator it = names.begin ();
225
225
it != names.end (); ++it)
226
226
{
@@ -229,14 +229,13 @@ ModConfiguration::ModConfiguration(std::string worldpath)
229
229
// explicitely excluded. if mod is not mentioned at all, it is
230
230
// enabled. So by default, all installed mods are enabled.
231
231
if (name.compare (0 ,9 ," load_mod_" ) == 0 &&
232
- ! worldmt_settings.getBool (name))
232
+ worldmt_settings.getBool (name))
233
233
{
234
- exclude_mod_names .insert (name.substr (9 ));
234
+ include_mod_names .insert (name.substr (9 ));
235
235
}
236
236
}
237
237
238
- // Collect all mods in gamespec.addon_mods_paths,
239
- // excluding those in the set exclude_mod_names
238
+ // Collect all mods that are also in include_mod_names
240
239
std::vector<ModSpec> addon_mods;
241
240
for (std::set<std::string>::const_iterator it_path = gamespec.addon_mods_paths .begin ();
242
241
it_path != gamespec.addon_mods_paths .end (); ++it_path)
@@ -246,7 +245,7 @@ ModConfiguration::ModConfiguration(std::string worldpath)
246
245
it != addon_mods_in_path.end (); ++it)
247
246
{
248
247
ModSpec& mod = *it;
249
- if (exclude_mod_names .count (mod.name ) = = 0 )
248
+ if (include_mod_names .count (mod.name ) ! = 0 )
250
249
addon_mods.push_back (mod);
251
250
}
252
251
}
0 commit comments