#include "scripting/mapgen_lua_kernel.hpp"#include "config.hpp"#include "game_errors.hpp"#include "log.hpp"#include "scripting/lua_api.hpp"#include "scripting/lua_common.hpp"#include "scripting/lua_rng.hpp"#include "scripting/lua_pathfind_cost_calculator.hpp"#include <ostream>#include <string>#include "utils/functional.hpp"#include "lua/lauxlib.h"#include "lua/lua.h"#include "scripting/push_check.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) |
Functions | |
| static int | intf_random (lua_State *L) |
| Returns a random numer, same interface as math.random. 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 36 of file mapgen_lua_kernel.cpp.
| #define ERR_NG LOG_STREAM(err, log_mapgen) |
Definition at line 34 of file mapgen_lua_kernel.cpp.
| #define LOG_NG LOG_STREAM(info, log_mapgen) |
Definition at line 35 of file mapgen_lua_kernel.cpp.
Finds a path between two locations.
Definition at line 83 of file mapgen_lua_kernel.cpp.
References pathfind::a_star_search(), i, lua_createtable(), lua_isboolean, lua_isfunction, lua_pushfstring(), lua_pushinteger(), lua_rawseti(), LUA_TFUNCTION, lua_typename(), luaL_argerror(), luaL_checkinteger(), luaL_typename, luaW_toboolean(), pathfind::plain_route::move_cost, game_logic::msg(), pathfind::plain_route::steps, map_location::x, and map_location::y.
Referenced by mapgen_lua_kernel::mapgen_lua_kernel().
Returns a random numer, same interface as math.random.
Definition at line 45 of file mapgen_lua_kernel.cpp.
References lua_isnoneornil, lua_isnumber(), lua_push(), and luaL_argerror().
Referenced by mapgen_lua_kernel::mapgen_lua_kernel().
|
static |
1.8.8