diff options
author | sumneko <sumneko@hotmail.com> | 2022-02-08 21:57:56 +0800 |
---|---|---|
committer | sumneko <sumneko@hotmail.com> | 2022-02-08 21:57:56 +0800 |
commit | 007e8637827b75d95f188df0f1c3173cabc53a8b (patch) | |
tree | 69fd9f98ba75099b97080c95001f3d6452de49d3 /meta/3rd/love2d | |
parent | ee476c7f4fb29ab6cf6e77205745428c0e2a8601 (diff) | |
download | lua-language-server-007e8637827b75d95f188df0f1c3173cabc53a8b.zip |
fix #941
Diffstat (limited to 'meta/3rd/love2d')
-rw-r--r-- | meta/3rd/love2d/library/love.audio.lua | 4 | ||||
-rw-r--r-- | meta/3rd/love2d/library/love.filesystem.lua | 4 | ||||
-rw-r--r-- | meta/3rd/love2d/library/love.font.lua | 2 | ||||
-rw-r--r-- | meta/3rd/love2d/library/love.graphics.lua | 84 | ||||
-rw-r--r-- | meta/3rd/love2d/library/love.image.lua | 10 | ||||
-rw-r--r-- | meta/3rd/love2d/library/love.joystick.lua | 6 | ||||
-rw-r--r-- | meta/3rd/love2d/library/love.math.lua | 12 | ||||
-rw-r--r-- | meta/3rd/love2d/library/love.physics.lua | 4 | ||||
-rw-r--r-- | meta/3rd/love2d/library/love.sound.lua | 4 | ||||
-rw-r--r-- | meta/3rd/love2d/library/love.thread.lua | 6 |
10 files changed, 68 insertions, 68 deletions
diff --git a/meta/3rd/love2d/library/love.audio.lua b/meta/3rd/love2d/library/love.audio.lua index e287469c..0d8b3296 100644 --- a/meta/3rd/love2d/library/love.audio.lua +++ b/meta/3rd/love2d/library/love.audio.lua @@ -503,7 +503,7 @@ function Source:setDirection(x, y, z) end --- ---The effect must have been previously defined using love.audio.setEffect. --- ----@overload fun(name: string, filtersettings: table):boolean +---@overload fun(self: love.Source, name: string, filtersettings: table):boolean ---@param name string # The name of the effect previously set up with love.audio.setEffect. ---@param enable? boolean # If false and the given effect name was previously enabled on this Source, disables the effect. ---@return boolean success # Whether the effect was successfully applied to this Source. @@ -512,7 +512,7 @@ function Source:setEffect(name, enable) end --- ---Sets a low-pass, high-pass, or band-pass filter to apply when playing the Source. --- ----@overload fun() +---@overload fun(self: love.Source) ---@param settings {type: love.FilterType, volume: number, highgain: number, lowgain: number} # The filter settings to use for this Source, with the following fields: ---@return boolean success # Whether the filter was successfully applied to the Source. function Source:setFilter(settings) end diff --git a/meta/3rd/love2d/library/love.filesystem.lua b/meta/3rd/love2d/library/love.filesystem.lua index 5925539a..4c4a8f4e 100644 --- a/meta/3rd/love2d/library/love.filesystem.lua +++ b/meta/3rd/love2d/library/love.filesystem.lua @@ -354,7 +354,7 @@ function File:open(mode) end --- ---Read a number of bytes from a file. --- ----@overload fun(container: love.ContainerType, bytes: number):love.FileData|string, number +---@overload fun(self: love.File, container: love.ContainerType, bytes: number):love.FileData|string, number ---@param bytes? number # The number of bytes to read. ---@return string contents # The contents of the read bytes. ---@return number size # How many bytes have been read. @@ -387,7 +387,7 @@ function File:tell() end --- ---Write data to a file. --- ----@overload fun(data: love.Data, size: number):boolean, string +---@overload fun(self: love.File, data: love.Data, size: number):boolean, string ---@param data string # The string data to write. ---@param size? number # How many bytes to write. ---@return boolean success # Whether the operation was successful. diff --git a/meta/3rd/love2d/library/love.font.lua b/meta/3rd/love2d/library/love.font.lua index f2eaf2a3..3d2e31a6 100644 --- a/meta/3rd/love2d/library/love.font.lua +++ b/meta/3rd/love2d/library/love.font.lua @@ -155,7 +155,7 @@ function Rasterizer:getGlyphCount() end --- ---Gets glyph data of a specified glyph. --- ----@overload fun(glyphNumber: number):love.GlyphData +---@overload fun(self: love.Rasterizer, glyphNumber: number):love.GlyphData ---@param glyph string # Glyph ---@return love.GlyphData glyphData # Glyph data function Rasterizer:getGlyphData(glyph) end diff --git a/meta/3rd/love2d/library/love.graphics.lua b/meta/3rd/love2d/library/love.graphics.lua index 5498c480..d2f8c7d8 100644 --- a/meta/3rd/love2d/library/love.graphics.lua +++ b/meta/3rd/love2d/library/love.graphics.lua @@ -1087,7 +1087,7 @@ function Canvas:getMipmapMode() end --- ---Generates ImageData from the contents of the Canvas. --- ----@overload fun(slice: number, mipmap: number, x: number, y: number, width: number, height: number):love.ImageData +---@overload fun(self: love.Canvas, slice: number, mipmap: number, x: number, y: number, width: number, height: number):love.ImageData ---@return love.ImageData data # The new ImageData made from the Canvas' contents. function Canvas:newImageData() end @@ -1176,7 +1176,7 @@ function Font:getHeight() end --- ---Kerning is normally handled automatically in love.graphics.print, Text objects, Font:getWidth, Font:getWrap, etc. This function is useful when stitching text together manually. --- ----@overload fun(leftglyph: number, rightglyph: number):number +---@overload fun(self: love.Font, leftglyph: number, rightglyph: number):number ---@param leftchar string # The left character. ---@param rightchar string # The right character. ---@return number kerning # The kerning amount to add to the spacing between the two characters. May be negative. @@ -1211,8 +1211,8 @@ function Font:getWrap(text, wraplimit) end --- ---Gets whether the Font can render a character or string. --- ----@overload fun(character1: string, character2: string):boolean ----@overload fun(codepoint1: number, codepoint2: number):boolean +---@overload fun(self: love.Font, character1: string, character2: string):boolean +---@overload fun(self: love.Font, codepoint1: number, codepoint2: number):boolean ---@param text string # A UTF-8 encoded unicode string. ---@return boolean hasglyph # Whether the font can render all the UTF-8 characters in the string. function Font:hasGlyphs(text) end @@ -1279,7 +1279,7 @@ local Mesh = {} --- ---Attaches a vertex attribute from a different Mesh onto this Mesh, for use when drawing. This can be used to share vertex attribute data between several different Meshes. --- ----@overload fun(name: string, mesh: love.Mesh, step: love.VertexAttributeStep, attachname: string) +---@overload fun(self: love.Mesh, name: string, mesh: love.Mesh, step: love.VertexAttributeStep, attachname: string) ---@param name string # The name of the vertex attribute to attach. ---@param mesh love.Mesh # The Mesh to get the vertex attribute from. function Mesh:attachAttribute(name, mesh) end @@ -1315,7 +1315,7 @@ function Mesh:getTexture() end --- ---In versions prior to 11.0, color and byte component values were within the range of 0 to 255 instead of 0 to 1. --- ----@overload fun(index: number):number, number, number, number, number, number, number, number +---@overload fun(self: love.Mesh, index: number):number, number, number, number, number, number, number, number ---@param index number # The one-based index of the vertex you want to retrieve the information for. ---@return number attributecomponent # The first component of the first vertex attribute in the specified vertex. function Mesh:getVertex(index) end @@ -1374,7 +1374,7 @@ function Mesh:setDrawMode(mode) end --- ---Restricts the drawn vertices of the Mesh to a subset of the total. --- ----@overload fun() +---@overload fun(self: love.Mesh) ---@param start number # The index of the first vertex to use when drawing, or the index of the first value in the vertex map to use if one is set for this Mesh. ---@param count number # The number of vertices to use when drawing, or number of values in the vertex map to use if one is set for this Mesh. function Mesh:setDrawRange(start, count) end @@ -1382,7 +1382,7 @@ function Mesh:setDrawRange(start, count) end --- ---Sets the texture (Image or Canvas) used when drawing the Mesh. --- ----@overload fun() +---@overload fun(self: love.Mesh) ---@param texture love.Texture # The Image or Canvas to texture the Mesh with when drawing. function Mesh:setTexture(texture) end @@ -1391,9 +1391,9 @@ function Mesh:setTexture(texture) end --- ---In versions prior to 11.0, color and byte component values were within the range of 0 to 255 instead of 0 to 1. --- ----@overload fun(index: number, vertex: table) ----@overload fun(index: number, x: number, y: number, u: number, v: number, r: number, g: number, b: number, a: number) ----@overload fun(index: number, vertex: table) +---@overload fun(self: love.Mesh, index: number, vertex: table) +---@overload fun(self: love.Mesh, index: number, x: number, y: number, u: number, v: number, r: number, g: number, b: number, a: number) +---@overload fun(self: love.Mesh, index: number, vertex: table) ---@param index number # The index of the the vertex you want to modify (one-based). ---@param attributecomponent number # The first component of the first vertex attribute in the specified vertex. function Mesh:setVertex(index, attributecomponent) end @@ -1414,16 +1414,16 @@ function Mesh:setVertexAttribute(vertexindex, attributeindex, value1, value2) en --- ---The vertex map allows you to re-order or reuse vertices when drawing without changing the actual vertex parameters or duplicating vertices. It is especially useful when combined with different Mesh Draw Modes. --- ----@overload fun(vi1: number, vi2: number, vi3: number) ----@overload fun(data: love.Data, datatype: love.IndexDataType) +---@overload fun(self: love.Mesh, vi1: number, vi2: number, vi3: number) +---@overload fun(self: love.Mesh, data: love.Data, datatype: love.IndexDataType) ---@param map table # A table containing a list of vertex indices to use when drawing. Values must be in the range of Mesh:getVertexCount(). function Mesh:setVertexMap(map) end --- ---Replaces a range of vertices in the Mesh with new ones. The total number of vertices in a Mesh cannot be changed after it has been created. This is often more efficient than calling Mesh:setVertex in a loop. --- ----@overload fun(data: love.Data, startvertex: number) ----@overload fun(vertices: table) +---@overload fun(self: love.Mesh, data: love.Data, startvertex: number) +---@overload fun(self: love.Mesh, vertices: table) ---@param vertices {attributecomponent: number} # The table filled with vertex information tables for each vertex, in the form of {vertex, ...} where each vertex is a table in the form of {attributecomponent, ...}. ---@param startvertex? number # The index of the first vertex to replace. function Mesh:setVertices(vertices, startvertex) end @@ -1774,7 +1774,7 @@ function ParticleSystem:setPosition(x, y) end --- ---Sets a series of Quads to use for the particle sprites. Particles will choose a Quad from the list based on the particle's current lifetime, allowing for the use of animated sprite sheets with ParticleSystems. --- ----@overload fun(quads: table) +---@overload fun(self: love.ParticleSystem, quads: table) ---@param quad1 love.Quad # The first Quad to use. ---@param quad2 love.Quad # The second Quad to use. function ParticleSystem:setQuads(quad1, quad2) end @@ -1949,14 +1949,14 @@ function Shader:hasUniform(name) end --- ---Uniform / extern variables are read-only in the shader code and remain constant until modified by a Shader:send call. Uniform variables can be accessed in both the Vertex and Pixel components of a shader, as long as the variable is declared in each. --- ----@overload fun(name: string, vector: table, ...) ----@overload fun(name: string, matrix: table, ...) ----@overload fun(name: string, texture: love.Texture) ----@overload fun(name: string, boolean: boolean, ...) ----@overload fun(name: string, matrixlayout: love.MatrixLayout, matrix: table, ...) ----@overload fun(name: string, data: love.Data, offset: number, size: number) ----@overload fun(name: string, data: love.Data, matrixlayout: love.MatrixLayout, offset: number, size: number) ----@overload fun(name: string, matrixlayout: love.MatrixLayout, data: love.Data, offset: number, size: number) +---@overload fun(self: love.Shader, name: string, vector: table, ...) +---@overload fun(self: love.Shader, name: string, matrix: table, ...) +---@overload fun(self: love.Shader, name: string, texture: love.Texture) +---@overload fun(self: love.Shader, name: string, boolean: boolean, ...) +---@overload fun(self: love.Shader, name: string, matrixlayout: love.MatrixLayout, matrix: table, ...) +---@overload fun(self: love.Shader, name: string, data: love.Data, offset: number, size: number) +---@overload fun(self: love.Shader, name: string, data: love.Data, matrixlayout: love.MatrixLayout, offset: number, size: number) +---@overload fun(self: love.Shader, name: string, matrixlayout: love.MatrixLayout, data: love.Data, offset: number, size: number) ---@param name string # Name of the number to send to the shader. ---@param number number # Number to send to store in the uniform variable. function Shader:send(name, number) end @@ -1991,7 +1991,7 @@ local SpriteBatch = {} --- ---Adds a sprite to the batch. Sprites are drawn in the order they are added. --- ----@overload fun(quad: love.Quad, x: number, y: number, r: number, sx: number, sy: number, ox: number, oy: number, kx: number, ky: number):number +---@overload fun(self: love.SpriteBatch, quad: love.Quad, x: number, y: number, r: number, sx: number, sy: number, ox: number, oy: number, kx: number, ky: number):number ---@param x number # The position to draw the object (x-axis). ---@param y number # The position to draw the object (y-axis). ---@param r? number # Orientation (radians). @@ -2007,9 +2007,9 @@ function SpriteBatch:add(x, y, r, sx, sy, ox, oy, kx, ky) end --- ---Adds a sprite to a batch created with an Array Texture. --- ----@overload fun(layerindex: number, quad: love.Quad, x: number, y: number, r: number, sx: number, sy: number, ox: number, oy: number, kx: number, ky: number):number ----@overload fun(layerindex: number, transform: love.Transform):number ----@overload fun(layerindex: number, quad: love.Quad, transform: love.Transform):number +---@overload fun(self: love.SpriteBatch, layerindex: number, quad: love.Quad, x: number, y: number, r: number, sx: number, sy: number, ox: number, oy: number, kx: number, ky: number):number +---@overload fun(self: love.SpriteBatch, layerindex: number, transform: love.Transform):number +---@overload fun(self: love.SpriteBatch, layerindex: number, quad: love.Quad, transform: love.Transform):number ---@param layerindex number # The index of the layer to use for this sprite. ---@param x? number # The position to draw the sprite (x-axis). ---@param y? number # The position to draw the sprite (y-axis). @@ -2080,7 +2080,7 @@ function SpriteBatch:getTexture() end --- ---Changes a sprite in the batch. This requires the sprite index returned by SpriteBatch:add or SpriteBatch:addLayer. --- ----@overload fun(spriteindex: number, quad: love.Quad, x: number, y: number, r: number, sx: number, sy: number, ox: number, oy: number, kx: number, ky: number) +---@overload fun(self: love.SpriteBatch, spriteindex: number, quad: love.Quad, x: number, y: number, r: number, sx: number, sy: number, ox: number, oy: number, kx: number, ky: number) ---@param spriteindex number # The index of the sprite that will be changed. ---@param x number # The position to draw the object (x-axis). ---@param y number # The position to draw the object (y-axis). @@ -2100,7 +2100,7 @@ function SpriteBatch:set(spriteindex, x, y, r, sx, sy, ox, oy, kx, ky) end --- ---In version 0.9.2 and older, the global color set with love.graphics.setColor will not work on the SpriteBatch if any of the sprites has its own color. --- ----@overload fun() +---@overload fun(self: love.SpriteBatch) ---@param r number # The amount of red. ---@param g number # The amount of green. ---@param b number # The amount of blue. @@ -2110,7 +2110,7 @@ function SpriteBatch:setColor(r, g, b, a) end --- ---Restricts the drawn sprites in the SpriteBatch to a subset of the total. --- ----@overload fun() +---@overload fun(self: love.SpriteBatch) ---@param start number # The index of the first sprite to draw. Index 1 corresponds to the first sprite added with SpriteBatch:add. ---@param count number # The number of sprites to draw. function SpriteBatch:setDrawRange(start, count) end @@ -2118,9 +2118,9 @@ function SpriteBatch:setDrawRange(start, count) end --- ---Changes a sprite previously added with add or addLayer, in a batch created with an Array Texture. --- ----@overload fun(spriteindex: number, layerindex: number, quad: love.Quad, x: number, y: number, r: number, sx: number, sy: number, ox: number, oy: number, kx: number, ky: number) ----@overload fun(spriteindex: number, layerindex: number, transform: love.Transform) ----@overload fun(spriteindex: number, layerindex: number, quad: love.Quad, transform: love.Transform) +---@overload fun(self: love.SpriteBatch, spriteindex: number, layerindex: number, quad: love.Quad, x: number, y: number, r: number, sx: number, sy: number, ox: number, oy: number, kx: number, ky: number) +---@overload fun(self: love.SpriteBatch, spriteindex: number, layerindex: number, transform: love.Transform) +---@overload fun(self: love.SpriteBatch, spriteindex: number, layerindex: number, quad: love.Quad, transform: love.Transform) ---@param spriteindex number # The index of the existing sprite to replace. ---@param layerindex number # The index of the layer in the Array Texture to use for this sprite. ---@param x? number # The position to draw the sprite (x-axis). @@ -2149,7 +2149,7 @@ local Text = {} --- ---Adds additional colored text to the Text object at the specified position. --- ----@overload fun(coloredtext: table, x: number, y: number, angle: number, sx: number, sy: number, ox: number, oy: number, kx: number, ky: number):number +---@overload fun(self: love.Text, coloredtext: table, x: number, y: number, angle: number, sx: number, sy: number, ox: number, oy: number, kx: number, ky: number):number ---@param textstring string # The text to add to the object. ---@param x? number # The position of the new text on the x-axis. ---@param y? number # The position of the new text on the y-axis. @@ -2168,7 +2168,7 @@ function Text:add(textstring, x, y, angle, sx, sy, ox, oy, kx, ky) end --- ---The word wrap limit is applied before any scaling, rotation, and other coordinate transformations. Therefore the amount of text per line stays constant given the same wrap limit, even if the scale arguments change. --- ----@overload fun(coloredtext: table, wraplimit: number, align: love.AlignMode, x: number, y: number, angle: number, sx: number, sy: number, ox: number, oy: number, kx: number, ky: number):number +---@overload fun(self: love.Text, coloredtext: table, wraplimit: number, align: love.AlignMode, x: number, y: number, angle: number, sx: number, sy: number, ox: number, oy: number, kx: number, ky: number):number ---@param textstring string # The text to add to the object. ---@param wraplimit number # The maximum width in pixels of the text before it gets automatically wrapped to a new line. ---@param align love.AlignMode # The alignment of the text. @@ -2192,7 +2192,7 @@ function Text:clear() end --- ---Gets the width and height of the text in pixels. --- ----@overload fun(index: number):number, number +---@overload fun(self: love.Text, index: number):number, number ---@return number width # The width of the text. If multiple sub-strings have been added with Text:add, the width of the last sub-string is returned. ---@return number height # The height of the text. If multiple sub-strings have been added with Text:add, the height of the last sub-string is returned. function Text:getDimensions() end @@ -2206,21 +2206,21 @@ function Text:getFont() end --- ---Gets the height of the text in pixels. --- ----@overload fun(index: number):number +---@overload fun(self: love.Text, index: number):number ---@return number height # The height of the text. If multiple sub-strings have been added with Text:add, the height of the last sub-string is returned. function Text:getHeight() end --- ---Gets the width of the text in pixels. --- ----@overload fun(index: number):number +---@overload fun(self: love.Text, index: number):number ---@return number width # The width of the text. If multiple sub-strings have been added with Text:add, the width of the last sub-string is returned. function Text:getWidth() end --- ---Replaces the contents of the Text object with a new unformatted string. --- ----@overload fun(coloredtext: table) +---@overload fun(self: love.Text, coloredtext: table) ---@param textstring string # The new string of text to use. function Text:set(textstring) end @@ -2233,7 +2233,7 @@ function Text:setFont(font) end --- ---Replaces the contents of the Text object with a new formatted string. --- ----@overload fun(coloredtext: table, wraplimit: number, align: love.AlignMode) +---@overload fun(self: love.Text, coloredtext: table, wraplimit: number, align: love.AlignMode) ---@param textstring string # The new string of text to use. ---@param wraplimit number # The maximum width in pixels of the text before it gets automatically wrapped to a new line. ---@param align love.AlignMode # The alignment of the text. @@ -2399,7 +2399,7 @@ function Texture:setFilter(min, mag, anisotropy) end --- ---Due to hardware restrictions and driver bugs, in versions prior to 0.10.0 images that weren't loaded from a CompressedData must have power-of-two dimensions (64x64, 512x256, etc.) to use mipmaps. --- ----@overload fun() +---@overload fun(self: love.Texture) ---@param filtermode love.FilterMode # The filter mode to use in between mipmap levels. 'nearest' will often give better performance. ---@param sharpness? number # A positive sharpness value makes the texture use a more detailed mipmap level when drawing, at the expense of performance. A negative value does the reverse. function Texture:setMipmapFilter(filtermode, sharpness) end diff --git a/meta/3rd/love2d/library/love.image.lua b/meta/3rd/love2d/library/love.image.lua index c95f6d7f..5db859ae 100644 --- a/meta/3rd/love2d/library/love.image.lua +++ b/meta/3rd/love2d/library/love.image.lua @@ -47,7 +47,7 @@ local CompressedImageData = {} --- ---Gets the width and height of the CompressedImageData. --- ----@overload fun(level: number):number, number +---@overload fun(self: love.CompressedImageData, level: number):number, number ---@return number width # The width of the CompressedImageData. ---@return number height # The height of the CompressedImageData. function CompressedImageData:getDimensions() end @@ -61,7 +61,7 @@ function CompressedImageData:getFormat() end --- ---Gets the height of the CompressedImageData. --- ----@overload fun(level: number):number +---@overload fun(self: love.CompressedImageData, level: number):number ---@return number height # The height of the CompressedImageData. function CompressedImageData:getHeight() end @@ -74,7 +74,7 @@ function CompressedImageData:getMipmapCount() end --- ---Gets the width of the CompressedImageData. --- ----@overload fun(level: number):number +---@overload fun(self: love.CompressedImageData, level: number):number ---@return number width # The width of the CompressedImageData. function CompressedImageData:getWidth() end @@ -89,8 +89,8 @@ local ImageData = {} --- ---Encodes the ImageData and optionally writes it to the save directory. --- ----@overload fun(outFile: string) ----@overload fun(outFile: string, format: love.ImageFormat) +---@overload fun(self: love.ImageData, outFile: string) +---@overload fun(self: love.ImageData, outFile: string, format: love.ImageFormat) ---@param format love.ImageFormat # The format to encode the image as. ---@param filename? string # The filename to write the file to. If nil, no file will be written but the FileData will still be returned. ---@return love.FileData filedata # The encoded image as a new FileData object. diff --git a/meta/3rd/love2d/library/love.joystick.lua b/meta/3rd/love2d/library/love.joystick.lua index df3ea208..29e21cd8 100644 --- a/meta/3rd/love2d/library/love.joystick.lua +++ b/meta/3rd/love2d/library/love.joystick.lua @@ -121,7 +121,7 @@ function Joystick:getGamepadAxis(axis) end --- ---Gets the button, axis or hat that a virtual gamepad input is bound to. --- ----@overload fun(button: love.GamepadButton):love.JoystickInputType, number, love.JoystickHat +---@overload fun(self: love.Joystick, button: love.GamepadButton):love.JoystickInputType, number, love.JoystickHat ---@param axis love.GamepadAxis # The virtual gamepad axis to get the binding for. ---@return love.JoystickInputType inputtype # The type of input the virtual gamepad axis is bound to. ---@return number inputindex # The index of the Joystick's button, axis or hat that the virtual gamepad axis is bound to. @@ -208,8 +208,8 @@ function Joystick:isVibrationSupported() end --- ---Sets the vibration motor speeds on a Joystick with rumble support. Most common gamepads have this functionality, although not all drivers give proper support. Use Joystick:isVibrationSupported to check. --- ----@overload fun():boolean ----@overload fun(left: number, right: number, duration: number):boolean +---@overload fun(self: love.Joystick):boolean +---@overload fun(self: love.Joystick, left: number, right: number, duration: number):boolean ---@param left number # Strength of the left vibration motor on the Joystick. Must be in the range of 1. ---@param right number # Strength of the right vibration motor on the Joystick. Must be in the range of 1. ---@return boolean success # True if the vibration was successfully applied, false if not. diff --git a/meta/3rd/love2d/library/love.math.lua b/meta/3rd/love2d/library/love.math.lua index 14689c86..a2510a2f 100644 --- a/meta/3rd/love2d/library/love.math.lua +++ b/meta/3rd/love2d/library/love.math.lua @@ -341,8 +341,8 @@ function RandomGenerator:getState() end --- ---Generates a pseudo-random number in a platform independent manner. --- ----@overload fun(max: number):number ----@overload fun(min: number, max: number):number +---@overload fun(self: love.RandomGenerator, max: number):number +---@overload fun(self: love.RandomGenerator, min: number, max: number):number ---@return number number # The pseudo-random number. function RandomGenerator:random() end @@ -357,7 +357,7 @@ function RandomGenerator:randomNormal(stddev, mean) end --- ---Sets the seed of the random number generator using the specified integer number. --- ----@overload fun(low: number, high: number) +---@overload fun(self: love.RandomGenerator, low: number, high: number) ---@param seed number # The integer number with which you want to seed the randomization. Must be within the range of 2^53. function RandomGenerator:setSeed(seed) end @@ -449,9 +449,9 @@ function Transform:scale(sx, sy) end --- ---Directly sets the Transform's internal 4x4 transformation matrix. --- ----@overload fun(layout: love.MatrixLayout, e1_1: number, e1_2: number, ..., e4_4: number):love.Transform ----@overload fun(layout: love.MatrixLayout, matrix: table):love.Transform ----@overload fun(layout: love.MatrixLayout, matrix: table):love.Transform +---@overload fun(self: love.Transform, layout: love.MatrixLayout, e1_1: number, e1_2: number, ..., e4_4: number):love.Transform +---@overload fun(self: love.Transform, layout: love.MatrixLayout, matrix: table):love.Transform +---@overload fun(self: love.Transform, layout: love.MatrixLayout, matrix: table):love.Transform ---@param e1_1 number # The first column of the first row of the matrix. ---@param e1_2 number # The second column of the first row of the matrix. ---@param e4_4 number # The fourth column of the fourth row of the matrix. diff --git a/meta/3rd/love2d/library/love.physics.lua b/meta/3rd/love2d/library/love.physics.lua index dd1876f5..c0b80ff2 100644 --- a/meta/3rd/love2d/library/love.physics.lua +++ b/meta/3rd/love2d/library/love.physics.lua @@ -317,7 +317,7 @@ function Body:applyAngularImpulse(impulse) end --- ---Note that the force components and position must be given in world coordinates. --- ----@overload fun(fx: number, fy: number, x: number, y: number) +---@overload fun(self: love.Body, fx: number, fy: number, x: number, y: number) ---@param fx number # The x component of force to apply to the center of mass. ---@param fy number # The y component of force to apply to the center of mass. function Body:applyForce(fx, fy) end @@ -333,7 +333,7 @@ function Body:applyForce(fx, fy) end --- ---Note that the impulse components and position must be given in world coordinates. --- ----@overload fun(ix: number, iy: number, x: number, y: number) +---@overload fun(self: love.Body, ix: number, iy: number, x: number, y: number) ---@param ix number # The x component of the impulse applied to the center of mass. ---@param iy number # The y component of the impulse applied to the center of mass. function Body:applyLinearImpulse(ix, iy) end diff --git a/meta/3rd/love2d/library/love.sound.lua b/meta/3rd/love2d/library/love.sound.lua index 2dd18b6d..5c7a89e1 100644 --- a/meta/3rd/love2d/library/love.sound.lua +++ b/meta/3rd/love2d/library/love.sound.lua @@ -94,7 +94,7 @@ function SoundData:getDuration() end --- ---Gets the value of the sample-point at the specified position. For stereo SoundData objects, the data from the left and right channels are interleaved in that order. --- ----@overload fun(i: number, channel: number):number +---@overload fun(self: love.SoundData, i: number, channel: number):number ---@param i number # An integer value specifying the position of the sample (starting at 0). ---@return number sample # The normalized samplepoint (range -1.0 to 1.0). function SoundData:getSample(i) end @@ -114,7 +114,7 @@ function SoundData:getSampleRate() end --- ---Sets the value of the sample-point at the specified position. For stereo SoundData objects, the data from the left and right channels are interleaved in that order. --- ----@overload fun(i: number, channel: number, sample: number) +---@overload fun(self: love.SoundData, i: number, channel: number, sample: number) ---@param i number # An integer value specifying the position of the sample (starting at 0). ---@param sample number # The normalized samplepoint (range -1.0 to 1.0). function SoundData:setSample(i, sample) end diff --git a/meta/3rd/love2d/library/love.thread.lua b/meta/3rd/love2d/library/love.thread.lua index 4bcd9c7d..a0568580 100644 --- a/meta/3rd/love2d/library/love.thread.lua +++ b/meta/3rd/love2d/library/love.thread.lua @@ -52,7 +52,7 @@ function Channel:clear() end --- ---It waits until a message is in the queue then returns the message value. --- ----@overload fun(timeout: number):any +---@overload fun(self: love.Channel, timeout: number):any ---@return any value # The contents of the message. function Channel:demand() end @@ -111,7 +111,7 @@ function Channel:push(value) end --- ---See Variant for the list of supported types. --- ----@overload fun(value: any, timeout: number):boolean +---@overload fun(self: love.Channel, value: any, timeout: number):boolean ---@param value any # The contents of the message. ---@return boolean success # Whether the message was successfully supplied (always true). function Channel:supply(value) end @@ -141,7 +141,7 @@ function Thread:isRunning() end --- ---Beginning with version 0.9.0, threads can be restarted after they have completed their execution. --- ----@overload fun(arg1: any, arg2: any, ...) +---@overload fun(self: love.Thread, arg1: any, arg2: any, ...) function Thread:start() end --- |