aboutsummaryrefslogtreecommitdiff
path: root/src/content/subgames.h
diff options
context:
space:
mode:
authorElias Fleckenstein <eliasfleckenstein@web.de>2022-05-17 22:12:00 +0200
committerElias Fleckenstein <eliasfleckenstein@web.de>2022-05-17 22:12:00 +0200
commit21df26984da91143c15587f5a03c98d68c3adc4e (patch)
treeaaa707a628ad331f67890023dffe1b4f60dd01d3 /src/content/subgames.h
parentb09fc5de5cdb021f43ad32b7e3f50dc75c0bc622 (diff)
parenteabf05758e3ba5f6f4bb1b8d1d1f02179b84e410 (diff)
downloaddragonfireclient-21df26984da91143c15587f5a03c98d68c3adc4e.tar.xz
Merge branch 'master' of https://github.com/minetest/minetest
Diffstat (limited to 'src/content/subgames.h')
-rw-r--r--src/content/subgames.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/content/subgames.h b/src/content/subgames.h
index 60392639b..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) :
@@ -58,6 +62,8 @@ SubgameSpec findWorldSubgame(const std::string &world_path);
std::set<std::string> getAvailableGameIds();
std::vector<SubgameSpec> getAvailableGames();
+// Get the list of paths to mods in the environment variable $MINETEST_MOD_PATH
+std::vector<std::string> getEnvModPaths();
bool getWorldExists(const std::string &world_path);
//! Try to get the displayed name of a world