Minetest  5.4.0
LBMManager Class Reference

#include <serverenvironment.h>

+ Collaboration diagram for LBMManager:

Public Types

typedef std::map< u32, LBMContentMappinglbm_lookup_map
 

Public Member Functions

 LBMManager ()=default
 
 ~LBMManager ()
 
void addLBMDef (LoadingBlockModifierDef *lbm_def)
 
void loadIntroductionTimes (const std::string &times, IGameDef *gamedef, u32 now)
 
std::string createIntroductionTimesString ()
 
void applyLBMs (ServerEnvironment *env, MapBlock *block, u32 stamp)
 

Private Member Functions

lbm_lookup_map::const_iterator getLBMsIntroducedAfter (u32 time)
 

Private Attributes

bool m_query_mode = false
 
std::map< std::string, LoadingBlockModifierDef * > m_lbm_defs
 
lbm_lookup_map m_lbm_lookup
 

Member Typedef Documentation

◆ lbm_lookup_map

Constructor & Destructor Documentation

◆ LBMManager()

LBMManager::LBMManager ( )
default

◆ ~LBMManager()

LBMManager::~LBMManager ( )

References m_lbm_defs, and m_lbm_lookup.

Member Function Documentation

◆ addLBMDef()

void LBMManager::addLBMDef ( LoadingBlockModifierDef lbm_def)

References FATAL_ERROR_IF, LBM_NAME_ALLOWED_CHARS, m_lbm_defs, m_query_mode, LoadingBlockModifierDef::name, and string_allowed().

Referenced by ServerEnvironment::addLoadingBlockModifierDef().

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

◆ applyLBMs()

void LBMManager::applyLBMs ( ServerEnvironment env,
MapBlock block,
u32  stamp 
)

References FATAL_ERROR_IF, MapNode::getContent(), getLBMsIntroducedAfter(), MapBlock::getNodeNoEx(), MapBlock::getPosRelative(), m_lbm_lookup, m_query_mode, and MAP_BLOCKSIZE.

Referenced by ServerEnvironment::activateBlock().

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

◆ createIntroductionTimesString()

std::string LBMManager::createIntroductionTimesString ( )

References FATAL_ERROR_IF, m_lbm_lookup, and m_query_mode.

Referenced by ServerEnvironment::saveMeta().

+ Here is the caller graph for this function:

◆ getLBMsIntroducedAfter()

lbm_lookup_map::const_iterator LBMManager::getLBMsIntroducedAfter ( u32  time)
inlineprivate

References m_lbm_lookup.

Referenced by applyLBMs().

+ Here is the caller graph for this function:

◆ loadIntroductionTimes()

void LBMManager::loadIntroductionTimes ( const std::string &  times,
IGameDef gamedef,
u32  now 
)

References LBMContentMapping::addLBM(), idx, m_lbm_defs, m_lbm_lookup, m_query_mode, LoadingBlockModifierDef::run_at_every_load, str_split(), and U32_MAX.

Referenced by ServerEnvironment::loadDefaultMeta(), and ServerEnvironment::loadMeta().

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

Member Data Documentation

◆ m_lbm_defs

std::map<std::string, LoadingBlockModifierDef *> LBMManager::m_lbm_defs
private

◆ m_lbm_lookup

◆ m_query_mode

bool LBMManager::m_query_mode = false
private

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