fix invalid mp addon version info
This commit is contained in:
parent
4db888ce28
commit
be8aa13aa0
2 changed files with 3 additions and 3 deletions
|
@ -152,7 +152,7 @@ game_info::game_info(const config& game, const std::vector<std::string>& install
|
|||
|
||||
// Parse the list of addons required to join this game.
|
||||
for(const config& addon : game.child_range("addon")) {
|
||||
if(addon.has_attribute("id") && addon["require"].to_bool(false)) {
|
||||
if(addon.has_attribute("id") && addon["required"].to_bool(false)) {
|
||||
if(std::find(installed_addons.begin(), installed_addons.end(), addon["id"].str()) == installed_addons.end()) {
|
||||
required_addon r;
|
||||
r.addon_id = addon["id"].str();
|
||||
|
@ -413,7 +413,7 @@ game_info::addon_req game_info::check_addon_version_compatibility(const config&
|
|||
}
|
||||
|
||||
if(auto game_req = game.find_child("addon", "id", local_item["addon_id"])) {
|
||||
if(!game_req["require"].to_bool(false)) {
|
||||
if(!game_req["required"].to_bool(false)) {
|
||||
return addon_req::SATISFIED;
|
||||
}
|
||||
|
||||
|
|
|
@ -164,7 +164,7 @@ void mp_game_settings::addon_version_info::write(config & cfg) const {
|
|||
}
|
||||
|
||||
cfg["name"] = name;
|
||||
cfg["require"] = required;
|
||||
cfg["required"] = required;
|
||||
for(const auto& item : content) {
|
||||
config& c = cfg.add_child("content");
|
||||
c["id"] = item.id;
|
||||
|
|
Loading…
Add table
Reference in a new issue