Minetest  5.4.0
mods.cpp File Reference
#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"
+ Include dependency graph for mods.cpp:

Functions

bool parseDependsString (std::string &dep, std::unordered_set< char > &symbols)
 
void parseModContents (ModSpec &spec)
 
std::map< std::string, ModSpecgetModsInPath (const std::string &path, bool part_of_modpack)
 
std::vector< ModSpecflattenMods (const std::map< std::string, ModSpec > &mods)
 

Function Documentation

◆ flattenMods()

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().

+ Here is the caller graph for this function:

◆ getModsInPath()

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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ parseDependsString()

bool parseDependsString ( std::string &  dep,
std::unordered_set< char > &  symbols 
)

References MODNAME_ALLOWED_CHARS, string_allowed(), and trim().

Referenced by parseModContents().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ 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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: