lua/wrappers/game/lua_game.cpp
/**
	 * Returns a map from the map pool. If the map is not present
	 * it will attempt to load the map from file under the data directory.
	 * <p><code>data/maps/{map_name}.lua</code></p>
	 * @param string map_name The name of the map to load.
	 * @returns am.map The found/loaded map, nil if it could not be found nor loaded.
	 */
Returns a map from the map pool. If the map is not present
it will attempt to load the map from file under the data directory.
data/maps/{map_name}.lua
@param string map_name The name of the map to load.
@returns am.map The found/loaded map, nil if it could not be found nor loaded.
Returns a map from the map pool . If the map is not present it will attempt to load the map from file under the data directory . data / maps / { map_name } . lua @param string map_name The name of the map to load . @returns am . map The found / loaded map nil if it could not be found nor loaded .
int Game_map(lua_State *lua)
	{
		Game *game = castUData<Game>(lua, 1);
		if (game)
		{
			if (lua_isstr(lua, 2))
			{
				Map *map = game->getMapLua(lua_tostring(lua, 2));
				if (map)
				{
					wrapRefObject<Map>(lua, map);
					return 1;
				}
				lua_pushnil(lua);
				return 1;
			}
			return LuaState::expectedArgs(lua, "map", "string map_name");
		}
		return LuaState::expectedContext(lua, "map", "am.game");
	}
int Game_map ( lua_State * lua ) { Game * game = castUData < Game > ( lua , 1 ) ; if ( game ) { if ( lua_isstr ( lua , 2 ) ) { Map * map = game -> getMapLua ( lua_tostring ( lua , 2 ) ) ; if ( map ) { wrapRefObject < Map > ( lua , map ) ; return 1 ; } lua_pushnil ( lua ) ; return 1 ; } return LuaState :: expectedArgs ( lua , " " , " " ) ; } return LuaState :: expectedContext ( lua , " " , " " ) ; }
Returns a map from the map pool.
Returns a map from the map pool .