Minetest  5.4.0
ModApiMapgen Class Reference

#include <l_mapgen.h>

+ Inheritance diagram for ModApiMapgen:
+ Collaboration diagram for ModApiMapgen:

Static Public Member Functions

static void Initialize (lua_State *L, int top)
 
- Static Public Member Functions inherited from ModApiBase
static ScriptApiBasegetScriptApiBase (lua_State *L)
 
static ServergetServer (lua_State *L)
 
static ServerInventoryManagergetServerInventoryMgr (lua_State *L)
 
static ClientgetClient (lua_State *L)
 
static GUIEnginegetGuiEngine (lua_State *L)
 
static IGameDefgetGameDef (lua_State *L)
 
static EnvironmentgetEnv (lua_State *L)
 
static std::string getCurrentModPath (lua_State *L)
 
template<typename T >
static T * getScriptApi (lua_State *L)
 
static bool registerFunction (lua_State *L, const char *name, lua_CFunction func, int top)
 
static int l_deprecated_function (lua_State *L, const char *good, const char *bad, lua_CFunction func)
 A wrapper for deprecated functions. More...
 

Static Public Attributes

static struct EnumString es_BiomeTerrainType []
 
static struct EnumString es_DecorationType []
 
static struct EnumString es_MapgenObject []
 
static struct EnumString es_OreType []
 
static struct EnumString es_Rotation []
 
static struct EnumString es_SchematicFormatType []
 
static struct EnumString es_NodeResolveMethod []
 

Static Private Member Functions

static int l_get_biome_id (lua_State *L)
 
static int l_get_biome_name (lua_State *L)
 
static int l_get_heat (lua_State *L)
 
static int l_get_humidity (lua_State *L)
 
static int l_get_biome_data (lua_State *L)
 
static int l_get_mapgen_object (lua_State *L)
 
static int l_get_spawn_level (lua_State *L)
 
static int l_get_mapgen_params (lua_State *L)
 
static int l_set_mapgen_params (lua_State *L)
 
static int l_get_mapgen_setting (lua_State *L)
 
static int l_set_mapgen_setting (lua_State *L)
 
static int l_get_mapgen_setting_noiseparams (lua_State *L)
 
static int l_set_mapgen_setting_noiseparams (lua_State *L)
 
static int l_set_noiseparams (lua_State *L)
 
static int l_get_noiseparams (lua_State *L)
 
static int l_set_gen_notify (lua_State *L)
 
static int l_get_gen_notify (lua_State *L)
 
static int l_get_decoration_id (lua_State *L)
 
static int l_register_biome (lua_State *L)
 
static int l_register_decoration (lua_State *L)
 
static int l_register_ore (lua_State *L)
 
static int l_register_schematic (lua_State *L)
 
static int l_clear_registered_biomes (lua_State *L)
 
static int l_clear_registered_decorations (lua_State *L)
 
static int l_clear_registered_schematics (lua_State *L)
 
static int l_generate_ores (lua_State *L)
 
static int l_generate_decorations (lua_State *L)
 
static int l_clear_registered_ores (lua_State *L)
 
static int l_create_schematic (lua_State *L)
 
static int l_place_schematic (lua_State *L)
 
static int l_place_schematic_on_vmanip (lua_State *L)
 
static int l_serialize_schematic (lua_State *L)
 
static int l_read_schematic (lua_State *L)
 

Additional Inherited Members

- Protected Member Functions inherited from LuaHelper
template<>
bool readParam (lua_State *L, int index)
 
- Static Protected Member Functions inherited from LuaHelper
static bool isNaN (lua_State *L, int idx)
 
template<typename T >
static T readParam (lua_State *L, int index)
 Read a value using a template type T from Lua State L and index. More...
 
template<typename T >
static T readParam (lua_State *L, int index, const T &default_value)
 Read a value using a template type T from Lua State L and index. More...
 

Member Function Documentation

◆ Initialize()

void ModApiMapgen::Initialize ( lua_State *  L,
int  top 
)
static

References API_FCT.

Referenced by ServerScripting::InitializeModApi().

+ Here is the caller graph for this function:

◆ l_clear_registered_biomes()

int ModApiMapgen::l_clear_registered_biomes ( lua_State *  L)
staticprivate

References BiomeManager::clear(), Server::getEmergeManager(), ModApiBase::getServer(), EmergeManager::getWritableBiomeManager(), and NO_MAP_LOCK_REQUIRED.

+ Here is the call graph for this function:

◆ l_clear_registered_decorations()

int ModApiMapgen::l_clear_registered_decorations ( lua_State *  L)
staticprivate

References ObjDefManager::clear(), Server::getEmergeManager(), ModApiBase::getServer(), EmergeManager::getWritableDecorationManager(), and NO_MAP_LOCK_REQUIRED.

+ Here is the call graph for this function:

◆ l_clear_registered_ores()

int ModApiMapgen::l_clear_registered_ores ( lua_State *  L)
staticprivate

