Colobot
Public Member Functions | List of all members
CModManager Class Reference

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

Detailed Description

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.

Member Function Documentation

◆ FindMods()

void CModManager::FindMods ( )

Finds all the mods along with their metadata.

◆ ReloadMods()

void CModManager::ReloadMods ( )

Applies the current configuration and reloads the application.

◆ EnableMod()

void CModManager::EnableMod ( size_t  i)

Removes a mod from the list of loaded mods.

◆ DisableMod()

void CModManager::DisableMod ( size_t  i)

Adds a mod to the list of loaded mods.

◆ MoveUp()

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.

◆ MoveDown()

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.

◆ Changes()

bool CModManager::Changes ( )

Checks if the list of currently used mods differs from the current configuration or there were changes made by the user.

◆ SaveMods()

void CModManager::SaveMods ( )

Saves the current configuration of mods to the config file.

◆ CountMods()

size_t CModManager::CountMods ( ) const

Number of mods loaded.

◆ GetMod()

const Mod & CModManager::GetMod ( size_t  i) const

Returns the reference to the mod in given position.

◆ GetMods()

const std::vector< Mod > & CModManager::GetMods ( ) const

Returns the list of mods.


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