This commit is contained in:
Hersi 2024-02-02 02:25:30 +01:00
parent 90580a9b61
commit 941e0421ea
2 changed files with 77 additions and 41 deletions

View File

@ -7,7 +7,7 @@
---@field delta integer -- Delta value of the hit from 0
---@field hold integer -- `0` for chip/laser, otherwise `# Ticks` of hold
---@field rating integer -- `0 = Miss`, `1 = Near`, `2 = Crit`
HitStat = {};
HitStat = {}
---@class HitWindow
---@field good integer # Near window, default `92`
@ -16,25 +16,36 @@ HitStat = {};
---@field perfect integer -- Critical window, default `46`
---@field slam integer -- Slam window, default `84`
---@field type integer -- `1 = Normal` default, `2 = Hard` default values halved
HitWindow = {};
HitWindow = {}
---@class Score
---@field auto_flags integer # Autoplay flag
---@class HiddenSudden
---@field hiddenCutoff number
---@field hiddenFade number
---@field showCover boolean # Cover beatmap
---@field suddenCutoff number
---@field suddenFade number
HiddenSudden = {}
---@class HighScore
---@field auto_flags integer # Only Singleplayer, Autoplay flag
---@field badge integer # `0` = Manual Exit, `1` = Played, `2` = Cleared, `3` = Hard Cleared, `4` = Full Chain, `5` = Perfect Chain
---@field flags integer # Only Multiplayer, Autoplay flag
---@field gauge number # Ending gauge percentage, `0.0` to `1.0`
---@field gauge_option integer # Gauge option e.g. ARS
---@field gauge_type integer # `0` = Normal, `1` = Hard, `2` = Permissive, `3` = Blastive
---@field gauge_option integer # Only Singleplayer, Gauge option e.g. ARS
---@field gauge_type integer # Only Singleplayer, `0` = Normal, `1` = Hard, `2` = Permissive, `3` = Blastive
---@field goods integer # Total near hits
---@field hitWindow HitWindow|nil # Hit windows of the score, only for singleplayer results screen
---@field mirror integer # Mirror mode flag
---@field hitWindow nil|HitWindow # Only Singleplayer, Hit windows of the score
---@field isLocal boolean # Only Singleplayer, Whether this score was set locally
---@field mirror integer # Only Singleplayer, Mirror mode flag
---@field misses integer # Total errors
---@field name nil|string # Only for multiplayer results, name of the player
---@field name string # Only Multiplayer, player name
---@field perfects integer # Total critical hits
---@field random integer # Random mode flag
---@field playerName string # Only Singleplayer, Player name
---@field random integer # Only Singleplayer, Random mode flag
---@field score integer # Result score
---@field timestamp integer # Unix timestamp of the score
---@field uid nil|string # Only for multiplayer results, UID of the player
Score = {};
HighScore = {};
---@class ChartResult : result
---@field passed boolean # Whether or not challenge requirements were met for this chart
@ -42,27 +53,30 @@ Score = {};
ChartResult = {};
---@class ServerScoreOptions
---@field gaugeType integer # An enum value representing the gauge type used. 0 = normal, 1 = hard. Further values are not currently specified.
---@field autoFlags integer # A bitfield of elements of the game that are automated. Any non-zero value means that the score was at least partially auto.
---@field gaugeOpt integer # Reserved
---@field gaugeType integer # An enum value representing the gauge type used. 0 = normal, 1 = hard. Further values are not currently specified.
---@field mirror boolean # Mirror mode enabled
---@field random boolean # Note shuffle enabled
---@field autoFlags integer # A bitfield of elements of the game that are automated. Any non-zero value means that the score was at least partially auto.
ServerScoreOptions = {}
---@class ServerScore
---@field score integer # Submitted score
---@field gauge number # Submitted Gauge result
---@field timestamp integer # Unix timestamp of the score
---@field crit integer # Hits inside the critical window
---@field near integer # Hits inside the near window
---@field early integer # Hits inside the near window which were early
---@field late integer # Hits inside the near window which were late
---@field combo integer # Best combo reached
---@field crit integer # Hits inside the critical window
---@field early integer # Hits inside the near window which were early
---@field error integer # Missed notes
---@field gauge number # Submitted Gauge result
---@field justSet boolean # This score belongs to the current player, and is the score that was just achieved
---@field lamp integer # `badge`
---@field late integer # Hits inside the near window which were late
---@field near integer # Hits inside the near window
---@field options ServerScoreOptions # The options in use. Includes gauge type, etc.
---@field ranking integer # Online leaderboard ranking
---@field score integer # Submitted score
---@field timestamp integer # Unix timestamp of the score
---@field username string # Online player name
---@field windows table # {perfect, good, hold, miss, slam} hit windows in milliseconds
---@field yours boolean # This score belongs to the current player
---@field justSet boolean # This score belongs to the current player, and is the score that was just achieved
ServerScore = {}
---@class result
@ -92,16 +106,17 @@ ServerScore = {}
---@field gaugeSamples number[] # Gauge values sampled (256 total) throughout the play
---@field goods integer # Total near hits
---@field grade string # Result grade
---@field highScores Score[] # All scores
---@field hidsud nil|HiddenSudden # Hidden-Sudden options
---@field highScores HighScore[] # All scores
---@field hitWindow HitWindow # Result hit windows
---@field holdHitStats HitStat[]|nil # Hit stats for every hold object, only available for singleplayer if `isSelf = true`
---@field holdHitStats nil|HitStat[] # Hit stats for every hold object, only available for singleplayer if `isSelf = true`
---@field illustrator string # Chart jacket illustrator
---@field irState integer # Current state of the IR score submission request (a USC-IR code, including extensions 0/10/60)
---@field irDescription string # The description in the IR response (nil if irState is 0 or 10)
---@field irScores ServerScore[]|nil # Score submission result, nil if irState != 20
---@field isSelf boolean # Only for multiplayer, `false` if score is of another player
---@field irDescription nil|string # The description in the IR response (nil if irState is 0 or 10)
---@field irScores nil|ServerScore[] # Score submission result, nil if irState != 20
---@field isSelf boolean # `false` if score is of another player
---@field jacketPath string # Full filepath to the jacket image on the disk
---@field laserHitStats HitStat[]|nil # Hit stats for every laser object, only available for singleplayer if `isSelf = true`
---@field laserHitStats nil|HitStat[] # Hit stats for every laser object, only available for singleplayer if `isSelf = true`
---@field lates integer # Total late hits
---@field level integer # Chart or challenge level
---@field maxCombo integer # Result max chain
@ -112,7 +127,7 @@ ServerScore = {}
---@field mirror boolean # Mirror mode bool
---@field misses integer # Total errors
---@field mission string # Only for practice mode
---@field noteHitStats HitStat[]|nil # Hit stats for every chip hit, only available for singleplayer if `isSelf = true`
---@field noteHitStats nil|HitStat[] # Hit stats for every chip hit, only available for singleplayer if `isSelf = true`
---@field overallCrits integer # Only for challenge results, total number of critical hits across the charts
---@field overallErrors integer # Only for challenge results, total number of error hits across the charts
---@field overallNears integer # Only for challenge results, total number of near hits across the charts
@ -125,8 +140,8 @@ ServerScore = {}
---@field requirement_text string # Only for challenge results, the challenge requirements separated by newline character `"\n"`
---@field retryCount integer # Only for practice mode
---@field score integer # Result score
---@field speedModType integer # Only for singleplayer, `0` = XMOD, `1` = MMOD, `2` = CMOD
---@field speedModValue number # Only for singleplayer, `HiSpeed` for `XMOD`, `ModSpeed` otherwise
---@field speedModType nil|integer # Only for singleplayer, `0` = XMOD, `1` = MMOD, `2` = CMOD
---@field speedModValue nil|number # Only for singleplayer, `HiSpeed` for `XMOD`, `ModSpeed` otherwise
---@field title string # Chart (with player name in multiplayer) or challenge title
---@field uid nil|string # Only for multiplayer, UID of the player
result = {};

View File

@ -1,7 +1,17 @@
-- songwheel `songwheel` table
---@class Song
---@field artist string # Chart artist
---@field difficulties Difficulty[] # Array of difficulties for the current song
---@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
Song = {};
---@class Difficulty
---@field difficulty integer # Difficulty index
---@field effector string # Effector name
---@field hash string # Difficulty hash
---@field id integer # Difficulty id, unique static identifier
---@field illustrator string # Difficulty jacket illustrator
@ -11,19 +21,30 @@
---@field topBadge integer # `0 = Never Played`, `1 = Played`, `2 = Cleared`, `3 = Hard Cleared`, `4 = Full Chain`, `5 = Perfect Chain`
Difficulty = {};
---@class Song
---@field artist string # Chart artist
---@field difficulties Difficulty[] # Array of difficulties for the current song
---@field bpm number # 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
Song = {};
---@class Score
---@field auto_flags integer # Autoplay flag
---@field badge integer # `0` = Manual Exit, `1` = Played, `2` = Cleared, `3` = Hard Cleared, `4` = Full Chain, `5` = Perfect Chain
---@field combo integer # Longest combo
---@field earlies integer # Early hits
---@field gauge number # Ending gauge percentage, `0.0` to `1.0`
---@field gauge_option integer # Gauge option e.g. ARS
---@field gauge_type integer # `0` = Normal, `1` = Hard, `2` = Permissive, `3` = Blastive
---@field goods integer # Total near hits
---@field isLocal boolean # Whether this score was set locally
---@field lates integer # Late hits
---@field mirror integer # Mirror mode flag
---@field misses integer # Total errors
---@field perfects integer # Total critical hits
---@field playerName string # Player name
---@field random integer # Random mode flag
---@field score integer # Result score
---@field timestamp integer # Unix timestamp of the score
Score = {};
---@class songwheel
---@field allSongs Song[] # Array of all available songs
---@field searchInputActive boolean # Search status
---@field searchInputActive boolean # Whether the user is currently inputting search text
---@field searchStatus string # Current song database status
---@field searchText string # Search input text
---@field searchText string # Current string used by the song search
---@field songs Song[] # Array of songs with the current filters/sorting applied
songwheel = {};