Effect Radar Implementation v1 #46
|
@ -23,47 +23,53 @@ IRData = {}
|
|||
---@field serverTime integer
|
||||
---@field serverName string
|
||||
---@field irVersion string
|
||||
IRHeartbeatResponseBody = {}
|
||||
|
||||
---@class IRRecordResponseBody
|
||||
---@field record ServerScore
|
||||
IRRecordResponseBody = {}
|
||||
|
||||
---@class IRLeaderboardResponseBody
|
||||
---@field scores ServerScore[]
|
||||
IRLeaderboardResponseBody = {}
|
||||
---@alias IRLeaderboardResponseBody ServerScore[]
|
||||
|
||||
---@class IRResponse
|
||||
---@field statusCode integer
|
||||
---@field description string
|
||||
---@field body nil|IRHeartbeatResponseBody|IRRecordResponseBody|IRLeaderboardResponseBody
|
||||
IRResponse = {}
|
||||
|
||||
---@class IRHeartbeatResponse : IRResponse
|
||||
---@field body IRHeartbeatResponseBody
|
||||
|
||||
---@class IRChartTrackedResponse : IRResponse
|
||||
---@field body {}
|
||||
|
||||
---@class IRRecordResponse : IRResponse
|
||||
---@field body IRRecordResponseBody
|
||||
|
||||
---@class IRLeaderboardResponse : IRResponse
|
||||
---@field body ServerScore[]
|
||||
|
||||
-- Performs a Heartbeat request.
|
||||
---@param callback fun(res: IRResponse) # Callback function receives IRResponse as it's first parameter
|
||||
---@param callback fun(res: IRHeartbeatResponse) # Callback function receives IRResponse as it's first parameter
|
||||
local function Heartbeat(callback) end
|
||||
|
||||
-- Performs a Chart Tracked request for the chart with the provided hash.
|
||||
---@param hash string # song hash
|
||||
---@param callback fun(res: IRResponse) # Callback function receives IRResponse as it's first parameter
|
||||
---@param callback fun(res: IRChartTrackedResponse) # Callback function receives IRResponse as it's first parameter
|
||||
local function ChartTracked(hash, callback) end
|
||||
|
||||
-- Performs a Record request for the chart with the provided hash.
|
||||
---@param hash string # song hash
|
||||
---@param callback fun(res: IRResponse) # Callback function receives IRResponse as it's first parameter
|
||||
---@param callback fun(res: IRRecordResponse) # Callback function receives IRResponse as it's first parameter
|
||||
local function Record(hash, callback) end
|
||||
|
||||
-- Performs a Leaderboard request for the chart with the provided hash, with parameters mode and n.
|
||||
---@param hash string # song hash
|
||||
---@param mode "best"|"rivals" # request leaderboard mode
|
||||
---@param n integer # limit the number of requested scores
|
||||
---@param callback fun(res: IRResponse) # Callback function receives IRResponse as it's first parameter
|
||||
---@param callback fun(res: IRLeaderboardResponse) # Callback function receives IRResponse as it's first parameter
|
||||
local function Leaderboard(hash, mode, n, callback) end
|
||||
|
||||
---@type table
|
||||
---@class IR
|
||||
IR = {
|
||||
Heartbeat = Heartbeat,
|
||||
ChartTracked = ChartTracked,
|
||||
Record = Record,
|
||||
Leaderboard = Leaderboard
|
||||
}
|
||||
}
|
||||
|
|
|
@ -267,7 +267,7 @@ LoadSharedSkinTexture = function(name, path) end
|
|||
|
||||
-- Loads a font fromt the specified filename
|
||||
-- Sets it as the current font if it is already loaded
|
||||
---@param name? string
|
||||
---@param name string
|
||||
---@param filename string
|
||||
LoadFont = function(name, filename) end
|
||||
|
||||
|
@ -280,11 +280,10 @@ LoadFont = function(name, filename) end
|
|||
---@return any # returns `placeholder` until the image is loaded
|
||||
LoadImageJob = function(filepath, placeholder, w, h) end
|
||||
|
||||
-- Loads a font from `skins/<skin>/textures/<path>`
|
||||
-- Loads a font from `skins/<skin>/fonts/<name>`
|
||||
-- Sets it as the current font if it is already loaded
|
||||
---@param name? string
|
||||
---@param filename string
|
||||
LoadSkinFont = function(name, filename) end
|
||||
---@param name string
|
||||
LoadSkinFont = function(name) end
|
||||
|
||||
-- Loads an image outside of the main thread to prevent rendering lock-up
|
||||
-- Image will be loaded at original size unless `w` and `h` are provided
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
---@diagnostic disable: lowercase-global
|
||||
-- songwheel `songwheel` table
|
||||
|
||||
---@class SongWheelScore
|
||||
|
@ -35,7 +36,7 @@ SongWheelDifficulty = {}
|
|||
---@class SongWheelSong
|
||||
---@field artist string # Chart artist
|
||||
---@field difficulties SongWheelDifficulty[] # Array of difficulties for the current song
|
||||
---@field bpm number # Chart BPM
|
||||
---@field bpm string # Chart BPM
|
||||
---@field id integer # Song id, unique static identifier
|
||||
---@field path string # Full filepath to the chart folder on the disk
|
||||
---@field title string # Chart title
|
||||
|
|
Loading…
Reference in New Issue