#include <cctype>
#include <fstream>
#include <json/json.h>
#include <algorithm>
#include "content/mods.h"
#include "filesys.h"
#include "log.h"
#include "content/subgames.h"
#include "settings.h"
#include "porting.h"
#include "convert_json.h"
Functions | |
bool | parseDependsString (std::string &dep, std::unordered_set< char > &symbols) |
void | parseModContents (ModSpec &spec) |
std::map< std::string, ModSpec > | getModsInPath (const std::string &path, bool part_of_modpack) |
std::vector< ModSpec > | flattenMods (const std::map< std::string, ModSpec > &mods) |
References ModSpec::is_modpack, and ModSpec::modpack_content.
Referenced by ModConfiguration::addModsFromConfig(), and ModConfiguration::addModsInPath().
std::map<std::string, ModSpec> getModsInPath | ( | const std::string & | path, |
bool | part_of_modpack | ||
) |
References DIR_DELIM, fs::GetDirListing(), and parseModContents().
Referenced by ModConfiguration::addModsFromConfig(), ModConfiguration::addModsInPath(), and parseModContents().
bool parseDependsString | ( | std::string & | dep, |
std::unordered_set< char > & | symbols | ||
) |
References MODNAME_ALLOWED_CHARS, string_allowed(), and trim().
Referenced by parseModContents().
void parseModContents | ( | ModSpec & | spec | ) |
References ModSpec::author, ModSpec::depends, ModSpec::desc, DIR_DELIM, Settings::exists(), Settings::get(), getModsInPath(), Settings::getS32(), ModSpec::is_modpack, ModSpec::modpack_content, ModSpec::name, ModSpec::optdepends, parseDependsString(), ModSpec::path, Settings::readConfigFile(), ModSpec::release, and str_split().
Referenced by getModsInPath(), and ModApiMainMenu::l_get_content_info().