#include <l_mapgen.h>
Static Public Member Functions | |
static void | Initialize (lua_State *L, int top) |
static void | InitializeEmerge (lua_State *L, int top) |
Static Public Member Functions inherited from ModApiBase | |
static ScriptApiBase * | getScriptApiBase (lua_State *L) |
static Server * | getServer (lua_State *L) |
static ServerInventoryManager * | getServerInventoryMgr (lua_State *L) |
static EmergeThread * | getEmergeThread (lua_State *L) |
static IGameDef * | getGameDef (lua_State *L) |
static Environment * | getEnv (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 void | registerClass (lua_State *L, const char *name, const luaL_Reg *methods, const luaL_Reg *metamethods) |
template<typename T > | |
static T * | checkObject (lua_State *L, int narg) |
static int | l_deprecated_function (lua_State *L, const char *good, const char *bad, lua_CFunction func) |
A wrapper for deprecated functions. | |
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_edges (lua_State *L) |
static int | l_get_seed (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_save_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) |
static int | update_liquids (lua_State *L, MMVManip *vm) |
static int | calc_lighting (lua_State *L, MMVManip *vm, v3s16 pmin, v3s16 pmax, bool propagate_shadow) |
static int | set_lighting (lua_State *L, MMVManip *vm, v3s16 pmin, v3s16 pmax, u8 light) |
static const EmergeManager * | getEmergeManager (lua_State *L) |
static const BiomeGen * | getBiomeGen (lua_State *L) |
static Mapgen * | getMapgen (lua_State *L) |
Friends | |
class | LuaVoxelManip |
Additional Inherited Members | |
Protected Member Functions inherited from LuaHelper | |
template<> | |
bool | readParam (lua_State *L, int index) |
template<> | |
s16 | readParam (lua_State *L, int index) |
template<> | |
int | readParam (lua_State *L, int index) |
template<> | |
float | readParam (lua_State *L, int index) |
template<> | |
v2s16 | readParam (lua_State *L, int index) |
template<> | |
v2f | readParam (lua_State *L, int index) |
template<> | |
v3f | readParam (lua_State *L, int index) |
template<> | |
std::string_view | readParam (lua_State *L, int index) |
template<> | |
std::string | readParam (lua_State *L, int index) |
template<> | |
std::string_view | readParam (lua_State *L, int index) |
Read a string from Lua state L at index without copying it. | |
Static Protected Member Functions inherited from LuaHelper | |
template<typename T > | |
static T | readParam (lua_State *L, int index) |
Read a value using a template type T from Lua state L at index. | |
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 at index. | |
|
staticprivate |
References Mapgen::calcLighting(), VoxelArea::contains(), getEmergeManager(), ModApiBase::getGameDef(), VoxelManipulator::m_area, VoxelArea::MaxEdge, VoxelArea::MinEdge, IGameDef::ndef(), Mapgen::ndef, Mapgen::vm, and Mapgen::water_level.
Referenced by LuaVoxelManip::l_calc_lighting().
|
staticprivate |
References EmergeManager::getBiomeGen(), Server::getEmergeManager(), ModApiBase::getEmergeThread(), and ModApiBase::getServer().
Referenced by l_get_biome_data(), l_get_heat(), and l_get_humidity().
|
staticprivate |
References Server::getEmergeManager(), ModApiBase::getEmergeThread(), and ModApiBase::getServer().
Referenced by calc_lighting(), l_generate_decorations(), l_generate_ores(), l_get_biome_id(), l_get_biome_name(), l_get_decoration_id(), l_get_gen_notify(), l_get_mapgen_edges(), l_get_mapgen_params(), l_get_mapgen_setting(), l_get_mapgen_setting_noiseparams(), l_get_seed(), l_read_schematic(), and l_serialize_schematic().
|
staticprivate |
References EmergeManager::getCurrentMapgen(), Server::getEmergeManager(), ModApiBase::getEmergeThread(), and ModApiBase::getServer().
Referenced by l_generate_decorations(), l_generate_ores(), l_get_mapgen_object(), and l_place_schematic_on_vmanip().
|
static |
References API_FCT, and get_mapgen_edges().
Referenced by ServerScripting::InitializeModApi().
|
static |
References API_FCT, and get_mapgen_edges().
Referenced by EmergeScripting::InitializeModApi().
|
staticprivate |
References BiomeManager::clear(), Server::getEmergeManager(), ModApiBase::getServer(), EmergeManager::getWritableBiomeManager(), and NO_MAP_LOCK_REQUIRED.
|
staticprivate |
References ObjDefManager::clear(), Server::getEmergeManager(), ModApiBase::getServer(), EmergeManager::getWritableDecorationManager(), and NO_MAP_LOCK_REQUIRED.
|
staticprivate |
References OreManager::clear(), Server::getEmergeManager(), ModApiBase::getServer(), EmergeManager::getWritableOreManager(), and NO_MAP_LOCK_REQUIRED.
|
staticprivate |
References SchematicManager::clear(), Server::getEmergeManager(), ModApiBase::getServer(), EmergeManager::getWritableSchematicManager(), and NO_MAP_LOCK_REQUIRED.
|
staticprivate |
References actionstream, Schematic::applyProbabilities(), CHECK_SECURE_PATH, check_v3s16(), errorstream, ModApiBase::getEnv(), getintfield_default(), Environment::getMap(), Server::getNodeDefManager(), Schematic::getSchematicFromMap(), ModApiBase::getServer(), MAP_LOCK_REQUIRED, MTSCHEM_PROB_ALWAYS, Schematic::saveSchematicToFile(), and sortBoxVerticies().
|
staticprivate |
References check_v3s16(), ModApiBase::checkObject(), Mapgen::getBlockSeed(), getEmergeManager(), getMapgen(), VoxelManipulator::m_area, MAP_BLOCKSIZE, VoxelArea::MaxEdge, VoxelArea::MinEdge, Mapgen::ndef, NO_MAP_LOCK_REQUIRED, DecorationManager::placeAllDecos(), Mapgen::seed, sortBoxVerticies(), and Mapgen::vm.
|
staticprivate |
References check_v3s16(), ModApiBase::checkObject(), Mapgen::getBlockSeed(), getEmergeManager(), getMapgen(), VoxelManipulator::m_area, MAP_BLOCKSIZE, VoxelArea::MaxEdge, VoxelArea::MinEdge, Mapgen::ndef, NO_MAP_LOCK_REQUIRED, OreManager::placeAllOres(), Mapgen::seed, sortBoxVerticies(), and Mapgen::vm.
|
staticprivate |
References BIOMEGEN_ORIGINAL, BiomeGen::calcBiomeAtPoint(), getBiomeGen(), BiomeGen::getType(), ObjDef::index, NO_MAP_LOCK_REQUIRED, OBJDEF_INVALID_INDEX, and read_v3s16().
|
staticprivate |
References EmergeManager::getBiomeManager(), ObjDefManager::getByName(), getEmergeManager(), ObjDef::index, NO_MAP_LOCK_REQUIRED, and OBJDEF_INVALID_INDEX.
|
staticprivate |
References EmergeManager::getBiomeManager(), getEmergeManager(), ObjDefManager::getRaw(), ObjDef::name, and NO_MAP_LOCK_REQUIRED.
|
staticprivate |
References ObjDefManager::getByName(), EmergeManager::getDecorationManager(), getEmergeManager(), ObjDef::index, and NO_MAP_LOCK_REQUIRED.
|
staticprivate |
References flagdesc_gennotify, getEmergeManager(), NO_MAP_LOCK_REQUIRED, and push_flags_string().
|
staticprivate |
References BIOMEGEN_ORIGINAL, getBiomeGen(), BiomeGen::getType(), NO_MAP_LOCK_REQUIRED, and read_v3s16().
|
staticprivate |
References BIOMEGEN_ORIGINAL, getBiomeGen(), BiomeGen::getType(), NO_MAP_LOCK_REQUIRED, and read_v3s16().
|
staticprivate |
References get_mapgen_edges(), getEmergeManager(), MapSettingsManager::getMapSetting(), EmergeManager::map_settings_mgr, MAX_MAP_GENERATION_LIMIT, NO_MAP_LOCK_REQUIRED, push_v3s16(), and stoi.
|
staticprivate |
References Mapgen::biomegen, BIOMEGEN_ORIGINAL, BiomeGen::biomemap, LuaVoxelManip::create(), Mapgen::csize, es_MapgenObject, Mapgen::gennotify, GenerateNotifier::getCustomData(), GenerateNotifier::getEvents(), getMapgen(), BiomeGen::getType(), BiomeGenOriginal::heatmap, Mapgen::heightmap, BiomeGenOriginal::humidmap, VoxelManipulator::m_area, VoxelArea::MaxEdge, MGOBJ_BIOMEMAP, MGOBJ_GENNOTIFY, MGOBJ_HEATMAP, MGOBJ_HEIGHTMAP, MGOBJ_HUMIDMAP, MGOBJ_VMANIP, VoxelArea::MinEdge, NO_MAP_LOCK_REQUIRED, push_v3s16(), string_to_enum(), and Mapgen::vm.
|
staticprivate |
References from_string(), getEmergeManager(), MapSettingsManager::getMapSetting(), log_deprecated(), EmergeManager::map_settings_mgr, NO_MAP_LOCK_REQUIRED, and stoi.
|
staticprivate |
References getEmergeManager(), MapSettingsManager::getMapSetting(), EmergeManager::map_settings_mgr, and NO_MAP_LOCK_REQUIRED.
|
staticprivate |
References getEmergeManager(), MapSettingsManager::getMapSettingNoiseParams(), EmergeManager::map_settings_mgr, NO_MAP_LOCK_REQUIRED, and push_noiseparams().
|
staticprivate |
References g_settings, Settings::getNoiseParams(), NO_MAP_LOCK_REQUIRED, and push_noiseparams().
|
staticprivate |
|
staticprivate |
References Server::getEmergeManager(), ModApiBase::getServer(), EmergeManager::getSpawnLevelAtPoint(), MAX_MAP_GENERATION_LIMIT, and NO_MAP_LOCK_REQUIRED.
|
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(), LuaHelper::readParam(), ROTATE_0, EmergeManager::schemmgr, and string_to_enum().
|
staticprivate |
References check_v3s16(), ModApiBase::checkObject(), errorstream, es_Rotation, flagdesc_deco, get_or_load_schematic(), Server::getEmergeManager(), getMapgen(), ModApiBase::getServer(), NO_MAP_LOCK_REQUIRED, p(), Schematic::placeOnVManip(), read_flags(), read_schematic_replacements(), LuaHelper::readParam(), ROTATE_0, EmergeManager::schemmgr, and string_to_enum().
|
staticprivate |
References errorstream, NodeDefManager::get(), get_objdef(), MapNode::getContent(), getEmergeManager(), ModApiBase::getGameDef(), EmergeManager::getSchematicManager(), getstringfield_default(), NodeResolver::isResolveDone(), load_schematic(), NodeResolver::m_nodenames, MTSCHEM_FORCE_PLACE, MTSCHEM_PROB_ALWAYS, MTSCHEM_PROB_MASK, ContentFeatures::name, IGameDef::ndef(), NO_MAP_LOCK_REQUIRED, MapNode::param1, MapNode::param2, push_v3s16(), Schematic::schemdata, Schematic::size, and Schematic::slice_probs.
|
staticprivate |
References ObjDefManager::add(), Server::getEmergeManager(), Server::getNodeDefManager(), ModApiBase::getServer(), EmergeManager::getWritableBiomeManager(), NO_MAP_LOCK_REQUIRED, OBJDEF_INVALID_HANDLE, and read_biome_def().
|
staticprivate |
References ObjDefManager::add(), Decoration::biomes, Decoration::check_offset, DecorationManager::create(), DECO_LSYSTEM, DECO_SCHEMATIC, DECO_SIMPLE, DECO_USE_NOISE, errorstream, es_DecorationType, Decoration::fill_ratio, flagdesc_deco, Decoration::flags, get_biome_list(), Server::getEmergeManager(), getenumfield(), getflagsfield(), getfloatfield_default(), getintfield_default(), Server::getNodeDefManager(), ModApiBase::getServer(), getstringfield_default(), getstringlistfield(), EmergeManager::getWritableBiomeManager(), EmergeManager::getWritableDecorationManager(), EmergeManager::getWritableSchematicManager(), infostream, NodeResolver::m_nnlistsizes, NodeResolver::m_nodenames, ObjDef::name, NO_MAP_LOCK_REQUIRED, Decoration::np, Decoration::nspawnby, OBJDEF_INVALID_HANDLE, NodeDefManager::pendNodeResolve(), Decoration::place_offset_y, read_deco_lsystem(), read_deco_schematic(), read_deco_simple(), read_noiseparams(), Decoration::sidelen, Decoration::y_max, and Decoration::y_min.
|
staticprivate |
References ObjDefManager::add(), OreSheet::column_height_max, OreSheet::column_height_min, OreSheet::column_midpoint_factor, OreManager::create(), errorstream, es_OreType, flagdesc_ore, get_biome_list(), Server::getEmergeManager(), getflagsfield(), getfloatfield(), getfloatfield_default(), getintfield(), getintfield_default(), Server::getNodeDefManager(), ModApiBase::getServer(), getstringfield_default(), getstringlistfield(), EmergeManager::getWritableBiomeManager(), EmergeManager::getWritableOreManager(), infostream, log_deprecated(), NO_MAP_LOCK_REQUIRED, OrePuff::np_puff_bottom, OrePuff::np_puff_top, OreStratum::np_stratum_thickness, OBJDEF_INVALID_HANDLE, ORE_PUFF, ORE_SHEET, ORE_STRATUM, ORE_VEIN, OREFLAG_USE_NOISE, OREFLAG_USE_NOISE2, NodeDefManager::pendNodeResolve(), OreVein::random_factor, read_noiseparams(), OreStratum::stratum_thickness, string_to_enum(), and warn_if_field_exists().
|
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().
|
staticprivate |
References ModApiBase::getEmergeThread(), and LuaHelper::readParam().
|
staticprivate |
References errorstream, es_SchematicFormatType, get_objdef(), getboolfield_default(), getEmergeManager(), getintfield_default(), EmergeManager::getSchematicManager(), load_schematic(), NO_MAP_LOCK_REQUIRED, LuaHelper::readParam(), SCHEM_FMT_LUA, SCHEM_FMT_MTS, Schematic::serializeToLua(), Schematic::serializeToMts(), and string_to_enum().
|
staticprivate |
References flagdesc_gennotify, EmergeManager::gen_notify_on, EmergeManager::gen_notify_on_custom, EmergeManager::gen_notify_on_deco_ids, GENNOTIFY_CUSTOM, GENNOTIFY_DECORATION, Server::getEmergeManager(), ModApiBase::getServer(), NO_MAP_LOCK_REQUIRED, read_flags(), and LuaHelper::readParam().
|
staticprivate |
References Server::getEmergeManager(), ModApiBase::getServer(), log_deprecated(), EmergeManager::map_settings_mgr, NO_MAP_LOCK_REQUIRED, LuaHelper::readParam(), and MapSettingsManager::setMapSetting().
|
staticprivate |
References errorstream, Server::getEmergeManager(), ModApiBase::getServer(), EmergeManager::map_settings_mgr, NO_MAP_LOCK_REQUIRED, LuaHelper::readParam(), and MapSettingsManager::setMapSetting().
|
staticprivate |
References errorstream, Server::getEmergeManager(), ModApiBase::getServer(), EmergeManager::map_settings_mgr, NO_MAP_LOCK_REQUIRED, read_noiseparams(), LuaHelper::readParam(), and MapSettingsManager::setMapSettingNoiseParams().
|
staticprivate |
References errorstream, Settings::getLayer(), NO_MAP_LOCK_REQUIRED, read_noiseparams(), LuaHelper::readParam(), SL_DEFAULTS, and SL_GLOBAL.
|
staticprivate |
References VoxelArea::contains(), VoxelManipulator::m_area, Mapgen::setLighting(), and Mapgen::vm.
Referenced by LuaVoxelManip::l_set_lighting().
|
staticprivate |
References GET_ENV_PTR, ModApiBase::getEmergeThread(), ModApiBase::getGameDef(), VoxelManipulator::m_area, VoxelArea::MaxEdge, VoxelArea::MinEdge, IGameDef::ndef(), Mapgen::ndef, Mapgen::updateLiquid(), and Mapgen::vm.
Referenced by LuaVoxelManip::l_update_liquids().
|
friend |
|
static |
Referenced by read_biome_def().
|
static |
Referenced by l_register_decoration().
|
static |
Referenced by l_get_mapgen_object().
|
static |
|
static |
Referenced by l_register_ore().
|
static |
Referenced by l_place_schematic(), l_place_schematic_on_vmanip(), and read_deco_schematic().
|
static |
Referenced by l_serialize_schematic().