lua/wrappers/game/lua_tile_instance.cpp
/**
	 * Sets the tile based on the tile name, returns true if the tile
	 * with given name was found.
	 *
	 * @param string tile_name The name of the tile to instance.
	 * @returns boolean True if the a tile with the given name was found.
	 */
Sets the tile based on the tile name, returns true if the tile
with given name was found.

@param string tile_name The name of the tile to instance.
@returns boolean True if the a tile with the given name was found.
Sets the tile based on the tile name returns true if the tile with given name was found . @param string tile_name The name of the tile to instance . @returns boolean True if the a tile with the given name was found .
int TileInstance_tile(lua_State *lua)
	{
		TileInstance *inst = castUData<TileInstance>(lua, 1);
		if (inst)
		{
			if (lua_gettop(lua) == 1)
			{
				Tile *tile = inst->getTile();
				if (tile)
				{
					wrapRefObject<Tile>(lua, tile);
					return 1;
				}
			}
			else if (lua_isstr(lua, 2))
			{
				lua_pushboolean(lua, inst->setTileName(lua_tostring(lua, 2)));
				return 1;
			}
			Tile *tile = castUData<Tile>(lua, 2);
			if (tile)
			{
				inst->setTile(tile);
				lua_pushboolean(lua, 1);
				return 1;
			}
			return LuaState::expectedArgs(lua, "tile", 2, "am.tile tile", "string tile_name");
		}
		return LuaState::expectedContext(lua, "tile", "am.tile_instance");
	}
int TileInstance_tile ( lua_State * lua ) { TileInstance * inst = castUData < TileInstance > ( lua , 1 ) ; if ( inst ) { if ( lua_gettop ( lua ) == 1 ) { Tile * tile = inst -> getTile ( ) ; if ( tile ) { wrapRefObject < Tile > ( lua , tile ) ; return 1 ; } } else if ( lua_isstr ( lua , 2 ) ) { lua_pushboolean ( lua , inst -> setTileName ( lua_tostring ( lua , 2 ) ) ) ; return 1 ; } Tile * tile = castUData < Tile > ( lua , 2 ) ; if ( tile ) { inst -> setTile ( tile ) ; lua_pushboolean ( lua , 1 ) ; return 1 ; } return LuaState :: expectedArgs ( lua , " " , 2 , " " , " " ) ; } return LuaState :: expectedContext ( lua , " " , " " ) ; }
Sets the tile based on the tile name, returns true if the tile
 with given name was found.
Sets the tile based on the tile name returns true if the tile with given name was found .