Colobot
|
This class handles the list of mods. More...
#include <src/app/modman.h>
Public Member Functions | |
CModManager (CApplication *app, CPathManager *pathManager) | |
void | FindMods () |
Finds all the mods along with their metadata. More... | |
void | ReloadMods () |
Applies the current configuration and reloads the application. More... | |
void | EnableMod (size_t i) |
Removes a mod from the list of loaded mods. More... | |
void | DisableMod (size_t i) |
Adds a mod to the list of loaded mods. More... | |
size_t | MoveUp (size_t i) |
Moves the selected mod up in the list so that it's loaded sooner than others, returns the new index. More... | |
size_t | MoveDown (size_t i) |
Moves the selected mod down in the list so that it's loaded later than others, returns the new index. More... | |
bool | Changes () |
Checks if the list of currently used mods differs from the current configuration or there were changes made by the user. More... | |
void | SaveMods () |
Saves the current configuration of mods to the config file. More... | |
size_t | CountMods () const |
Number of mods loaded. More... | |
const Mod & | GetMod (size_t i) const |
Returns the reference to the mod in given position. More... | |
const std::vector< Mod > & | GetMods () const |
Returns the list of mods. More... | |
This class handles the list of mods.
The order matters since the order in which files are loaded matters, because some files can be overwritten.
The changes in the list do not immediately apply.
void CModManager::FindMods | ( | ) |
Finds all the mods along with their metadata.
void CModManager::ReloadMods | ( | ) |
Applies the current configuration and reloads the application.
void CModManager::EnableMod | ( | size_t | i | ) |
Removes a mod from the list of loaded mods.
void CModManager::DisableMod | ( | size_t | i | ) |
Adds a mod to the list of loaded mods.
size_t CModManager::MoveUp | ( | size_t | i | ) |
Moves the selected mod up in the list so that it's loaded sooner than others, returns the new index.
size_t CModManager::MoveDown | ( | size_t | i | ) |
Moves the selected mod down in the list so that it's loaded later than others, returns the new index.
bool CModManager::Changes | ( | ) |
Checks if the list of currently used mods differs from the current configuration or there were changes made by the user.
void CModManager::SaveMods | ( | ) |
Saves the current configuration of mods to the config file.
size_t CModManager::CountMods | ( | ) | const |
Number of mods loaded.
const Mod & CModManager::GetMod | ( | size_t | i | ) | const |
Returns the reference to the mod in given position.
const std::vector< Mod > & CModManager::GetMods | ( | ) | const |
Returns the list of mods.