aboutsummaryrefslogtreecommitdiff
path: root/src/content/subgames.h
diff options
context:
space:
mode:
authorrubenwardy <rw@rubenwardy.com>2022-01-30 22:40:53 +0000
committerGitHub <noreply@github.com>2022-01-30 22:40:53 +0000
commit128f6359e936bcdc5e26409ddd73438bce9c6dd6 (patch)
treef4d396d479ae17f57f25ab78df300256e28d5945 /src/content/subgames.h
parent8c0331d2449cf71049c7ce9c06d141e2846ebcb0 (diff)
downloadminetest-128f6359e936bcdc5e26409ddd73438bce9c6dd6.tar.gz
minetest-128f6359e936bcdc5e26409ddd73438bce9c6dd6.tar.bz2
minetest-128f6359e936bcdc5e26409ddd73438bce9c6dd6.zip
Use virtual paths to specify exact mod to enable (#11784)
Diffstat (limited to 'src/content/subgames.h')
-rw-r--r--src/content/subgames.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/content/subgames.h b/src/content/subgames.h
index 4a50803e8..d36b4952f 100644
--- a/src/content/subgames.h
+++ b/src/content/subgames.h
@@ -21,6 +21,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include <string>
#include <set>
+#include <unordered_map>
#include <vector>
class Settings;
@@ -33,13 +34,16 @@ struct SubgameSpec
int release;
std::string path;
std::string gamemods_path;
- std::set<std::string> addon_mods_paths;
+
+ /**
+ * Map from virtual path to mods path
+ */
+ std::unordered_map<std::string, std::string> addon_mods_paths;
std::string menuicon_path;
SubgameSpec(const std::string &id = "", const std::string &path = "",
const std::string &gamemods_path = "",
- const std::set<std::string> &addon_mods_paths =
- std::set<std::string>(),
+ const std::unordered_map<std::string, std::string> &addon_mods_paths = {},
const std::string &name = "",
const std::string &menuicon_path = "",
const std::string &author = "", int release = 0) :