Luanti 5.10.0-dev
 
Loading...
Searching...
No Matches
ModSpec Struct Reference

#include <mods.h>

+ Collaboration diagram for ModSpec:

Public Member Functions

 ModSpec ()
 
 ModSpec (const std::string &name, const std::string &path, bool part_of_modpack, const std::string &virtual_path)
 
void checkAndLog () const
 

Public Attributes

std::string name
 
std::string author
 
std::string path
 
std::string desc
 
int release = 0
 
std::unordered_set< std::string > depends
 
std::unordered_set< std::string > optdepends
 
std::unordered_set< std::string > unsatisfied_depends
 
bool part_of_modpack = false
 
bool is_modpack = false
 
std::string virtual_path
 A constructed canonical path to represent this mod's location.
 
std::vector< const char * > deprecation_msgs
 
std::map< std::string, ModSpecmodpack_content
 

Constructor & Destructor Documentation

◆ ModSpec() [1/2]

ModSpec::ModSpec ( )
inline

◆ ModSpec() [2/2]

ModSpec::ModSpec ( const std::string & name,
const std::string & path,
bool part_of_modpack,
const std::string & virtual_path )
inline

Member Function Documentation

◆ checkAndLog()

void ModSpec::checkAndLog ( ) const

References deprecation_msgs, Error, get_deprecated_handling_mode(), Ignore, MODNAME_ALLOWED_CHARS, name, path, string_allowed(), and warningstream.

+ Here is the call graph for this function:

Member Data Documentation

◆ author

std::string ModSpec::author

Referenced by parseModContents(), and push_mod_spec().

◆ depends

std::unordered_set<std::string> ModSpec::depends

◆ deprecation_msgs

std::vector<const char *> ModSpec::deprecation_msgs

Referenced by checkAndLog(), and parseModContents().

◆ desc

std::string ModSpec::desc

Referenced by parseModContents(), and push_mod_spec().

◆ is_modpack

bool ModSpec::is_modpack = false

Referenced by flattenMods(), and parseModContents().

◆ modpack_content

std::map<std::string, ModSpec> ModSpec::modpack_content

Referenced by flattenMods(), and parseModContents().

◆ name

◆ optdepends

std::unordered_set<std::string> ModSpec::optdepends

◆ part_of_modpack

bool ModSpec::part_of_modpack = false

◆ path

◆ release

int ModSpec::release = 0

Referenced by parseModContents(), and push_mod_spec().

◆ unsatisfied_depends

std::unordered_set<std::string> ModSpec::unsatisfied_depends

◆ virtual_path

std::string ModSpec::virtual_path

A constructed canonical path to represent this mod's location.

This intended to be used as an identifier for a modpath that tolerates file movement, and cannot be used to read the mod files.

Note that mymod is the directory name, not the mod name specified in mod.conf.

Ex:

  • mods/mymod
  • mods/mymod (1) (^ this would have name=mymod in mod.conf)
  • mods/modpack1/mymod
  • games/mygame/mods/mymod
  • worldmods/mymod

Referenced by ModApiMainMenu::l_check_mod_configuration(), parseModContents(), and push_mod_spec().


The documentation for this struct was generated from the following files: