lua/wrappers/game/lua_game.cpp
/**
	 * Manually adds a new map to the map pool. Maps generally can be loaded from
	 * file automatically via the <code>map()</code> function. However if a map
	 * has been created in code it'll have to be added with this function.
	 * If a map with the same map name already exists it will be overridden in the map pool.
	 *
	 * @param am.map map The map to add to the map pool.
	 * @returns boolean True if the map was successfully added, false indicates the map was nil or had no name.
	 */
Manually adds a new map to the map pool. Maps generally can be loaded from
file automatically via the map() function. However if a map
has been created in code it'll have to be added with this function.
If a map with the same map name already exists it will be overridden in the map pool.


Manually adds a new map to the map pool . Maps generally can be loaded from file automatically via the map () function . However if a map has been created in code it ' ll have to be added with this function . If a map with the same map name already exists it will be overridden in the map pool .
int Game_add_map(lua_State *lua)
	{
		Game *game = castUData<Game>(lua, 1);
		if (game)
		{
			Map *map = castUData<Map>(lua, 2);
			if (map)
			{
				lua_pushboolean(lua, game->addMap(map));
				return 1;
			}
			return LuaState::expectedArgs(lua, "add_map", "am.map map");
		}
		return LuaState::expectedContext(lua, "add_map", "am.game");
	}
int Game_add_map ( lua_State * lua ) { Game * game = castUData < Game > ( lua , 1 ) ; if ( game ) { Map * map = castUData < Map > ( lua , 2 ) ; if ( map ) { lua_pushboolean ( lua , game -> addMap ( map ) ) ; return 1 ; } return LuaState :: expectedArgs ( lua , " " , " " ) ; } return LuaState :: expectedContext ( lua , " " , " " ) ; }
Manually adds a new map to the map pool.
Manually adds a new map to the map pool .