hide Ep3 maps that don't have enough player slots for the game

This commit is contained in:
Martin Michelsen
2023-09-08 23:12:35 -07:00
parent 9c3f764cd9
commit c430340c9d
3 changed files with 33 additions and 16 deletions
+3 -6
View File
@@ -1145,17 +1145,14 @@ public:
mutable std::string compressed_trial_data;
};
const std::string& get_compressed_list() const;
const std::string& get_compressed_list(size_t num_players) const;
std::shared_ptr<const MapEntry> definition_for_number(uint32_t id) const;
std::shared_ptr<const MapEntry> definition_for_name(const std::string& name) const;
std::set<uint32_t> all_numbers() const;
private:
// The compressed map list is generated on demand from the maps map below.
// It's marked mutable because the logical consistency of the MapIndex object
// is not violated from the caller's perspective even if we don't generate the
// compressed map list at load time.
mutable std::string compressed_map_list;
// The compressed map lists are generated on demand from the maps map below
mutable std::array<std::string, 4> compressed_map_lists;
std::map<uint32_t, std::shared_ptr<MapEntry>> maps;
std::unordered_map<std::string, std::shared_ptr<MapEntry>> maps_by_name;
};