lua/wrappers/game/lua_map.cpp
/**
	 * Returns an array table of all the map regions in the map.
	 *
	 * @returns table An array of all the map regions.
	 */
Returns an array table of all the map regions in the map.
@returns table An array of all the map regions.
Returns an array table of all the map regions in the map . @returns table An array of all the map regions .
int Map_map_regions(lua_State *lua)
	{
		Map *map = castUData<Map>(lua, 1);
		if (map)
		{
			auto maps = map->getMapRegions();
			lua_createtable(lua, maps.size(), 0);
			for (size_t index = 0; index < maps.size(); index++)
			{
				lua_pushinteger(lua, index + 1);
				wrapRefObject<MapRegion>(lua, maps[index].get());
				lua_settable(lua, -3);
			}
			return 1;
		}
		return LuaState::expectedContext(lua, "map_regions", "am.map");
	}
int Map_map_regions ( lua_State * lua ) { Map * map = castUData < Map > ( lua , 1 ) ; if ( map ) { auto maps = map -> getMapRegions ( ) ; lua_createtable ( lua , maps . size ( ) , 0 ) ; for ( size_t index = 0 ; index < maps . size ( ) ; index ++ ) { lua_pushinteger ( lua , index + 1 ) ; wrapRefObject < MapRegion > ( lua , maps [ index ] . get ( ) ) ; lua_settable ( lua , -3 ) ; } return 1 ; } return LuaState :: expectedContext ( lua , " " , " " ) ; }
Returns an array table of all the map regions in the map.
Returns an array table of all the map regions in the map .