#include <cstddef>
#include <string>
#include "scripting/lua_common.hpp"
#include "map/location.hpp"
#include "terrain/translation.hpp"
#include "terrain/type_data.hpp"
Go to the source code of this file.
Classes | |
class | mapgen_gamemap |
Namespaces | |
lua_terrainmap | |
Functions | |
bool | luaW_isslocs (lua_State *L, int index) |
mapgen_gamemap * | luaW_toslocs (lua_State *L, int index) |
mapgen_gamemap & | luaW_check_slocs (lua_State *L, int index) |
void | lua_slocs_setmetatable (lua_State *L) |
void | luaW_pushslocs (lua_State *L, int index) |
index the index of the map object. More... | |
int | impl_slocs_get (lua_State *L) |
int | impl_slocs_set (lua_State *L) |
bool | luaW_isterrainmap (lua_State *L, int index) |
mapgen_gamemap * | luaW_toterrainmap (lua_State *L, int index) |
mapgen_gamemap & | luaW_checkterrainmap (lua_State *L, int index) |
void | lua_terrainmap_setmetatable (lua_State *L) |
mapgen_gamemap * | luaW_pushmap (lua_State *L, mapgen_gamemap &&u) |
int | intf_terainmap_create (lua_State *L) |
Create a map. More... | |
std::string | lua_terrainmap::register_metatables (lua_State *L) |
int impl_slocs_get | ( | lua_State * | L | ) |
Definition at line 89 of file lua_terrainmap.cpp.
References lua_pushnil(), luaL_checkstring, luaW_check_slocs(), luaW_pushlocation(), and mapgen_gamemap::special_location().
Referenced by lua_terrainmap::register_metatables().
int impl_slocs_set | ( | lua_State * | L | ) |
Definition at line 109 of file lua_terrainmap.cpp.
References luaL_checkstring, luaW_check_slocs(), luaW_checklocation(), and mapgen_gamemap::set_special_location().
Referenced by lua_terrainmap::register_metatables().
int intf_terainmap_create | ( | lua_State * | L | ) |
Create a map.
Definition at line 237 of file lua_terrainmap.cpp.
References mapgen_gamemap::h(), lua_isnumber(), lua_tonumber, luaL_checkstring, luaW_pushmap(), t_translation::read_terrain_code(), and mapgen_gamemap::w().
Referenced by mapgen_lua_kernel::mapgen_lua_kernel().
void lua_slocs_setmetatable | ( | lua_State * | L | ) |
Definition at line 66 of file lua_terrainmap.cpp.
References luaL_setmetatable(), and maplocationKey.
void lua_terrainmap_setmetatable | ( | lua_State * | L | ) |
Definition at line 216 of file lua_terrainmap.cpp.
References luaL_setmetatable(), and terrinmapKey.
Referenced by luaW_pushmap().
mapgen_gamemap& luaW_check_slocs | ( | lua_State * | L, |
int | index | ||
) |
Definition at line 57 of file lua_terrainmap.cpp.
References luaW_toslocs(), and luaW_type_error().
Referenced by impl_slocs_get(), and impl_slocs_set().
mapgen_gamemap& luaW_checkterrainmap | ( | lua_State * | L, |
int | index | ||
) |
Definition at line 207 of file lua_terrainmap.cpp.
References lua_touserdata(), luaW_isterrainmap(), and luaW_type_error().
Referenced by impl_terainmap_get(), impl_terainmap_set(), intf_get_terrain(), intf_mg_get_locations(), intf_mg_get_tiles_radius(), mapgen_gamemap::intf_mg_terrain_mask(), and intf_set_terrain().
bool luaW_isslocs | ( | lua_State * | L, |
int | index | ||
) |
Definition at line 39 of file lua_terrainmap.cpp.
References luaL_testudata(), and maplocationKey.
bool luaW_isterrainmap | ( | lua_State * | L, |
int | index | ||
) |
Definition at line 193 of file lua_terrainmap.cpp.
References luaL_testudata(), and terrinmapKey.
Referenced by luaW_checkterrainmap(), and luaW_toterrainmap().
mapgen_gamemap* luaW_pushmap | ( | lua_State * | L, |
mapgen_gamemap && | u | ||
) |
void luaW_pushslocs | ( | lua_State * | L, |
int | index | ||
) |
index the index of the map object.
Definition at line 73 of file lua_terrainmap.cpp.
References lua_createtable(), lua_pushvalue(), lua_rawseti(), lua_remove, luaL_setmetatable(), and maplocationKey.
Referenced by impl_terainmap_get().
mapgen_gamemap* luaW_toslocs | ( | lua_State * | L, |
int | index | ||
) |
Definition at line 45 of file lua_terrainmap.cpp.
References lua_istable, lua_pop, lua_rawgeti(), and luaW_toterrainmap().
Referenced by luaW_check_slocs().
mapgen_gamemap* luaW_toterrainmap | ( | lua_State * | L, |
int | index | ||
) |
Definition at line 199 of file lua_terrainmap.cpp.
References lua_touserdata(), and luaW_isterrainmap().
Referenced by luaW_toslocs().