lua/wrappers/game/lua_tile.cpp
/**
	 * Returns a table array of all the assets that can be used for transitional overlap when overlapping the given tile.
	 * If no tile to check against if given then the default list is returned.
	 *
	 * @param am.tile [nil] overlap_tile The tile to get the list of assets that will be used to overlap it.
	 * @returns table An array of all the assets.
	 */
Returns a table array of all the assets that can be used for transitional overlap when overlapping the given tile.
If no tile to check against if given then the default list is returned.

@param am.tile [nil] overlap_tile The tile to get the list of assets that will be used to overlap it.
@returns table An array of all the assets.
Returns a table array of all the assets that can be used for transitional overlap when overlapping the given tile . If no tile to check against if given then the default list is returned . @param am . tile [ nil ] overlap_tile The tile to get the list of assets that will be used to overlap it . @returns table An array of all the assets .
int Tile_transitional(lua_State *lua)
	{
		Tile *tile = castUData<Tile>(lua, 1);
		if (tile)
		{
			const Tile::TileAssetList *tiles = nullptr;
			bool error = false;
			if (lua_gettop(lua) == 1 || lua_isnil(lua, 2))
			{
				 tiles = tile->getTransitionalAsset(nullptr);
			}
			else
			{
				Tile *overlapTile = castUData<Tile>(lua, 2);
				error = overlapTile == nullptr;
				if (!error)
				{
					tiles = tile->getTransitionalAsset(overlapTile);
				}
			}
			if (!error)
			{
				if (!tiles || tiles->size() == 0u)
				{
					lua_createtable(lua, 0, 0);
					return 1;
				}
				lua_createtable(lua, tiles->size(), 0);
				int i = 1;
				for (auto iter = tiles->begin(); iter != tiles->end(); ++iter)
				{
					lua_pushinteger(lua, i++);
					wrapRefObject<Asset>(lua, iter->get());
					lua_settable(lua, -3);
				}
				return 1;
			}
			return LuaState::expectedArgs(lua, "transitional", 2, "am.tile [nil] overlap_tile", "");
		}
		return LuaState::expectedContext(lua, "transitional", "am.tile");
	}
int Tile_transitional ( lua_State * lua ) { Tile * tile = castUData < Tile > ( lua , 1 ) ; if ( tile ) { const Tile :: TileAssetList * tiles = nullptr ; bool error = false ; if ( lua_gettop ( lua ) == 1 || lua_isnil ( lua , 2 ) ) { tiles = tile -> getTransitionalAsset ( nullptr ) ; } else { Tile * overlapTile = castUData < Tile > ( lua , 2 ) ; error = overlapTile == nullptr ; if ( ! error ) { tiles = tile -> getTransitionalAsset ( overlapTile ) ; } } if ( ! error ) { if ( ! tiles || tiles -> size ( ) == 0u ) { lua_createtable ( lua , 0 , 0 ) ; return 1 ; } lua_createtable ( lua , tiles -> size ( ) , 0 ) ; int i = 1 ; for ( auto iter = tiles -> begin ( ) ; iter != tiles -> end ( ) ; ++ iter ) { lua_pushinteger ( lua , i ++ ) ; wrapRefObject < Asset > ( lua , iter -> get ( ) ) ; lua_settable ( lua , -3 ) ; } return 1 ; } return LuaState :: expectedArgs ( lua , " " , 2 , " " , " " ) ; } return LuaState :: expectedContext ( lua , " " , " " ) ; }
Returns a table array of all the assets that can be used for transitional overlap when overlapping the given tile.
Returns a table array of all the assets that can be used for transitional overlap when overlapping the given tile .