#include "lua_api/l_mapgen.h"
#include "lua_api/l_internal.h"
#include "lua_api/l_vmanip.h"
#include "common/c_converter.h"
#include "common/c_content.h"
#include "cpp_api/s_security.h"
#include "util/serialize.h"
#include "server.h"
#include "environment.h"
#include "emerge_internal.h"
#include "mapgen/mg_biome.h"
#include "mapgen/mg_ore.h"
#include "mapgen/mg_decoration.h"
#include "mapgen/mg_schematic.h"
#include "mapgen/mapgen_v5.h"
#include "mapgen/mapgen_v7.h"
#include "mapgen/treegen.h"
#include "filesys.h"
#include "settings.h"
#include "log.h"
Functions | |
ObjDef * | get_objdef (lua_State *L, int index, const ObjDefManager *objmgr) |
Biome * | get_or_load_biome (lua_State *L, int index, BiomeManager *biomemgr) |
Biome * | read_biome_def (lua_State *L, int index, const NodeDefManager *ndef) |
size_t | get_biome_list (lua_State *L, int index, BiomeManager *biomemgr, std::unordered_set< biome_t > *biome_id_list) |
Schematic * | get_or_load_schematic (lua_State *L, int index, SchematicManager *schemmgr, StringMap *replace_names) |
Schematic * | load_schematic (lua_State *L, int index, const NodeDefManager *ndef, StringMap *replace_names) |
Schematic * | load_schematic_from_def (lua_State *L, int index, const NodeDefManager *ndef, StringMap *replace_names) |
bool | read_schematic_def (lua_State *L, int index, Schematic *schem, std::vector< std::string > *names) |
bool | read_deco_simple (lua_State *L, DecoSimple *deco) |
bool | read_deco_schematic (lua_State *L, SchematicManager *schemmgr, DecoSchematic *deco) |
bool | read_deco_lsystem (lua_State *L, const NodeDefManager *ndef, DecoLSystem *deco) |
void | read_schematic_replacements (lua_State *L, int index, StringMap *replace_names) |
size_t get_biome_list | ( | lua_State * | L, |
int | index, | ||
BiomeManager * | biomemgr, | ||
std::unordered_set< biome_t > * | biome_id_list ) |
References get_or_load_biome(), ObjDef::index, and infostream.
Referenced by ModApiMapgen::l_register_decoration(), and ModApiMapgen::l_register_ore().
ObjDef * get_objdef | ( | lua_State * | L, |
int | index, | ||
const ObjDefManager * | objmgr ) |
References ObjDefManager::get(), and ObjDefManager::getByName().
Referenced by get_or_load_biome(), get_or_load_schematic(), ModApiMapgen::l_read_schematic(), and ModApiMapgen::l_serialize_schematic().
Biome * get_or_load_biome | ( | lua_State * | L, |
int | index, | ||
BiomeManager * | biomemgr ) |
References ObjDefManager::add(), get_objdef(), ObjDefManager::getNodeDef(), OBJDEF_INVALID_HANDLE, and read_biome_def().
Referenced by get_biome_list().
Schematic * get_or_load_schematic | ( | lua_State * | L, |
int | index, | ||
SchematicManager * | schemmgr, | ||
StringMap * | replace_names ) |
References ObjDefManager::add(), get_objdef(), ObjDefManager::getNodeDef(), load_schematic(), and OBJDEF_INVALID_HANDLE.
Referenced by ModApiMapgen::l_place_schematic(), ModApiMapgen::l_place_schematic_on_vmanip(), and read_deco_schematic().
Schematic * load_schematic | ( | lua_State * | L, |
int | index, | ||
const NodeDefManager * | ndef, | ||
StringMap * | replace_names ) |
References SchematicManager::create(), DIR_DELIM, ModApiBase::getCurrentModPath(), fs::IsPathAbsolute(), load_schematic_from_def(), Schematic::loadSchematicFromFile(), and SCHEMATIC_NORMAL.
Referenced by get_or_load_schematic(), ModApiMapgen::l_read_schematic(), ModApiMapgen::l_register_schematic(), and ModApiMapgen::l_serialize_schematic().
Schematic * load_schematic_from_def | ( | lua_State * | L, |
int | index, | ||
const NodeDefManager * | ndef, | ||
StringMap * | replace_names ) |
References SchematicManager::create(), NodeResolver::m_nnlistsizes, NodeResolver::m_nodenames, NodeDefManager::pendNodeResolve(), read_schematic_def(), and SCHEMATIC_NORMAL.
Referenced by load_schematic().
Biome * read_biome_def | ( | lua_State * | L, |
int | index, | ||
const NodeDefManager * | ndef ) |
References BIOMETYPE_NORMAL, BiomeManager::create(), Biome::depth_filler, Biome::depth_riverbed, Biome::depth_top, Biome::depth_water_top, ModApiMapgen::es_BiomeTerrainType, Biome::flags, getenumfield(), getfloatfield_default(), getintfield(), getintfield_default(), getstringfield_default(), getstringlistfield(), getv3s16field_default(), Biome::heat_point, Biome::humidity_point, NodeResolver::m_nnlistsizes, NodeResolver::m_nodenames, Biome::max_pos, Biome::min_pos, ObjDef::name, NodeDefManager::pendNodeResolve(), and Biome::vertical_blend.
Referenced by get_or_load_biome(), and ModApiMapgen::l_register_biome().
bool read_deco_lsystem | ( | lua_State * | L, |
const NodeDefManager * | ndef, | ||
DecoLSystem * | deco ) |
References read_tree_def(), and DecoLSystem::tree_def.
Referenced by ModApiMapgen::l_register_decoration().
bool read_deco_schematic | ( | lua_State * | L, |
SchematicManager * | schemmgr, | ||
DecoSchematic * | deco ) |
References ModApiMapgen::es_Rotation, get_or_load_schematic(), getenumfield(), read_schematic_replacements(), ROTATE_0, DecoSchematic::rotation, and DecoSchematic::schematic.
Referenced by ModApiMapgen::l_register_decoration().
bool read_deco_simple | ( | lua_State * | L, |
DecoSimple * | deco ) |
References DecoSimple::deco_height, DecoSimple::deco_height_max, DecoSimple::deco_param2, DecoSimple::deco_param2_max, errorstream, getintfield_default(), getstringlistfield(), NodeResolver::m_nnlistsizes, and NodeResolver::m_nodenames.
Referenced by ModApiMapgen::l_register_decoration().
bool read_schematic_def | ( | lua_State * | L, |
int | index, | ||
Schematic * | schem, | ||
std::vector< std::string > * | names ) |
References check_v3s16(), errorstream, getboolfield_default(), getintfield(), getintfield_default(), getstringfield(), MTSCHEM_FORCE_PLACE, MTSCHEM_PROB_ALWAYS, MTSCHEM_PROB_ALWAYS_OLD, Schematic::schemdata, Schematic::size, and Schematic::slice_probs.
Referenced by load_schematic_from_def().
void read_schematic_replacements | ( | lua_State * | L, |
int | index, | ||
StringMap * | replace_names ) |
Referenced by ModApiMapgen::l_place_schematic(), ModApiMapgen::l_place_schematic_on_vmanip(), ModApiMapgen::l_register_schematic(), and read_deco_schematic().