References OreManager::clear(), Server::getEmergeManager(), ModApiBase::getServer(), EmergeManager::getWritableOreManager(), and NO_MAP_LOCK_REQUIRED.

+ Here is the call graph for this function:

◆ l_clear_registered_schematics()

int ModApiMapgen::l_clear_registered_schematics ( lua_State *  L)
staticprivate

References SchematicManager::clear(), Server::getEmergeManager(), ModApiBase::getServer(), EmergeManager::getWritableSchematicManager(), and NO_MAP_LOCK_REQUIRED.

+ Here is the call graph for this function:

◆ l_create_schematic()

int ModApiMapgen::l_create_schematic ( lua_State *  L)
staticprivate

◆ l_generate_decorations()

int ModApiMapgen::l_generate_decorations ( lua_State *  L)
staticprivate

◆ l_generate_ores()

int ModApiMapgen::l_generate_ores ( lua_State *  L)
staticprivate

◆ l_get_biome_data()

int ModApiMapgen::l_get_biome_data ( lua_State *  L)
staticprivate

◆ l_get_biome_id()

int ModApiMapgen::l_get_biome_id ( lua_State *  L)
staticprivate

References EmergeManager::getBiomeManager(), ObjDefManager::getByName(), Server::getEmergeManager(), ModApiBase::getServer(), ObjDef::index, NO_MAP_LOCK_REQUIRED, and OBJDEF_INVALID_INDEX.

+ Here is the call graph for this function:

◆ l_get_biome_name()

int ModApiMapgen::l_get_biome_name ( lua_State *  L)
staticprivate

References EmergeManager::getBiomeManager(), Server::getEmergeManager(), ObjDefManager::getRaw(), ModApiBase::getServer(), ObjDef::name, and NO_MAP_LOCK_REQUIRED.

+ Here is the call graph for this function:

◆ l_get_decoration_id()

int ModApiMapgen::l_get_decoration_id ( lua_State *  L)
staticprivate

References ObjDefManager::getByName(), EmergeManager::getDecorationManager(), Server::getEmergeManager(), ModApiBase::getServer(), ObjDef::index, and NO_MAP_LOCK_REQUIRED.

+ Here is the call graph for this function:

◆ l_get_gen_notify()

int ModApiMapgen::l_get_gen_notify ( lua_State *  L)
staticprivate

References flagdesc_gennotify, EmergeManager::gen_notify_on, EmergeManager::gen_notify_on_deco_ids, Server::getEmergeManager(), ModApiBase::getServer(), NO_MAP_LOCK_REQUIRED, and push_flags_string().

+ Here is the call graph for this function:

◆ l_get_heat()

int ModApiMapgen::l_get_heat ( lua_State *  L)
staticprivate

References EmergeManager::getBiomeManager(), Server::getEmergeManager(), BiomeManager::getHeatAtPosOriginal(), MapSettingsManager::getMapSetting(), MapSettingsManager::getMapSettingNoiseParams(), ModApiBase::getServer(), EmergeManager::map_settings_mgr, NO_MAP_LOCK_REQUIRED, read_v3s16(), and seed.

+ Here is the call graph for this function:

◆ l_get_humidity()

int ModApiMapgen::l_get_humidity ( lua_State *  L)
staticprivate

◆ l_get_mapgen_object()

◆ l_get_mapgen_params()

int ModApiMapgen::l_get_mapgen_params ( lua_State *  L)
staticprivate

References Server::getEmergeManager(), MapSettingsManager::getMapSetting(), ModApiBase::getServer(), log_deprecated(), EmergeManager::map_settings_mgr, NO_MAP_LOCK_REQUIRED, seed, and stoi.

+ Here is the call graph for this function:

◆ l_get_mapgen_setting()

int ModApiMapgen::l_get_mapgen_setting ( lua_State *  L)
staticprivate

References Server::getEmergeManager(), MapSettingsManager::getMapSetting(), ModApiBase::getServer(), EmergeManager::map_settings_mgr, and NO_MAP_LOCK_REQUIRED.

+ Here is the call graph for this function:

◆ l_get_mapgen_setting_noiseparams()

int ModApiMapgen::l_get_mapgen_setting_noiseparams ( lua_State *  L)
staticprivate

References Server::getEmergeManager(), MapSettingsManager::getMapSettingNoiseParams(), ModApiBase::getServer(), EmergeManager::map_settings_mgr, NO_MAP_LOCK_REQUIRED, and push_noiseparams().

+ Here is the call graph for this function:

◆ l_get_noiseparams()

int ModApiMapgen::l_get_noiseparams ( lua_State *  L)
staticprivate

References g_settings, Settings::getNoiseParams(), NO_MAP_LOCK_REQUIRED, and push_noiseparams().

+ Here is the call graph for this function:

◆ l_get_spawn_level()

int ModApiMapgen::l_get_spawn_level ( lua_State *  L)
staticprivate

