Luanti 5.15.0-dev
 
Loading...
Searching...
No Matches
mapblock.cpp File Reference
#include "mapblock.h"
#include <memory>
#include <sstream>
#include "map.h"
#include "nodedef.h"
#include "nodemetadata.h"
#include "gamedef.h"
#include "log.h"
#include "content_mapnode.h"
#include "content_nodemeta.h"
#include "serialization.h"
#include "porting.h"
#include "settings.h"
#include "util/string.h"
#include "util/serialize.h"
#include "util/basic_macros.h"
+ Include dependency graph for mapblock.cpp:

Classes

class  IdIdMapping
 

Functions

static size_t get_max_objects_per_block ()
 
std::string analyze_block (MapBlock *block)
 

Variables

static const char * modified_reason_strings []
 

Function Documentation

◆ analyze_block()

std::string analyze_block ( MapBlock * block)

References CONTENT_AIR, CONTENT_IGNORE, MapNode::getContent(), MapBlock::getIsUnderground(), MapBlock::getLightingComplete(), MapBlock::getModified(), MapBlock::getNodeNoEx(), MapBlock::getPos(), MapBlock::isGenerated(), itos(), MAP_BLOCKSIZE, MOD_STATE_CLEAN, MOD_STATE_WRITE_AT_UNLOAD, MOD_STATE_WRITE_NEEDED, porting::mt_snprintf(), and p().

Referenced by EmergeThread::finishGen().

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

◆ get_max_objects_per_block()

static size_t get_max_objects_per_block ( )
inlinestatic

References g_settings, Settings::getU16(), and MYMAX.

Referenced by MapBlock::onObjectsActivation(), and MapBlock::saveStaticObject().

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

Variable Documentation

◆ modified_reason_strings

const char* modified_reason_strings[]
static
Initial value:
= {
"reallocate or initial",
"setIsUnderground",
"setLightingComplete",
"setGenerated",
"setNode",
"setTimestamp",
"reportMetadataChange",
"clearAllObjects",
"Timestamp expired (step)",
"addActiveObjectRaw",
"removeRemovedObjects: remove",
"removeRemovedObjects: deactivate",
"objects cleared due to overflow",
"deactivateFarObjects: static data moved in",
"deactivateFarObjects: static data moved out",
"deactivateFarObjects: static data changed",
"finishBlockMake: expireIsAir",
"MMVManip::blitBackAll",
"unknown",
}

Referenced by MapBlock::getModifiedReasonString().