lua/wrappers/game/lua_map.cpp
/**
	 * Returns the tile instance at the given grid location.
	 *
	 * @param integer x The x position of the tile instance.
	 * @param integer y The y position of the tile instance.
	 * @returns TileInstance The found tile instance, nil if out of bounds.
	 */
Returns the tile instance at the given grid location.
@param integer x The x position of the tile instance.
@param integer y The y position of the tile instance.
@returns TileInstance The found tile instance, nil if out of bounds.
Returns the tile instance at the given grid location . @param integer x The x position of the tile instance . @param integer y The y position of the tile instance . @returns TileInstance The found tile instance nil if out of bounds .
int Map_tile_instance(lua_State *lua)
	{
		Map *map = castUData<Map>(lua, 1);
		if (map)
		{
			if (lua_isnum(lua, 2) && lua_isnum(lua, 3))
			{
				TileInstance *inst = map->getTileInstance(lua_tointeger(lua, -2), lua_tointeger(lua, -1));
				if (inst)
				{
					wrapObject<TileInstance>(lua, inst);
					return 1;
				}
				lua_pushnil(lua);
				return 1;
			}
			return LuaState::expectedArgs(lua, "tile_instance", "integer x, integer y");
		}
		return LuaState::expectedContext(lua, "tile_instance", "am.map");
	}
int Map_tile_instance ( lua_State * lua ) { Map * map = castUData < Map > ( lua , 1 ) ; if ( map ) { if ( lua_isnum ( lua , 2 ) && lua_isnum ( lua , 3 ) ) { TileInstance * inst = map -> getTileInstance ( lua_tointeger ( lua , -2 ) , lua_tointeger ( lua , -1 ) ) ; if ( inst ) { wrapObject < TileInstance > ( lua , inst ) ; return 1 ; } lua_pushnil ( lua ) ; return 1 ; } return LuaState :: expectedArgs ( lua , " " , " " ) ; } return LuaState :: expectedContext ( lua , " " , " " ) ; }
Returns the tile instance at the given grid location.
Returns the tile instance at the given grid location .