lua/wrappers/game/lua_map.cpp
/**
	 * Sets the map name, which is used as the map id.
	 * TODO Currently this doesn't update the map of Maps, so it'll still be
	 * referred to by it's previous name if it's been registered with a Game instance.
	 *
	 * @param string map_name The new map name.
	 * @returns am.map This
	 */
Sets the map name, which is used as the map id.
TODO Currently this doesn't update the map of Maps, so it'll still be
referred to by it's previous name if it's been registered with a Game instance.

@param string map_name The new map name.
Sets the map name which is used as the map id . TODO Currently this doesn ' t update the map of Maps so it ' ll still be referred to by it ' s previous name if it ' s been registered with a Game instance . @param string map_name The new map name .
int Map_name(lua_State *lua)
	{
		Map *map = castUData<Map>(lua, 1);
		if (map)
		{
			if (lua_gettop(lua) == 1)
			{
				lua_pushstring(lua, map->getName().c_str());
				return 1;
			}
			else if (lua_isstr(lua, 2))
			{
				map->setName(lua_tostring(lua, 2));
				lua_first(lua);
			}
			return LuaState::expectedArgs(lua, "name", "string map_name");
		}
		return LuaState::expectedContext(lua, "name", "am.map");
	}
int Map_name ( lua_State * lua ) { Map * map = castUData < Map > ( lua , 1 ) ; if ( map ) { if ( lua_gettop ( lua ) == 1 ) { lua_pushstring ( lua , map -> getName ( ) . c_str ( ) ) ; return 1 ; } else if ( lua_isstr ( lua , 2 ) ) { map -> setName ( lua_tostring ( lua , 2 ) ) ; lua_first ( lua ) ; } return LuaState :: expectedArgs ( lua , " " , " " ) ; } return LuaState :: expectedContext ( lua , " " , " " ) ; }
Sets the map name, which is used as the map id.
Sets the map name which is used as the map id .