#include "scripting/mapgen_lua_kernel.hpp"
#include "config.hpp"
#include "game_errors.hpp"
#include "log.hpp"
#include "scripting/lua_common.hpp"
#include "scripting/lua_pathfind_cost_calculator.hpp"
#include "scripting/lua_terrainfilter.hpp"
#include "scripting/lua_terrainmap.hpp"
#include "deprecation.hpp"
#include "game_version.hpp"
#include <string>
#include <functional>
#include "scripting/push_check.hpp"
#include "generators/default_map_generator_job.hpp"
Go to the source code of this file.
Macros | |
#define | ERR_NG LOG_STREAM(err, log_mapgen) |
#define | LOG_NG LOG_STREAM(info, log_mapgen) |
#define | DBG_NG LOG_STREAM(debug, log_mapgen) |
Typedefs | |
typedef int(mapgen_lua_kernel::* | member_callback) (lua_State *) |
Functions | |
template<member_callback method> | |
int | dispatch (lua_State *L) |
static int | intf_random (lua_State *L) |
Returns a random number, same interface as math.random. More... | |
static int | intf_default_generate (lua_State *L) |
calls the default mapgenerator. More... | |
static int | intf_default_generate_height_map (lua_State *L) |
calls the default mapgenerator. More... | |
static int | intf_find_path (lua_State *L) |
Finds a path between two locations. More... | |
Variables | |
static lg::log_domain | log_mapgen ("mapgen") |
#define DBG_NG LOG_STREAM(debug, log_mapgen) |
Definition at line 37 of file mapgen_lua_kernel.cpp.
#define ERR_NG LOG_STREAM(err, log_mapgen) |
Definition at line 35 of file mapgen_lua_kernel.cpp.
#define LOG_NG LOG_STREAM(info, log_mapgen) |
Definition at line 36 of file mapgen_lua_kernel.cpp.
typedef int(mapgen_lua_kernel::* member_callback) (lua_State *) |
Definition at line 42 of file mapgen_lua_kernel.cpp.
int dispatch | ( | lua_State * | L | ) |
Definition at line 45 of file mapgen_lua_kernel.cpp.
|
static |
calls the default mapgenerator.
Definition at line 83 of file mapgen_lua_kernel.cpp.
References generator_data::castle_size, default_map_generator_job::default_generate_map(), config::has_attribute(), generator_data::height, generator_data::hill_size, generator_data::island_off_center, generator_data::island_size, generator_data::iterations, generator_data::link_castles, lua_push(), luaW_checkconfig(), generator_data::max_lakes, generator_data::nplayers, generator_data::nvillages, generator_data::show_labels, and generator_data::width.
Referenced by mapgen_lua_kernel::mapgen_lua_kernel().
|
static |
calls the default mapgenerator.
Definition at line 121 of file mapgen_lua_kernel.cpp.
References deprecated_message(), default_map_generator_job::generate_height_map(), h, config::has_attribute(), i, luaW_checkconfig(), PREEMPTIVE, and utf8::size().
Referenced by mapgen_lua_kernel::mapgen_lua_kernel().
|
static |
Finds a path between two locations.
Definition at line 179 of file mapgen_lua_kernel.cpp.
References pathfind::a_star_search(), border, dst, i, luaW_checklocation(), luaW_tableget(), luaW_toboolean(), pathfind::plain_route::move_cost, wfl::msg(), src, and pathfind::plain_route::steps.
Referenced by mapgen_lua_kernel::mapgen_lua_kernel().
|
static |
Returns a random number, same interface as math.random.
Definition at line 52 of file mapgen_lua_kernel.cpp.
References lua_push().
Referenced by mapgen_lua_kernel::mapgen_lua_kernel().
|
static |