#include "irrlichttypes.h"
#include <list>
#include <set>
#include <vector>
#include <string>
#include <map>
#include "json-forwards.h"
#include <unordered_set>
#include "util/basic_macros.h"
#include "config.h"
#include "metadata.h"
#include "subgames.h"
Go to the source code of this file.
Classes | |
struct | ModSpec |
class | ModStorage |
Macros | |
#define | MODNAME_ALLOWED_CHARS "abcdefghijklmnopqrstuvwxyz0123456789_" |
Functions | |
bool | parseModContents (ModSpec &mod) |
Retrieves depends, optdepends, is_modpack and modpack_content. | |
std::map< std::string, ModSpec > | getModsInPath (const std::string &path, const std::string &virtual_path, bool part_of_modpack=false) |
Gets a list of all mods and modpacks in path. | |
std::vector< ModSpec > | flattenMods (const std::map< std::string, ModSpec > &mods) |
#define MODNAME_ALLOWED_CHARS "abcdefghijklmnopqrstuvwxyz0123456789_" |
Referenced by ModSpec::checkAndLog(), and parseDependsString().
References flattenMods(), ModSpec::is_modpack, and ModSpec::modpack_content.
Referenced by ModConfiguration::addModsFromConfig(), ModConfiguration::addModsInPath(), findLocaleFileInMods(), and flattenMods().
std::map< std::string, ModSpec > getModsInPath | ( | const std::string & | path, |
const std::string & | virtual_path, | ||
bool | part_of_modpack = false ) |
Gets a list of all mods and modpacks in path.
Path | to search, should be absolute |
part_of_modpack | Is this searching within a modpack? |
virtual_path | Virtual path for this directory, see comment in ModSpec |
References DIR_DELIM, fs::GetDirListing(), and parseModContents().
Referenced by ModConfiguration::addModsFromConfig(), ModConfiguration::addModsInPath(), findLocaleFileInMods(), and parseModContents().
bool parseModContents | ( | ModSpec & | mod | ) |
Retrieves depends, optdepends, is_modpack and modpack_content.
References ModSpec::author, ModSpec::depends, ModSpec::deprecation_msgs, ModSpec::desc, DIR_DELIM, Settings::exists(), Settings::get(), getModsInPath(), Settings::getS32(), ModSpec::is_modpack, fs::IsFile(), ModSpec::modpack_content, ModSpec::name, ModSpec::optdepends, parseDependsString(), ModSpec::path, Settings::readConfigFile(), fs::ReadFile(), ModSpec::release, str_split(), and ModSpec::virtual_path.
Referenced by getModsInPath(), ModApiMainMenu::l_check_mod_configuration(), and ModApiMainMenu::l_get_content_info().