#include <blockmodifier.h>
Collaboration diagram for LBMManager:Public Types | |
| typedef std::map< u32, LBMContentMapping > | lbm_lookup_map |
Public Member Functions | |
| LBMManager ()=default | |
| ~LBMManager () | |
| void | addLBMDef (LoadingBlockModifierDef *lbm_def) |
| void | loadIntroductionTimes (const std::string ×, IGameDef *gamedef, u32 now) |
| std::string | createIntroductionTimesString () |
| void | applyLBMs (ServerEnvironment *env, MapBlock *block, u32 stamp, float dtime_s) |
Private Member Functions | |
| lbm_lookup_map::const_iterator | getLBMsIntroducedAfter (u32 time) |
Static Private Member Functions | |
| static std::unordered_map< std::string, u32 > | parseIntroductionTimesString (const std::string ×) |
Private Attributes | |
| bool | m_query_mode = false |
| std::unordered_map< std::string, LoadingBlockModifierDef * > | m_lbm_defs |
| lbm_lookup_map | m_lbm_lookup |
| typedef std::map<u32, LBMContentMapping> LBMManager::lbm_lookup_map |
|
default |
| LBMManager::~LBMManager | ( | ) |
References m_lbm_defs, and m_lbm_lookup.
| void LBMManager::addLBMDef | ( | LoadingBlockModifierDef * | lbm_def | ) |
References FATAL_ERROR_IF, LBM_NAME_ALLOWED_CHARS, m_lbm_defs, m_query_mode, LoadingBlockModifierDef::name, str_starts_with(), and string_allowed().
Referenced by ServerEnvironment::addLoadingBlockModifierDef(), TestLBMManager::testExisting(), and TestLBMManager::testNew().
Here is the call graph for this function:
Here is the caller graph for this function:| void LBMManager::applyLBMs | ( | ServerEnvironment * | env, |
| MapBlock * | block, | ||
| u32 | stamp, | ||
| float | dtime_s ) |
References CONTENT_IGNORE, FATAL_ERROR_IF, NodeDefManager::get(), MapNode::getContent(), ServerEnvironment::getGameDef(), getLBMsIntroducedAfter(), MapBlock::getNodeNoCheck(), MapBlock::getPos(), MapBlock::isOrphan(), m_lbm_lookup, m_query_mode, MAP_BLOCKSIZE, ContentFeatures::name, IGameDef::ndef(), and tracestream.
Referenced by ServerEnvironment::activateBlock().
Here is the call graph for this function:
Here is the caller graph for this function:| std::string LBMManager::createIntroductionTimesString | ( | ) |
References FATAL_ERROR_IF, m_lbm_lookup, and m_query_mode.
Referenced by ServerEnvironment::saveMeta(), TestLBMManager::testDiscard(), TestLBMManager::testExisting(), and TestLBMManager::testNew().
Here is the caller graph for this function:
|
inlineprivate |
| void LBMManager::loadIntroductionTimes | ( | const std::string & | times, |
| IGameDef * | gamedef, | ||
| u32 | now ) |
| now | current game time |
References infostream, m_lbm_defs, m_lbm_lookup, m_query_mode, parseIntroductionTimesString(), U32_MAX, and warningstream.
Referenced by ServerEnvironment::loadDefaultMeta(), ServerEnvironment::loadMeta(), TestLBMManager::testDiscard(), TestLBMManager::testExisting(), and TestLBMManager::testNew().
Here is the call graph for this function:
Here is the caller graph for this function:
|
staticprivate |
References from_string(), idx, and str_split().
Referenced by loadIntroductionTimes().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Referenced by ~LBMManager(), addLBMDef(), and loadIntroductionTimes().
|
private |
Referenced by ~LBMManager(), applyLBMs(), createIntroductionTimesString(), getLBMsIntroducedAfter(), and loadIntroductionTimes().
|
private |
Referenced by addLBMDef(), applyLBMs(), createIntroductionTimesString(), and loadIntroductionTimes().