References Server::getEmergeManager(), ModApiBase::getServer(), EmergeManager::getSpawnLevelAtPoint(), MAX_MAP_GENERATION_LIMIT, and NO_MAP_LOCK_REQUIRED.

+ Here is the call graph for this function:

◆ l_place_schematic()

int ModApiMapgen::l_place_schematic ( lua_State *  L)
staticprivate

References check_v3s16(), errorstream, es_Rotation, flagdesc_deco, GET_ENV_PTR, get_or_load_schematic(), Server::getEmergeManager(), ModApiBase::getServer(), MAP_LOCK_REQUIRED, p(), Schematic::placeOnMap(), read_flags(), read_schematic_replacements(), ROTATE_0, EmergeManager::schemmgr, and string_to_enum().

+ Here is the call graph for this function:

◆ l_place_schematic_on_vmanip()

int ModApiMapgen::l_place_schematic_on_vmanip ( lua_State *  L)
staticprivate

◆ l_read_schematic()

int ModApiMapgen::l_read_schematic ( lua_State *  L)
staticprivate

◆ l_register_biome()

int ModApiMapgen::l_register_biome ( lua_State *  L)
staticprivate

References ObjDefManager::add(), Server::getEmergeManager(), Server::getNodeDefManager(), ModApiBase::getServer(), EmergeManager::getWritableBiomeManager(), NO_MAP_LOCK_REQUIRED, OBJDEF_INVALID_HANDLE, and read_biome_def().

+ Here is the call graph for this function:

◆ l_register_decoration()

◆ l_register_ore()

◆ l_register_schematic()

int ModApiMapgen::l_register_schematic ( lua_State *  L)
staticprivate

References ObjDefManager::add(), Server::getEmergeManager(), ObjDefManager::getNodeDef(), ModApiBase::getServer(), EmergeManager::getWritableSchematicManager(), load_schematic(), NO_MAP_LOCK_REQUIRED, OBJDEF_INVALID_HANDLE, and read_schematic_replacements().

+ Here is the call graph for this function:

◆ l_serialize_schematic()

int ModApiMapgen::l_serialize_schematic ( lua_State *  L)
staticprivate

◆ l_set_gen_notify()

int ModApiMapgen::l_set_gen_notify ( lua_State *  L)
staticprivate

References flagdesc_gennotify, EmergeManager::gen_notify_on, EmergeManager::gen_notify_on_deco_ids, Server::getEmergeManager(), ModApiBase::getServer(), NO_MAP_LOCK_REQUIRED, and read_flags().

+ Here is the call graph for this function:

◆ l_set_mapgen_params()

int ModApiMapgen::l_set_mapgen_params ( lua_State *  L)
staticprivate

References Server::getEmergeManager(), ModApiBase::getServer(), log_deprecated(), EmergeManager::map_settings_mgr, NO_MAP_LOCK_REQUIRED, and MapSettingsManager::setMapSetting().

+ Here is the call graph for this function:

◆ l_set_mapgen_setting()

int ModApiMapgen::l_set_mapgen_setting ( lua_State *  L)
staticprivate

References errorstream, Server::getEmergeManager(), ModApiBase::getServer(), EmergeManager::map_settings_mgr, NO_MAP_LOCK_REQUIRED, and MapSettingsManager::setMapSetting().

+ Here is the call graph for this function:

◆ l_set_mapgen_setting_noiseparams()

int ModApiMapgen::l_set_mapgen_setting_noiseparams ( lua_State *  L)
staticprivate

References errorstream, Server::getEmergeManager(), ModApiBase::getServer(), EmergeManager::map_settings_mgr, NO_MAP_LOCK_REQUIRED, read_noiseparams(), and MapSettingsManager::setMapSettingNoiseParams().

+ Here is the call graph for this function:

◆ l_set_noiseparams()

int ModApiMapgen::l_set_noiseparams ( lua_State *  L)
staticprivate

References errorstream, Settings::getLayer(), NO_MAP_LOCK_REQUIRED, read_noiseparams(), Settings::setNoiseParams(), SL_DEFAULTS, and SL_GLOBAL.

+ Here is the call graph for this function:

Member Data Documentation

◆ es_BiomeTerrainType

struct EnumString ModApiMapgen::es_BiomeTerrainType[]
static

Referenced by read_biome_def().

◆ es_DecorationType

struct EnumString ModApiMapgen::es_DecorationType[]
static

Referenced by l_register_decoration().

◆ es_MapgenObject

struct EnumString ModApiMapgen::es_MapgenObject[]
static

Referenced by l_get_mapgen_object().

◆ es_NodeResolveMethod

struct EnumString ModApiMapgen::es_NodeResolveMethod[]
static

◆ es_OreType

struct EnumString ModApiMapgen::es_OreType[]
static

Referenced by l_register_ore().

◆ es_Rotation

struct EnumString ModApiMapgen::es_Rotation[]
static

◆ es_SchematicFormatType

struct EnumString ModApiMapgen::es_SchematicFormatType[]
static

Referenced by l_serialize_schematic().


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