From a6cda5980f8c7b9103253c31374427968f631357 Mon Sep 17 00:00:00 2001 From: Barinade Date: Fri, 10 Jul 2020 15:45:39 -0500 Subject: [PATCH 01/35] add snapshot recalculation for hovering purposes --- BGAnimations/ScreenEvaluation decorations/default.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/BGAnimations/ScreenEvaluation decorations/default.lua b/BGAnimations/ScreenEvaluation decorations/default.lua index 27f5fed5..ef13ccef 100644 --- a/BGAnimations/ScreenEvaluation decorations/default.lua +++ b/BGAnimations/ScreenEvaluation decorations/default.lua @@ -89,6 +89,7 @@ local function oldEvalStuff() } t[#t+1] = Def.ActorFrame { OffsetPlotModificationMessageCommand = function(self, params) + local tst = ms.JudgeScalers local rst = getRescoreElements(pss, pss:GetHighScore()) if params.Name == "PrevJudge" and judge > 1 then judge = judge - 1 @@ -106,6 +107,9 @@ local function oldEvalStuff() elseif params.Name ~= "ToggleHands" then self:GetParent():playcommand("SetJudge", params) end + if not tst[judge] then return end + tst = tst[judge] + SCREENMAN:GetTopScreen():SetPlayerStageStatsFromReplayData(SCREENMAN:GetTopScreen():GetStageStats():GetPlayerStageStats(PLAYER_1), tst) end } From 7447d02e6afa3cf339f6bed21cd78ac9f173d1c5 Mon Sep 17 00:00:00 2001 From: Barinade Date: Mon, 13 Jul 2020 17:52:35 -0500 Subject: [PATCH 02/35] remove dead sort orders --- .../ScreenSelectMusic overlay/currentsort.lua | 17 ----------------- .../net/currentsort.lua | 17 ----------------- 2 files changed, 34 deletions(-) diff --git a/BGAnimations/ScreenSelectMusic overlay/currentsort.lua b/BGAnimations/ScreenSelectMusic overlay/currentsort.lua index 963dad00..bae280f0 100644 --- a/BGAnimations/ScreenSelectMusic overlay/currentsort.lua +++ b/BGAnimations/ScreenSelectMusic overlay/currentsort.lua @@ -17,31 +17,14 @@ local goneOff = false local instantSearch = themeConfig:get_data().global.InstantSearch local sortTable = { - SortOrder_Preferred = 'Preferred', SortOrder_Group = 'Group', SortOrder_Title = 'Title', SortOrder_BPM = 'BPM', - SortOrder_Popularity = 'Popular', SortOrder_TopGrades = 'Grade', SortOrder_Artist = 'Artist', SortOrder_Genre = 'Genre', - SortOrder_BeginnerMeter = 'Beginner Meter', - SortOrder_EasyMeter = 'Easy Meter', - SortOrder_MediumMeter = 'Normal Meter', - SortOrder_HardMeter = 'Hard Meter', - SortOrder_ChallengeMeter = 'Insane Meter', - SortOrder_DoubleEasyMeter = 'Double Easy Meter', - SortOrder_DoubleMediumMeter = 'Double Normal Meter', - SortOrder_DoubleHardMeter = 'Double Hard Meter', - SortOrder_DoubleChallengeMeter = 'Double Insane Meter', SortOrder_ModeMenu = 'Mode Menu', - SortOrder_AllCourses = 'All Courses', - SortOrder_Nonstop = 'Nonstop', - SortOrder_Oni = 'Oni', - SortOrder_Endless = 'Endless', SortOrder_Length = 'Song Length', - SortOrder_Roulette = 'Roulette', - SortOrder_Recent = 'Recently Played', SortOrder_Favorites = 'Favorites', SortOrder_Overall = 'Overall Rating', SortOrder_Stream = 'Stream Rating', diff --git a/BGAnimations/ScreenSelectMusic overlay/net/currentsort.lua b/BGAnimations/ScreenSelectMusic overlay/net/currentsort.lua index 062bfbf9..32ba852a 100644 --- a/BGAnimations/ScreenSelectMusic overlay/net/currentsort.lua +++ b/BGAnimations/ScreenSelectMusic overlay/net/currentsort.lua @@ -17,31 +17,14 @@ local goneOff = false local instantSearch = themeConfig:get_data().global.InstantSearch local sortTable = { - SortOrder_Preferred = 'Preferred', SortOrder_Group = 'Group', SortOrder_Title = 'Title', SortOrder_BPM = 'BPM', - SortOrder_Popularity = 'Popular', SortOrder_TopGrades = 'Grade', SortOrder_Artist = 'Artist', SortOrder_Genre = 'Genre', - SortOrder_BeginnerMeter = 'Beginner Meter', - SortOrder_EasyMeter = 'Easy Meter', - SortOrder_MediumMeter = 'Normal Meter', - SortOrder_HardMeter = 'Hard Meter', - SortOrder_ChallengeMeter = 'Insane Meter', - SortOrder_DoubleEasyMeter = 'Double Easy Meter', - SortOrder_DoubleMediumMeter = 'Double Normal Meter', - SortOrder_DoubleHardMeter = 'Double Hard Meter', - SortOrder_DoubleChallengeMeter = 'Double Insane Meter', SortOrder_ModeMenu = 'Mode Menu', - SortOrder_AllCourses = 'All Courses', - SortOrder_Nonstop = 'Nonstop', - SortOrder_Oni = 'Oni', - SortOrder_Endless = 'Endless', SortOrder_Length = 'Song Length', - SortOrder_Roulette = 'Roulette', - SortOrder_Recent = 'Recently Played', SortOrder_Favorites = 'Favorites', SortOrder_Overall = 'Overall Rating', SortOrder_Stream = 'Stream Rating', From 4cc0c49aeab09a1cfbead2c5bf1a4b4a5e222b4d Mon Sep 17 00:00:00 2001 From: Barinade Date: Mon, 13 Jul 2020 19:19:17 -0500 Subject: [PATCH 03/35] remove playmode --- Scripts/02 BranchOverrides.lua | 11 ++--------- metrics.ini | 2 +- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/Scripts/02 BranchOverrides.lua b/Scripts/02 BranchOverrides.lua index 2dc3ea9f..86b856a5 100644 --- a/Scripts/02 BranchOverrides.lua +++ b/Scripts/02 BranchOverrides.lua @@ -14,16 +14,9 @@ function SMOnlineScreen() end Branch.PlayerOptions= function() - local pm = GAMESTATE:GetPlayMode() - local restricted = { PlayMode_Oni= true, PlayMode_Rave= true, - --"PlayMode_Battle" -- ?? - } - local optionsScreen = "ScreenPlayerOptions" - if restricted[pm] then - optionsScreen = "ScreenPlayerOptionsRestricted" - end + if SCREENMAN:GetTopScreen():GetGoToOptions() then - return optionsScreen + return "ScreenPlayerOptions" else return "ScreenStageInformation" end diff --git a/metrics.ini b/metrics.ini index 6ac80c49..02d31b15 100644 --- a/metrics.ini +++ b/metrics.ini @@ -39,7 +39,7 @@ TimerSeconds=-1 LoadEdits=true ChoiceEasy= -ChoiceNormal="applydefaultoptions;name,Normal;text,Normal;playmode,regular;difficulty,easy;screen,ScreenSelectMusic;setenv,sMode,Normal" +ChoiceNormal="applydefaultoptions;name,Normal;text,Normal;difficulty,easy;screen,ScreenSelectMusic;setenv,sMode,Normal" ChoiceHard= ChoiceRave= ChoiceNonstop= From 15eff6854e0d740eb5d304c48169db38f1d0d20c Mon Sep 17 00:00:00 2001 From: Barinade Date: Wed, 23 Sep 2020 15:14:50 -0500 Subject: [PATCH 04/35] fix some stuff related to pack downloads and queueing basically queued downloads reset status and became invisible --- .../ScreenDownload overlay/default.lua | 38 +++++++++++++------ 1 file changed, 27 insertions(+), 11 deletions(-) diff --git a/BGAnimations/ScreenDownload overlay/default.lua b/BGAnimations/ScreenDownload overlay/default.lua index 2429670d..eb79e266 100644 --- a/BGAnimations/ScreenDownload overlay/default.lua +++ b/BGAnimations/ScreenDownload overlay/default.lua @@ -144,10 +144,17 @@ local function input(event) end local downloading = DLMAN:GetDownloadingPacks() +local queued = DLMAN:GetQueuedPacks() local function update(self, delta) + downloading = DLMAN:GetDownloadingPacks() + queued = DLMAN:GetQueuedPacks() for _,pack in ipairs(downloading) do local download = pack:GetDownload() - self:GetChild("PackList"):playcommand("DownloadStatus", {pack = pack, download = download}) + self:GetChild("PackList"):playcommand("DownloadStatus", {pack = pack, download = download, queued = false}) + end + for _,pack in ipairs(queued) do + local download = pack:GetDownload() + self:GetChild("PackList"):playcommand("DownloadStatus", {pack = pack, download = download, queued = true}) end end @@ -424,6 +431,7 @@ local function packList() DFRFinishedMessageCommand = function(self) -- Download Finished, a Diff Reload happens (forced by the game) refreshInstalledPacks() downloading = DLMAN:GetDownloadingPacks() + queued = DLMAN:GetQueuedPacks() MESSAGEMAN:Broadcast("UpdateList") end, } @@ -611,17 +619,21 @@ local function packList() end end, DownloadStatusCommand = function(self, params) -- Download status update from updatefunction - if not params.download then + if not params.download and not params.queued then return end - if params.pack == packlist[packIndex] then - download = params.download - - self:GetChild("Status"):diffuse(color(colorConfig:get_data().downloadStatus.downloading)):diffusealpha(0.8) - self:GetChild("ProgressBar"):diffuse(color(colorConfig:get_data().downloadStatus.downloading)):diffusealpha(0.2) - self:GetChild("Size"):settextf("Downloading %5.2f MB / %5.2f MB", download:GetKBDownloaded()/1048576, download:GetTotalKB()/1048576) - self:GetChild("ProgressBar"):zoomx(download:GetKBDownloaded()/download:GetTotalKB()*packItemWidth) + if params.queued then + self:GetChild("Status"):diffuse(color(colorConfig:get_data().downloadStatus.downloading)):diffusealpha(0.8) + self:GetChild("ProgressBar"):diffuse(color(colorConfig:get_data().downloadStatus.downloading)):diffusealpha(0.2) + self:GetChild("ProgressBar"):zoomx(0) + else + download = params.download + self:GetChild("Status"):diffuse(color(colorConfig:get_data().downloadStatus.downloading)):diffusealpha(0.8) + self:GetChild("ProgressBar"):diffuse(color(colorConfig:get_data().downloadStatus.downloading)):diffusealpha(0.2) + self:GetChild("Size"):settextf("Downloading %5.2f MB / %5.2f MB", download:GetKBDownloaded()/1048576, download:GetTotalKB()/1048576) + self:GetChild("ProgressBar"):zoomx(download:GetKBDownloaded()/download:GetTotalKB()*packItemWidth) + end end end, StartDownloadCommand = function(self) -- Start download @@ -631,6 +643,7 @@ local function packList() end download = packlist[packIndex]:DownloadAndInstall() downloading = DLMAN:GetDownloadingPacks() + queued = DLMAN:GetQueuedPacks() if not packExists(packlist[packIndex]:GetName()) then self:GetChild("Status"):diffuse(color(colorConfig:get_data().downloadStatus.downloading)):diffusealpha(0.8) self:GetChild("ProgressBar"):diffuse(color(colorConfig:get_data().downloadStatus.downloading)):diffusealpha(0.2) @@ -639,13 +652,16 @@ local function packList() StopDownloadCommand = function(self) -- Stop download download:Stop() downloading = DLMAN:GetDownloadingPacks() + queued = DLMAN:GetQueuedPacks() end, PackDownloadedMessageCommand = function(self, params) -- Download Stopped/Finished downloading = DLMAN:GetDownloadingPacks() + queued = DLMAN:GetQueuedPacks() end, DownloadFailedMessageCommand = function(self, params) -- Download Failed if packlist[packIndex] ~= nil and packlist[packIndex]:GetName() == params.pack:GetName() then downloading = DLMAN:GetDownloadingPacks() + queued = DLMAN:GetQueuedPacks() self:GetChild("Status"):playcommand("Set") self:GetChild("ProgressBar"):diffuse(color(colorConfig:get_data().downloadStatus.available)):diffusealpha(0.2) self:GetChild("Size"):settextf("Download Failed or Cancelled") @@ -689,9 +705,9 @@ local function packList() self:zoomto(packItemWidth, packItemHeight) end, MouseDownCommand = function(self) - if packlist[packIndex] ~= nil and packlist[packIndex]:IsDownloading() then -- IsDownloading() returns the wrong boolean for some reason. + if packlist[packIndex] ~= nil and packlist[packIndex]:IsDownloading() and not packlist[packIndex]:IsQueued() then -- IsDownloading() returns the wrong boolean for some reason. self:GetParent():playcommand("StartDownload") - elseif packlist[packIndex] ~= nil then + elseif packlist[packIndex] ~= nil and not packlist[packIndex]:IsQueued() then self:GetParent():playcommand("StopDownload") end From 96a24a0b9678c896fcda46c276f5856abe803843 Mon Sep 17 00:00:00 2001 From: Barinade Date: Wed, 23 Sep 2020 15:22:57 -0500 Subject: [PATCH 05/35] allow removing downloads from queue --- BGAnimations/ScreenDownload overlay/default.lua | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/BGAnimations/ScreenDownload overlay/default.lua b/BGAnimations/ScreenDownload overlay/default.lua index eb79e266..c6a2f21b 100644 --- a/BGAnimations/ScreenDownload overlay/default.lua +++ b/BGAnimations/ScreenDownload overlay/default.lua @@ -650,9 +650,18 @@ local function packList() end end, StopDownloadCommand = function(self) -- Stop download - download:Stop() - downloading = DLMAN:GetDownloadingPacks() - queued = DLMAN:GetQueuedPacks() + if packlist[packIndex]:IsQueued() then + local success = packlist[packIndex]:RemoveFromQueue() + if success then + self:GetChild("Status"):playcommand("Set") + self:GetChild("ProgressBar"):diffuse(color(colorConfig:get_data().downloadStatus.available)):diffusealpha(0.2) + self:GetChild("Size"):settextf("Download Removed from Queue") + end + else + download:Stop() + downloading = DLMAN:GetDownloadingPacks() + queued = DLMAN:GetQueuedPacks() + end end, PackDownloadedMessageCommand = function(self, params) -- Download Stopped/Finished downloading = DLMAN:GetDownloadingPacks() @@ -707,7 +716,7 @@ local function packList() MouseDownCommand = function(self) if packlist[packIndex] ~= nil and packlist[packIndex]:IsDownloading() and not packlist[packIndex]:IsQueued() then -- IsDownloading() returns the wrong boolean for some reason. self:GetParent():playcommand("StartDownload") - elseif packlist[packIndex] ~= nil and not packlist[packIndex]:IsQueued() then + elseif packlist[packIndex] ~= nil then self:GetParent():playcommand("StopDownload") end From fd05218483df0c450e979231c1b12ae8943fa701 Mon Sep 17 00:00:00 2001 From: Barinade Date: Wed, 23 Sep 2020 15:25:00 -0500 Subject: [PATCH 06/35] remove redundant pack download/queue list resets --- BGAnimations/ScreenDownload overlay/default.lua | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/BGAnimations/ScreenDownload overlay/default.lua b/BGAnimations/ScreenDownload overlay/default.lua index c6a2f21b..0cea96aa 100644 --- a/BGAnimations/ScreenDownload overlay/default.lua +++ b/BGAnimations/ScreenDownload overlay/default.lua @@ -2,7 +2,6 @@ local top local initpacklist = PackList:new() local packlist = initpacklist:GetPackTable() -local downloading = DLMAN:GetDownloadingPacks() -- make lookup table for installed packs local installedPacks = {} @@ -430,8 +429,6 @@ local function packList() end, DFRFinishedMessageCommand = function(self) -- Download Finished, a Diff Reload happens (forced by the game) refreshInstalledPacks() - downloading = DLMAN:GetDownloadingPacks() - queued = DLMAN:GetQueuedPacks() MESSAGEMAN:Broadcast("UpdateList") end, } @@ -642,8 +639,6 @@ local function packList() return end download = packlist[packIndex]:DownloadAndInstall() - downloading = DLMAN:GetDownloadingPacks() - queued = DLMAN:GetQueuedPacks() if not packExists(packlist[packIndex]:GetName()) then self:GetChild("Status"):diffuse(color(colorConfig:get_data().downloadStatus.downloading)):diffusealpha(0.8) self:GetChild("ProgressBar"):diffuse(color(colorConfig:get_data().downloadStatus.downloading)):diffusealpha(0.2) @@ -659,18 +654,13 @@ local function packList() end else download:Stop() - downloading = DLMAN:GetDownloadingPacks() - queued = DLMAN:GetQueuedPacks() end end, PackDownloadedMessageCommand = function(self, params) -- Download Stopped/Finished - downloading = DLMAN:GetDownloadingPacks() - queued = DLMAN:GetQueuedPacks() + -- nothing? end, DownloadFailedMessageCommand = function(self, params) -- Download Failed if packlist[packIndex] ~= nil and packlist[packIndex]:GetName() == params.pack:GetName() then - downloading = DLMAN:GetDownloadingPacks() - queued = DLMAN:GetQueuedPacks() self:GetChild("Status"):playcommand("Set") self:GetChild("ProgressBar"):diffuse(color(colorConfig:get_data().downloadStatus.available)):diffusealpha(0.2) self:GetChild("Size"):settextf("Download Failed or Cancelled") From 39f6f31f5374dae77c4151dea2cf0c4a3c5ca9f9 Mon Sep 17 00:00:00 2001 From: Barinade Date: Wed, 23 Sep 2020 15:27:19 -0500 Subject: [PATCH 07/35] iterate version --- Scripts/00 ThemeInfo.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Scripts/00 ThemeInfo.lua b/Scripts/00 ThemeInfo.lua index 04aa433f..44cdb986 100644 --- a/Scripts/00 ThemeInfo.lua +++ b/Scripts/00 ThemeInfo.lua @@ -1,9 +1,9 @@ -- theme identification file themeInfo = { - Name = "spawncamping-wallhack (etterna .70.1)", - Version = "2.2.5", -- a.b.c, a for complete overhauls, b for major releases, c for minor additions/bugfix. - Date = "20200709", + Name = "spawncamping-wallhack (etterna .71.0)", + Version = "2.2.6", -- a.b.c, a for complete overhauls, b for major releases, c for minor additions/bugfix. + Date = "20200923", } function getThemeName() From 09c7a8ae7b4840b115789bfd105e909584a63427 Mon Sep 17 00:00:00 2001 From: Barinade Date: Wed, 23 Sep 2020 16:16:41 -0500 Subject: [PATCH 08/35] fix permamirror not turning off mirror when you dont need it ???? --- BGAnimations/ScreenSelectMusic overlay/default.lua | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/BGAnimations/ScreenSelectMusic overlay/default.lua b/BGAnimations/ScreenSelectMusic overlay/default.lua index f9af992b..1223082d 100644 --- a/BGAnimations/ScreenSelectMusic overlay/default.lua +++ b/BGAnimations/ScreenSelectMusic overlay/default.lua @@ -45,6 +45,13 @@ local t = Def.ActorFrame{ SCREENMAN:GetTopScreen():PlayReplay(replayScore) end end, + CurrentSongChangedMessageCommand = function(self) + if profile:IsCurrentChartPermamirror() then + local modslevel = "ModsLevel_Preferred" + local playeroptions = GAMESTATE:GetPlayerState(PLAYER_1):GetPlayerOptions(modslevel) + playeroptions:Mirror(false) + end + end, PlayingSampleMusicMessageCommand = function(self) local leaderboardEnabled = From 4cc7ec8c0f900bb6db68f08733cbbddcfda6ba13 Mon Sep 17 00:00:00 2001 From: casey2069 Date: Fri, 9 Oct 2020 09:28:58 -0700 Subject: [PATCH 09/35] Update Quotes.lua (#3) added a funny post i saw on discord --- Scripts/Quotes.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/Scripts/Quotes.lua b/Scripts/Quotes.lua index 89c88dc0..5ce3f825 100644 --- a/Scripts/Quotes.lua +++ b/Scripts/Quotes.lua @@ -314,6 +314,7 @@ local Phrases = { "when you already pine nutted but she keep on gengaozo_succin", -- riktoi "wow -- this map -- is very -- ssibal", --jakads https://osu.ppy.sh/b/823842?m=3 "The only mark you will leave on this world is your utterly insignificant carbon footprint. Your entire life will be obsoleted by a handful of cattle in wyoming and undone by a few fucking square meters of shrubbery in scotland.", -- mina + "kudzu how about you give me your address and i'll fly over and uninstall your worthless ass from this earth", -- mina "THIS IS NOT GOOBYE", -- Beatcraft cyclone "REMINDER THERE IS GIRLISH CAFE FOR O!M", -- ggsnipes "guilmon digivolves too Guilhermeziatomon", From 64c17f478988be6a12cf60d618595837bfc48b39 Mon Sep 17 00:00:00 2001 From: Barinade Date: Thu, 12 Nov 2020 16:40:10 -0600 Subject: [PATCH 10/35] update eval chart leaderboard handling for nil leaderboards update for unranked charts specifically lazy to update text, but ... eh --- .../ScreenEvaluation decorations/default.lua | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/BGAnimations/ScreenEvaluation decorations/default.lua b/BGAnimations/ScreenEvaluation decorations/default.lua index ef13ccef..9fd1b3d1 100644 --- a/BGAnimations/ScreenEvaluation decorations/default.lua +++ b/BGAnimations/ScreenEvaluation decorations/default.lua @@ -1367,7 +1367,7 @@ local function oldEvalStuff() scoreList = getScoreTable(player, getCurRate()) else scoreList = DLMAN:GetChartLeaderBoard(steps:GetChartKey(), currentCountry) - if #scoreList == 0 and not alreadyPulled then + if scoreList ~= nil and #scoreList == 0 and not alreadyPulled then updateLeaderBoardForCurrentChart() end end @@ -1377,9 +1377,9 @@ local function oldEvalStuff() else maxPages = 1 end - if isLocal or #scoreList ~= 0 then + if isLocal or (scoreList ~= nil and #scoreList ~= 0) then self:queuecommand("Set") - elseif #scoreList == 0 then + elseif scoreList == nil or #scoreList == 0 then self:queuecommand("ListEmpty") end @@ -1484,11 +1484,12 @@ local function oldEvalStuff() self:diffusealpha(0) end, UpdateListMessageCommand = function(self) - local scoresOnThisPage = math.abs((curPage-1) * scoresPerPage + 1 - math.min((curPage) * scoresPerPage,#scoreList)) - if #scoreList == 0 then + if scoreList == nil or #scoreList == 0 then self:diffusealpha(0) return end + + local scoresOnThisPage = math.abs((curPage-1) * scoresPerPage + 1 - math.min((curPage) * scoresPerPage,#scoreList)) self:stoptweening() self:diffusealpha(0) self:y((scoreItemHeight) * (scoresOnThisPage+1) + (scoreItemSpacing*scoresOnThisPage) + scoreItemY - 8) @@ -1515,11 +1516,12 @@ local function oldEvalStuff() self:xy(scoreItemX + scoreItemWidth + 10 + (frameWidth - scoreItemWidth - scoreItemX - 20)/2, (scoreItemHeight + scoreItemSpacing + 1) * scoresPerPage + scoreItemY) end, UpdateListMessageCommand = function(self) - local scoresOnThisPage = math.abs((curPage-1) * scoresPerPage + 1 - math.min((curPage) * scoresPerPage,#scoreList)) - if #scoreList == 0 then + if scoreList == nil or #scoreList == 0 then self:diffusealpha(0) return end + + local scoresOnThisPage = math.abs((curPage-1) * scoresPerPage + 1 - math.min((curPage) * scoresPerPage,#scoreList)) self:stoptweening() self:diffusealpha(0) self:y((scoreItemHeight) * (scoresOnThisPage+1) + (scoreItemSpacing*scoresOnThisPage) + scoreItemY - 8) @@ -1887,12 +1889,14 @@ local function oldEvalStuff() end, UpdateScoresMessageCommand = function(self) scoreIndex = (curPage - 1) * scoresPerPage + i - if scoreList[scoreIndex] ~= nil then + if scoreList ~= nil and scoreList[scoreIndex] ~= nil then self:playcommand("Show") else self:playcommand("Hide") end - self:RunCommandsOnChildren(function(self) self:playcommand("Set") end) + if scoreList ~= nil then + self:RunCommandsOnChildren(function(self) self:playcommand("Set") end) + end end } From de6102371f2b5bf2c46c9f513365908d1d9570ca Mon Sep 17 00:00:00 2001 From: Barinade Date: Fri, 27 Nov 2020 02:40:52 -0600 Subject: [PATCH 11/35] Fix Good CB not triggering CBHighlights --- Graphics/Notefield board.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Graphics/Notefield board.lua b/Graphics/Notefield board.lua index 27149b1f..0eba0e1a 100644 --- a/Graphics/Notefield board.lua +++ b/Graphics/Notefield board.lua @@ -65,7 +65,7 @@ local function LaneHighlight() if params.TapNoteScore then local enum = Enum.Reverse(TapNoteScore)[params.TapNoteScore] - if enum < judgeThreshold and enum > 3 and + if enum <= judgeThreshold and enum > 3 and i == firstTrack then self:stoptweening() From 5cee8f5448bcf64bf4fd7f3e3aceba0816df80ae Mon Sep 17 00:00:00 2001 From: Barinade Date: Tue, 12 Jan 2021 17:58:17 -0600 Subject: [PATCH 12/35] fix gameplay progress bar being incorrectly timed --- .../ScreenGameplay overlay/progressbar.lua | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/BGAnimations/ScreenGameplay overlay/progressbar.lua b/BGAnimations/ScreenGameplay overlay/progressbar.lua index 2961bb0d..c4ac1beb 100644 --- a/BGAnimations/ScreenGameplay overlay/progressbar.lua +++ b/BGAnimations/ScreenGameplay overlay/progressbar.lua @@ -78,12 +78,14 @@ t[#t+1] = LoadFont("Common Normal") .. { -- Returns the %of song played from 0~1. local function getMusicProgress() - local rate = GAMESTATE:GetSongOptionsObject('ModsLevel_Preferred'):MusicRate() - local songLength = GAMESTATE:GetCurrentSong():GetStepsSeconds() - local songPosition = GAMESTATE:GetSongPosition():GetMusicSeconds() - songPosition = songPosition/rate - songLength = math.max(1,songLength/rate) - return math.min(1,math.max(0,songPosition/songLength)) + local ritenow = GAMESTATE:GetSongPosition():GetMusicSeconds() / getCurRateValue() + -- left half doesnt account for rate so we have to divide + -- but the right half does so we dont have to divide + -- this is really dumb + -- it works + local lastsecFORREAL = (GAMESTATE:GetCurrentSong():GetFirstSecond() / getCurRateValue() + GAMESTATE:GetCurrentSteps():GetLengthSeconds()) + local percentage = ritenow / lastsecFORREAL + return math.min(1,math.max(0,percentage)) end local function getCurrentTime() From 69d88ef73d667fb596401df58f2a76f44a120465 Mon Sep 17 00:00:00 2001 From: Barinade Date: Tue, 26 Jan 2021 00:04:48 -0600 Subject: [PATCH 13/35] Remove PlayerNumber usage from gamestate getcurrentsteps no longer needed --- .../ScreenChartLeaderboard overlay/default.lua | 2 +- BGAnimations/ScreenChartPreview overlay/default.lua | 4 ++-- .../ScreenEvaluation decorations/MPscoreboard.lua | 2 +- BGAnimations/ScreenEvaluation decorations/default.lua | 10 +++++----- BGAnimations/ScreenEvaluation overlay/default.lua | 2 +- BGAnimations/ScreenFileTagManager overlay/default.lua | 2 +- .../ScreenGameplay overlay/WifeJudgmentSpotting.lua | 2 +- BGAnimations/ScreenGameplay overlay/avatar.lua | 4 ++-- BGAnimations/ScreenGameplay overlay/default.lua | 2 +- BGAnimations/ScreenGameplay overlay/lanecover.lua | 2 +- BGAnimations/ScreenGameplay overlay/leaderboard.lua | 2 +- BGAnimations/ScreenMusicInfo overlay/default.lua | 2 +- BGAnimations/ScreenMusicInfo overlay/stepsinfo.lua | 2 +- .../ScreenNetChartLeaderboard overlay/default.lua | 2 +- BGAnimations/ScreenNetMusicInfo overlay/default.lua | 2 +- BGAnimations/ScreenNetMusicInfo overlay/stepsinfo.lua | 2 +- BGAnimations/ScreenPlaylistInfo overlay/default.lua | 2 +- BGAnimations/ScreenSelectMusic overlay/default.lua | 4 ++-- .../ScreenSelectMusic overlay/net/profilecard.lua | 2 +- BGAnimations/ScreenSelectMusic overlay/profilecard.lua | 2 +- BGAnimations/_gameplaydensitygraph.lua | 2 +- Graphics/OffsetGraph.lua | 4 ++-- Scripts/Scores.lua | 6 +++--- 23 files changed, 33 insertions(+), 33 deletions(-) diff --git a/BGAnimations/ScreenChartLeaderboard overlay/default.lua b/BGAnimations/ScreenChartLeaderboard overlay/default.lua index 1039104b..83fed4bb 100644 --- a/BGAnimations/ScreenChartLeaderboard overlay/default.lua +++ b/BGAnimations/ScreenChartLeaderboard overlay/default.lua @@ -1,6 +1,6 @@ local pn = GAMESTATE:GetEnabledPlayers()[1] local song = GAMESTATE:GetCurrentSong() -local steps = GAMESTATE:GetCurrentSteps(pn) +local steps = GAMESTATE:GetCurrentSteps() local stepsType = steps:GetStepsType() local scoreList = {} diff --git a/BGAnimations/ScreenChartPreview overlay/default.lua b/BGAnimations/ScreenChartPreview overlay/default.lua index 7025f5c7..607dbe3c 100644 --- a/BGAnimations/ScreenChartPreview overlay/default.lua +++ b/BGAnimations/ScreenChartPreview overlay/default.lua @@ -1,6 +1,6 @@ local pn = GAMESTATE:GetEnabledPlayers()[1] local song = GAMESTATE:GetCurrentSong() -local steps = GAMESTATE:GetCurrentSteps(pn) +local steps = GAMESTATE:GetCurrentSteps() local stepsType = steps:GetStepsType() local usingreverse = GAMESTATE:GetPlayerState(PLAYER_1):GetCurrentPlayerOptions():UsingReverse() @@ -653,7 +653,7 @@ t[#t+1] = Def.ActorFrame { end end, GraphUpdateCommand = function(self) - steps = GAMESTATE:GetCurrentSteps(PLAYER_1) + steps = GAMESTATE:GetCurrentSteps() if steps then local nColumns = steps:GetNumColumns() local rate = math.max(1, getCurRateValue()) diff --git a/BGAnimations/ScreenEvaluation decorations/MPscoreboard.lua b/BGAnimations/ScreenEvaluation decorations/MPscoreboard.lua index 4ae6b75b..6331269c 100644 --- a/BGAnimations/ScreenEvaluation decorations/MPscoreboard.lua +++ b/BGAnimations/ScreenEvaluation decorations/MPscoreboard.lua @@ -3,7 +3,7 @@ local frameWidth = capWideScale(160, 260) local framex = SCREEN_WIDTH-frameWidth-WideScale(get43size(40),40)/2 local framey = 110 local spacing = 34 -local steps = GAMESTATE:GetCurrentSteps(PLAYER_1) +local steps = GAMESTATE:GetCurrentSteps() --Input event for mouse clicks local function input(event) diff --git a/BGAnimations/ScreenEvaluation decorations/default.lua b/BGAnimations/ScreenEvaluation decorations/default.lua index 9fd1b3d1..340ab555 100644 --- a/BGAnimations/ScreenEvaluation decorations/default.lua +++ b/BGAnimations/ScreenEvaluation decorations/default.lua @@ -1,6 +1,6 @@ local song = GAMESTATE:GetCurrentSong() local pss = STATSMAN:GetCurStageStats():GetPlayerStageStats(PLAYER_1) -local steps = GAMESTATE:GetCurrentSteps(pn) +local steps = GAMESTATE:GetCurrentSteps() --ScoreBoard local judges = {'TapNoteScore_W1','TapNoteScore_W2','TapNoteScore_W3','TapNoteScore_W4','TapNoteScore_W5','TapNoteScore_Miss'} @@ -407,7 +407,7 @@ local function oldEvalStuff() local tst = ms.JudgeScalers local tso = tst[judge] - local ncol = GAMESTATE:GetCurrentSteps(PLAYER_1):GetNumColumns() - 1 + local ncol = GAMESTATE:GetCurrentSteps():GetNumColumns() - 1 local middleCol = ncol / 2 local function recountCBs() tso = tst[judge] @@ -2206,7 +2206,7 @@ local function offsetStuff() local pn = GAMESTATE:GetEnabledPlayers()[1] local pss = STATSMAN:GetCurStageStats():GetPlayerStageStats(pn) - local steps = GAMESTATE:GetCurrentSteps(pn) + local steps = GAMESTATE:GetCurrentSteps() self:RunCommandsOnChildren(function(self) local params = {width = offsetParamWidth, @@ -2411,7 +2411,7 @@ local function newEvalStuff() local tst = ms.JudgeScalers local tso = tst[judge] - local ncol = GAMESTATE:GetCurrentSteps(PLAYER_1):GetNumColumns() - 1 + local ncol = GAMESTATE:GetCurrentSteps():GetNumColumns() - 1 local middleCol = ncol / 2 local function recountCBs() cbl = 0 @@ -2756,7 +2756,7 @@ local function newEvalStuff() self:halign(0):valign(1) self:xy(-frameWidth/2 + edgeTextSpacing2, upperDivider1Y - dividerHeight/2 - 3) self:zoom(msdTextScale) - local msd = GAMESTATE:GetCurrentSteps(PLAYER_1):GetMSD(getCurRateValue(), 1) + local msd = GAMESTATE:GetCurrentSteps():GetMSD(getCurRateValue(), 1) self:settextf("%5.2f", msd) self:diffuse(byMSD(msd)) end diff --git a/BGAnimations/ScreenEvaluation overlay/default.lua b/BGAnimations/ScreenEvaluation overlay/default.lua index 95152e33..63ff9720 100644 --- a/BGAnimations/ScreenEvaluation overlay/default.lua +++ b/BGAnimations/ScreenEvaluation overlay/default.lua @@ -1,7 +1,7 @@ local t = Def.ActorFrame{} local pn = GAMESTATE:GetEnabledPlayers()[1] local profile = GetPlayerOrMachineProfile(pn) -local steps = GAMESTATE:GetCurrentSteps(pn) +local steps = GAMESTATE:GetCurrentSteps() t[#t+1] = LoadActor("../_frame") diff --git a/BGAnimations/ScreenFileTagManager overlay/default.lua b/BGAnimations/ScreenFileTagManager overlay/default.lua index 8d4ed871..7e805101 100644 --- a/BGAnimations/ScreenFileTagManager overlay/default.lua +++ b/BGAnimations/ScreenFileTagManager overlay/default.lua @@ -5,7 +5,7 @@ local ptags = tags:get_data().playerTags local playertags = {} local filterTags = GHETTOGAMESTATE:getFilterTags() local tagName -local steps = GAMESTATE:GetCurrentSteps(PLAYER_1) +local steps = GAMESTATE:GetCurrentSteps() local ck = steps:GetChartKey() local song = GAMESTATE:GetCurrentSong() diff --git a/BGAnimations/ScreenGameplay overlay/WifeJudgmentSpotting.lua b/BGAnimations/ScreenGameplay overlay/WifeJudgmentSpotting.lua index d4867fcb..abf4db0a 100644 --- a/BGAnimations/ScreenGameplay overlay/WifeJudgmentSpotting.lua +++ b/BGAnimations/ScreenGameplay overlay/WifeJudgmentSpotting.lua @@ -181,7 +181,7 @@ local t = string.gsub(getCurRateDisplayString(), "Music", "") .. " [" .. GAMESTATE:GetCurrentSong():GetGroupName() .. "]" -- truncated to 128 characters(discord hard limit) detail = #detail < 128 and detail or string.sub(detail, 1, 124) .. "..." - local state = "MSD: " .. string.format("%05.2f", GAMESTATE:GetCurrentSteps(PLAYER_1):GetMSD(getCurRateValue(), 1)) + local state = "MSD: " .. string.format("%05.2f", GAMESTATE:GetCurrentSteps():GetMSD(getCurRateValue(), 1)) local endTime = os.time() + GetPlayableTime() GAMESTATE:UpdateDiscordPresence(largeImageTooltip, detail, state, endTime) diff --git a/BGAnimations/ScreenGameplay overlay/avatar.lua b/BGAnimations/ScreenGameplay overlay/avatar.lua index eaed8f20..cad34a07 100644 --- a/BGAnimations/ScreenGameplay overlay/avatar.lua +++ b/BGAnimations/ScreenGameplay overlay/avatar.lua @@ -45,7 +45,7 @@ if fullPlayerInfo then self:queuecommand('Set') end, SetCommand=function(self) - local steps = GAMESTATE:GetCurrentSteps(PLAYER_1) + local steps = GAMESTATE:GetCurrentSteps() local diff = steps:GetDifficulty() self:diffuse(color("#000000")) self:diffusealpha(0.8) @@ -101,7 +101,7 @@ if fullPlayerInfo then end, BeginCommand = function(self) self:queuecommand('Set') end, SetCommand=function(self) - local steps = GAMESTATE:GetCurrentSteps(PLAYER_1) + local steps = GAMESTATE:GetCurrentSteps() local diff = getDifficulty(steps:GetDifficulty()) local meter = steps:GetMSD(getCurRateValue(),1) meter = meter == 0 and steps:GetMeter() or meter diff --git a/BGAnimations/ScreenGameplay overlay/default.lua b/BGAnimations/ScreenGameplay overlay/default.lua index dc6f0839..368b0d8a 100644 --- a/BGAnimations/ScreenGameplay overlay/default.lua +++ b/BGAnimations/ScreenGameplay overlay/default.lua @@ -6,7 +6,7 @@ local t = Def.ActorFrame {} local pn = GAMESTATE:GetEnabledPlayers()[1] local profile = GetPlayerOrMachineProfile(pn) -local steps = GAMESTATE:GetCurrentSteps(pn) +local steps = GAMESTATE:GetCurrentSteps() t[#t+1] = LoadActor("scoretracking") diff --git a/BGAnimations/ScreenGameplay overlay/lanecover.lua b/BGAnimations/ScreenGameplay overlay/lanecover.lua index a590cbf7..4b3d26ab 100644 --- a/BGAnimations/ScreenGameplay overlay/lanecover.lua +++ b/BGAnimations/ScreenGameplay overlay/lanecover.lua @@ -47,7 +47,7 @@ end local function getMaxDisplayBPM(pn) local pn = GAMESTATE:GetMasterPlayerNumber() local song = GAMESTATE:GetCurrentSong() - local steps = GAMESTATE:GetCurrentSteps(pn) + local steps = GAMESTATE:GetCurrentSteps() if steps:GetDisplayBPMType() ~= "DisplayBPM_Random" then return steps:GetDisplayBpms()[2] else diff --git a/BGAnimations/ScreenGameplay overlay/leaderboard.lua b/BGAnimations/ScreenGameplay overlay/leaderboard.lua index 67a6f608..629e07ec 100644 --- a/BGAnimations/ScreenGameplay overlay/leaderboard.lua +++ b/BGAnimations/ScreenGameplay overlay/leaderboard.lua @@ -88,7 +88,7 @@ if isMulti then onlineScores[i] = scoreUsingMultiScore(i) end else - onlineScores = DLMAN:GetChartLeaderBoard(GAMESTATE:GetCurrentSteps(PLAYER_1):GetChartKey()) + onlineScores = DLMAN:GetChartLeaderBoard(GAMESTATE:GetCurrentSteps():GetChartKey()) end -- how to use table.sort() diff --git a/BGAnimations/ScreenMusicInfo overlay/default.lua b/BGAnimations/ScreenMusicInfo overlay/default.lua index 833bc2fe..fed4eca7 100644 --- a/BGAnimations/ScreenMusicInfo overlay/default.lua +++ b/BGAnimations/ScreenMusicInfo overlay/default.lua @@ -1,6 +1,6 @@ local pn = GAMESTATE:GetEnabledPlayers()[1] local song = GAMESTATE:GetCurrentSong() -local steps = GAMESTATE:GetCurrentSteps(pn) +local steps = GAMESTATE:GetCurrentSteps() local stepsType = steps:GetStepsType() local scoreList = {} diff --git a/BGAnimations/ScreenMusicInfo overlay/stepsinfo.lua b/BGAnimations/ScreenMusicInfo overlay/stepsinfo.lua index 941ee166..13ff7c04 100644 --- a/BGAnimations/ScreenMusicInfo overlay/stepsinfo.lua +++ b/BGAnimations/ScreenMusicInfo overlay/stepsinfo.lua @@ -6,7 +6,7 @@ local frameHeight = 60 local pn = GAMESTATE:GetEnabledPlayers()[1] local song = GAMESTATE:GetCurrentSong() -local steps = GAMESTATE:GetCurrentSteps(pn) +local steps = GAMESTATE:GetCurrentSteps() t[#t+1] = Def.Quad{ InitCommand = function (self) diff --git a/BGAnimations/ScreenNetChartLeaderboard overlay/default.lua b/BGAnimations/ScreenNetChartLeaderboard overlay/default.lua index 54bafe6d..f5e78e94 100644 --- a/BGAnimations/ScreenNetChartLeaderboard overlay/default.lua +++ b/BGAnimations/ScreenNetChartLeaderboard overlay/default.lua @@ -1,6 +1,6 @@ local pn = GAMESTATE:GetEnabledPlayers()[1] local song = GAMESTATE:GetCurrentSong() -local steps = GAMESTATE:GetCurrentSteps(pn) +local steps = GAMESTATE:GetCurrentSteps() local stepsType = steps:GetStepsType() local scoreList = {} diff --git a/BGAnimations/ScreenNetMusicInfo overlay/default.lua b/BGAnimations/ScreenNetMusicInfo overlay/default.lua index dd9efe0d..6d768a62 100644 --- a/BGAnimations/ScreenNetMusicInfo overlay/default.lua +++ b/BGAnimations/ScreenNetMusicInfo overlay/default.lua @@ -1,6 +1,6 @@ local pn = GAMESTATE:GetEnabledPlayers()[1] local song = GAMESTATE:GetCurrentSong() -local steps = GAMESTATE:GetCurrentSteps(pn) +local steps = GAMESTATE:GetCurrentSteps() local stepsType = steps:GetStepsType() local scoreList = {} diff --git a/BGAnimations/ScreenNetMusicInfo overlay/stepsinfo.lua b/BGAnimations/ScreenNetMusicInfo overlay/stepsinfo.lua index 941ee166..13ff7c04 100644 --- a/BGAnimations/ScreenNetMusicInfo overlay/stepsinfo.lua +++ b/BGAnimations/ScreenNetMusicInfo overlay/stepsinfo.lua @@ -6,7 +6,7 @@ local frameHeight = 60 local pn = GAMESTATE:GetEnabledPlayers()[1] local song = GAMESTATE:GetCurrentSong() -local steps = GAMESTATE:GetCurrentSteps(pn) +local steps = GAMESTATE:GetCurrentSteps() t[#t+1] = Def.Quad{ InitCommand = function (self) diff --git a/BGAnimations/ScreenPlaylistInfo overlay/default.lua b/BGAnimations/ScreenPlaylistInfo overlay/default.lua index a80b7308..c0935faa 100644 --- a/BGAnimations/ScreenPlaylistInfo overlay/default.lua +++ b/BGAnimations/ScreenPlaylistInfo overlay/default.lua @@ -32,7 +32,7 @@ local maxPages = math.ceil(#playlists/maxItems) local top local pn = GAMESTATE:GetEnabledPlayers()[1] -local steps = GAMESTATE:GetCurrentSteps(pn) +local steps = GAMESTATE:GetCurrentSteps() local song = GAMESTATE:GetCurrentSong() diff --git a/BGAnimations/ScreenSelectMusic overlay/default.lua b/BGAnimations/ScreenSelectMusic overlay/default.lua index 1223082d..7a898e80 100644 --- a/BGAnimations/ScreenSelectMusic overlay/default.lua +++ b/BGAnimations/ScreenSelectMusic overlay/default.lua @@ -56,8 +56,8 @@ local t = Def.ActorFrame{ PlayingSampleMusicMessageCommand = function(self) local leaderboardEnabled = playerConfig:get_data(pn_to_profile_slot(PLAYER_1)).leaderboardEnabled and DLMAN:IsLoggedIn() - if leaderboardEnabled and GAMESTATE:GetCurrentSteps(PLAYER_1) then - local chartkey = GAMESTATE:GetCurrentSteps(PLAYER_1):GetChartKey() + if leaderboardEnabled and GAMESTATE:GetCurrentSteps() then + local chartkey = GAMESTATE:GetCurrentSteps():GetChartKey() if screenChoices[SCREENMAN:GetTopScreen():GetName()] then if SCREENMAN:GetTopScreen():GetMusicWheel():IsSettled() then DLMAN:RequestChartLeaderBoardFromOnline( diff --git a/BGAnimations/ScreenSelectMusic overlay/net/profilecard.lua b/BGAnimations/ScreenSelectMusic overlay/net/profilecard.lua index fb35baab..7e220330 100644 --- a/BGAnimations/ScreenSelectMusic overlay/net/profilecard.lua +++ b/BGAnimations/ScreenSelectMusic overlay/net/profilecard.lua @@ -93,7 +93,7 @@ local function generalFrame(pn) song = GAMESTATE:GetCurrentSong() for _,pn in pairs(GAMESTATE:GetEnabledPlayers()) do profile[pn] = GetPlayerOrMachineProfile(pn) - steps[pn] = GAMESTATE:GetCurrentSteps(pn) + steps[pn] = GAMESTATE:GetCurrentSteps() topScore[pn] = getBestScore(pn, 0, getCurRate()) if song and steps[pn] then ptags = tags:get_data().playerTags diff --git a/BGAnimations/ScreenSelectMusic overlay/profilecard.lua b/BGAnimations/ScreenSelectMusic overlay/profilecard.lua index c7a4d619..3b3d6828 100644 --- a/BGAnimations/ScreenSelectMusic overlay/profilecard.lua +++ b/BGAnimations/ScreenSelectMusic overlay/profilecard.lua @@ -93,7 +93,7 @@ local function generalFrame(pn) song = GAMESTATE:GetCurrentSong() for _,pn in pairs(GAMESTATE:GetEnabledPlayers()) do profile[pn] = GetPlayerOrMachineProfile(pn) - steps[pn] = GAMESTATE:GetCurrentSteps(pn) + steps[pn] = GAMESTATE:GetCurrentSteps() topScore[pn] = getBestScore(pn, 0, getCurRate()) if song and steps[pn] then ptags = tags:get_data().playerTags diff --git a/BGAnimations/_gameplaydensitygraph.lua b/BGAnimations/_gameplaydensitygraph.lua index d03f26f2..b12faf9a 100644 --- a/BGAnimations/_gameplaydensitygraph.lua +++ b/BGAnimations/_gameplaydensitygraph.lua @@ -44,7 +44,7 @@ local function getColorForDensity(density, ncol) end local function updateGraphMultiVertex(parent, realgraph) - local steps = GAMESTATE:GetCurrentSteps(PLAYER_1) + local steps = GAMESTATE:GetCurrentSteps() if steps then local ncol = steps:GetNumColumns() local rate = math.max(1, getCurRateValue()) diff --git a/Graphics/OffsetGraph.lua b/Graphics/OffsetGraph.lua index 2cd7f03b..4fd1aea9 100644 --- a/Graphics/OffsetGraph.lua +++ b/Graphics/OffsetGraph.lua @@ -23,8 +23,8 @@ local ctt = {} -- track vector local ntt = {} -- tap note type vector local wuab = {} -- time corrected tap notes (?) local columns = 4 -- the number of columns because we dont keep track of this i guess -local finalSecond = GAMESTATE:GetCurrentSong(PLAYER_1):GetLastSecond() -local td = GAMESTATE:GetCurrentSteps(PLAYER_1):GetTimingData() +local finalSecond = GAMESTATE:GetCurrentSong():GetLastSecond() +local td = GAMESTATE:GetCurrentSteps():GetTimingData() local oddColumns = false local middleColumn = 1.5 -- middle column for 4k but accounting for trackvector indexing at 0 diff --git a/Scripts/Scores.lua b/Scripts/Scores.lua index ccf85270..968049df 100644 --- a/Scripts/Scores.lua +++ b/Scripts/Scores.lua @@ -181,7 +181,7 @@ function getBestMaxCombo(pn,ignore, rate) local hsTable = getScoreTable(pn, rate) - local steps = GAMESTATE:GetCurrentSteps(pn) + local steps = GAMESTATE:GetCurrentSteps() if hsTable ~= nil and #hsTable >= 1 then while i <= #hsTable do @@ -214,7 +214,7 @@ function getBestMissCount(pn,ignore, rate) local hsTable = getScoreTable(pn, rate) - local steps = GAMESTATE:GetCurrentSteps(pn) + local steps = GAMESTATE:GetCurrentSteps() if hsTable ~= nil and #hsTable >= 1 then while i <= #hsTable do @@ -245,7 +245,7 @@ function getBestScore(pn, ignore, rate, percent) local bestScore local hsTable = getScoreTable(pn, rate) - local steps = GAMESTATE:GetCurrentSteps(pn) + local steps = GAMESTATE:GetCurrentSteps() local temp if hsTable ~= nil and #hsTable >= 1 then From 17d6f153c4dfcb5622afd14e21094e3e8ce86f2a Mon Sep 17 00:00:00 2001 From: Barinade Date: Tue, 26 Jan 2021 00:22:43 -0600 Subject: [PATCH 14/35] Update ChartPreview related functionality following core etterna changes --- .../ScreenChartPreview overlay/default.lua | 56 +++++++++++-------- .../ScreenSelectMusic overlay/currentsort.lua | 2 +- .../net/currentsort.lua | 2 +- 3 files changed, 35 insertions(+), 25 deletions(-) diff --git a/BGAnimations/ScreenChartPreview overlay/default.lua b/BGAnimations/ScreenChartPreview overlay/default.lua index 607dbe3c..7c036346 100644 --- a/BGAnimations/ScreenChartPreview overlay/default.lua +++ b/BGAnimations/ScreenChartPreview overlay/default.lua @@ -5,8 +5,6 @@ local stepsType = steps:GetStepsType() local usingreverse = GAMESTATE:GetPlayerState(PLAYER_1):GetCurrentPlayerOptions():UsingReverse() local ssm -local NF -local NFParent local musicratio = 1 local snapGraph local densityGraph @@ -56,7 +54,6 @@ local function input(event) if event.type == "InputEventType_FirstPress" then if event.button == "Back" or event.button == "Start" or event.DeviceInput.button == "DeviceButton_space" then SCREENMAN:GetTopScreen():Cancel() - ssm:DeletePreviewNoteField(NFParent) MESSAGEMAN:Broadcast("PreviewNoteFieldDeleted") end @@ -77,7 +74,7 @@ local function input(event) end if event.DeviceInput.button == "DeviceButton_right mouse button" then - ssm:PausePreviewNoteField() + ssm:PauseSampleMusic() MESSAGEMAN:Broadcast("PreviewPaused") end @@ -513,7 +510,6 @@ local t = Def.ActorFrame { SCREENMAN:GetTopScreen():AddInputCallback(MPinput) end, ExitScreenMessageCommand = function(self) - ssm:DeletePreviewNoteField(NFParent) MESSAGEMAN:Broadcast("PreviewNoteFieldDeleted") end } @@ -584,7 +580,7 @@ local function makeABar(vertices, x, y, barWidth, barHeight, thecolor) end local function seekOrHighlight(self) - local pos = ssm:GetPreviewNoteFieldMusicPosition() / musicratio + local pos = ssm:GetSampleMusicPosition() / musicratio self:GetChild("PreviewProgress"):zoomto(densityGraphWidth, math.min(pos, frameHeight-20)) self:queuecommand("Highlight") end @@ -740,17 +736,17 @@ t[#t+1] = Def.ActorFrame { end, MouseDownCommand = function(self, params) if params.button == "DeviceButton_left mouse button" then - ssm:SetPreviewNoteFieldMusicPosition( (INPUTFILTER:GetMouseY() - self:GetParent():GetY() - 20) * musicratio) + ssm:SetSampleMusicPosition( (INPUTFILTER:GetMouseY() - self:GetParent():GetY() - 20) * musicratio) end end, WheelUpSlowMessageCommand = function(self) if isOver(self) then - ssm:SetPreviewNoteFieldMusicPosition( ssm:GetPreviewNoteFieldMusicPosition() - 0.1 ) + ssm:SetSampleMusicPosition( ssm:GetSampleMusicPosition() - 0.1 ) end end, WheelDownSlowMessageCommand = function(self) if isOver(self) then - ssm:SetPreviewNoteFieldMusicPosition( ssm:GetPreviewNoteFieldMusicPosition() + 0.1 ) + ssm:SetSampleMusicPosition( ssm:GetSampleMusicPosition() + 0.1 ) end end }, @@ -887,24 +883,38 @@ t[#t+1] = Def.ActorFrame { -- The Preview Notefield. Def.ActorFrame { InitCommand = function(self) - NFParent = self ssm = GHETTOGAMESTATE:getSSM() - self:queuecommand("StartPreview") end, - StartPreviewCommand = function(self) - NF = ssm:CreatePreviewNoteField() - if NF == nil then - return - end - NF:zoom(0.5):draworder(100) - ssm:dootforkfive(NFParent) - NF:xy(frameWidth / 2, 50) - if usingreverse then - NF:y(50 * 1.5 + 215) + Def.NoteFieldPreview { + Name = "NoteField", + DrawDistanceBeforeTargetsPixels = 800, + DrawDistanceAfterTargetsPixels = 0, + YReverseOffsetPixels = 100, + + InitCommand = function(self) + local s = GAMESTATE:GetCurrentSteps() + if s ~= nil then + self:LoadNoteData(s) + end + end, + BeginCommand = function(self) + self:zoom(0.5):draworder(100) + self:xy(frameWidth / 2, 50) + if usingreverse then + self:y(50 * 1.5 + 215) + end + self:GetParent():SortByDrawOrder() + end, + CurrentStepsChangedMessageCommand = function(self, params) + local steps = params.ptr + if steps ~= nil then + self:LoadNoteData(steps) + else + self:LoadDummyNoteData() + end end - NFParent:SortByDrawOrder() - end + }, }, } diff --git a/BGAnimations/ScreenSelectMusic overlay/currentsort.lua b/BGAnimations/ScreenSelectMusic overlay/currentsort.lua index bae280f0..69898357 100644 --- a/BGAnimations/ScreenSelectMusic overlay/currentsort.lua +++ b/BGAnimations/ScreenSelectMusic overlay/currentsort.lua @@ -39,7 +39,7 @@ local sortTable = { local function searchInput(event) if event.type == "InputEventType_FirstPress" and (event.DeviceInput.button == "DeviceButton_left mouse button" or event.DeviceInput.button == "DeviceButton_right mouse button") then if not active and event.DeviceInput.button == "DeviceButton_right mouse button" then - top:PausePreviewNoteField() + top:PauseSampleMusic() MESSAGEMAN:Broadcast("PreviewPaused") end if released and active then diff --git a/BGAnimations/ScreenSelectMusic overlay/net/currentsort.lua b/BGAnimations/ScreenSelectMusic overlay/net/currentsort.lua index 32ba852a..20a971b4 100644 --- a/BGAnimations/ScreenSelectMusic overlay/net/currentsort.lua +++ b/BGAnimations/ScreenSelectMusic overlay/net/currentsort.lua @@ -39,7 +39,7 @@ local sortTable = { local function searchInput(event) if event.type == "InputEventType_FirstPress" and (event.DeviceInput.button == "DeviceButton_left mouse button" or event.DeviceInput.button == "DeviceButton_right mouse button") then if not active and event.DeviceInput.button == "DeviceButton_right mouse button" then - top:PausePreviewNoteField() + top:PauseSampleMusic() MESSAGEMAN:Broadcast("PreviewPaused") end if released and active then From fe77767d8162ebb4ed5c847b8dde9c85b2ddf2e8 Mon Sep 17 00:00:00 2001 From: Barinade Date: Tue, 26 Jan 2021 22:35:01 -0600 Subject: [PATCH 15/35] Fix chart preview music playback and sync headache hours --- BGAnimations/ScreenChartPreview overlay/default.lua | 3 ++- BGAnimations/ScreenSelectMusic overlay/bgm.lua | 11 ++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/BGAnimations/ScreenChartPreview overlay/default.lua b/BGAnimations/ScreenChartPreview overlay/default.lua index 7c036346..f187d48d 100644 --- a/BGAnimations/ScreenChartPreview overlay/default.lua +++ b/BGAnimations/ScreenChartPreview overlay/default.lua @@ -75,7 +75,6 @@ local function input(event) if event.DeviceInput.button == "DeviceButton_right mouse button" then ssm:PauseSampleMusic() - MESSAGEMAN:Broadcast("PreviewPaused") end end @@ -905,6 +904,8 @@ t[#t+1] = Def.ActorFrame { self:y(50 * 1.5 + 215) end self:GetParent():SortByDrawOrder() + SOUND:StopMusic() + ssm:PlayCurrentSongSampleMusic(true, true) end, CurrentStepsChangedMessageCommand = function(self, params) local steps = params.ptr diff --git a/BGAnimations/ScreenSelectMusic overlay/bgm.lua b/BGAnimations/ScreenSelectMusic overlay/bgm.lua index 39178ef1..27fa3e6e 100644 --- a/BGAnimations/ScreenSelectMusic overlay/bgm.lua +++ b/BGAnimations/ScreenSelectMusic overlay/bgm.lua @@ -9,6 +9,7 @@ local musicLength = 0 local loops = 0 local musicNotPaused = 1 local goNow = false +local nah = false local sampleEvent = false @@ -33,6 +34,11 @@ local function playMusic(self, delta) goNow = true end + -- dont override sample music with this if in chart preview mode + local tscr = SCREENMAN:GetTopScreen() + nah = tscr ~= nil and tscr:GetName() == "ScreenChartPreview" + if nah then return end + if (deltaSum > delay and sampleEvent) or goNow then goNow = false local s = GHETTOGAMESTATE:getSSM() @@ -104,10 +110,13 @@ local t = Def.ActorFrame{ end end, PlayingSampleMusicMessageCommand = function(self) + local tscr = SCREENMAN:GetTopScreen() + nah = tscr ~= nil and tscr:GetName() == "ScreenChartPreview" + musicNotPaused = 1 goNow = false sampleEvent = true - if themeConfig:get_data().global.SongPreview ~= 1 then + if not nah and themeConfig:get_data().global.SongPreview ~= 1 then self:SetUpdateFunctionInterval(0.002) SOUND:StopMusic() end From 4aeaa992efe5dde45cb9b3267c15d06588e5fd48 Mon Sep 17 00:00:00 2001 From: Barinade Date: Sun, 31 Jan 2021 22:08:07 -0600 Subject: [PATCH 16/35] Add backspace to reset customizegameplay element to default --- Scripts/01 player_config.lua | 9 ++++ Scripts/02 CustomizeGameplay.lua | 79 ++++++++++++++++++++++++++++++++ 2 files changed, 88 insertions(+) diff --git a/Scripts/01 player_config.lua b/Scripts/01 player_config.lua index cc93e532..415128bb 100644 --- a/Scripts/01 player_config.lua +++ b/Scripts/01 player_config.lua @@ -112,6 +112,15 @@ local defaultConfig = { } } +function getDefaultGameplaySize(obj) + return defaultGameplaySizes[obj] +end + +function getDefaultGameplayCoordinate(obj) + return defaultGameplayCoordinates[obj] +end + + playerConfig = create_setting("playerConfig", "playerConfig.lua", defaultConfig, -1) local tmp2 = playerConfig.load playerConfig.load = function(self, slot) diff --git a/Scripts/02 CustomizeGameplay.lua b/Scripts/02 CustomizeGameplay.lua index b200e27a..6a83c383 100644 --- a/Scripts/02 CustomizeGameplay.lua +++ b/Scripts/02 CustomizeGameplay.lua @@ -781,6 +781,85 @@ function MovableInput(event) end Movable.pressed = true -- we need to do this or the mouse input facsimile will toggle on when moving x, and off when moving y end + + if button == "DeviceButton_backspace" then + event.defaultreset = true + else + event.defaultreset = false + end + + -- reset to default + if event.defaultreset then + Movable.pressed = true + if current ~= nil and current.condition and notReleased and current.external == nil then + local sizevals = { + Height = true, + Width = true, + Zoom = true, + Spacing = true, + } + local posvals = { + X = true, + Y = true, + } + local keys = { + "DeviceButton_left", -- right redundant + "DeviceButton_up", -- down redundant + } + -- run update functions for "all keys" + for _, b in ipairs(keys) do + local curKey = current[b] + if curKey ~= nil then + local keyProperty = curKey.property + local prop = current.name .. string.gsub(keyProperty, "Add", "") + local newVal = 0 + if posvals[keyProperty] then + newVal = getDefaultGameplayCoordinate(prop) + elseif sizevals[keyProperty] then + newVal = getDefaultGameplaySize(prop) + end + local diff = newVal - MovableValues[prop] + MovableValues[prop] = newVal + if curKey.arbitraryFunction then + if curKey.arbitraryInc then + -- this definitely breaks for something probably maybe + -- this is just for visuals anyways + -- pressing the default button and restarting gameplay fixes it + curKey.arbitraryFunction(diff) + else + curKey.arbitraryFunction(newVal) + end + elseif current.children then + for _, attribute in ipairs(current.children) do + propsFunctions[keyProperty](current.element[attribute], newVal) + end + elseif current.elementList then + for _, elem in ipairs(current.element) do + propsFunctions[keyProperty](elem, newVal) + end + elseif keyProperty == "AddX" or keyProperty == "AddY" then + if keyProperty == "AddY" then + diff = -diff -- sigh + end + propsFunctions[keyProperty](current.element, diff) + else + propsFunctions[keyProperty](current.element, newVal) + end + + if not current.noBorder then + local border = Movable[Movable.current]["Border"] + if keyProperty == "Height" or keyProperty == "Width" or keyProperty == "Zoom" then + border:playcommand("Change" .. keyProperty, {val = newVal} ) + end + end + updatetext(Movable.current) + playerConfig:get_data(pn_to_profile_slot(PLAYER_1))[current.elementTree][keymode][prop] = MovableValues[prop] + playerConfig:set_dirty(pn_to_profile_slot(PLAYER_1)) + end + end + return false + end + end if Movable.pressed and current[button] and current.condition and notReleased and current.external == nil then local curKey = current[button] From 78eb3b20d1ccf7cdc9326fea2bf2b6ba69413c90 Mon Sep 17 00:00:00 2001 From: Barinade Date: Sat, 13 Feb 2021 02:51:31 -0600 Subject: [PATCH 17/35] Remove unused playernumber function parameters --- .../ScreenChartPreview overlay/default.lua | 2 +- .../ScreenEvaluation decorations/default.lua | 18 +++++++++--------- .../scoreboard.lua | 12 ++++++------ BGAnimations/ScreenEvaluation underlay.lua | 4 ++-- .../WifeJudgmentSpotting.lua | 14 +++++++------- BGAnimations/ScreenGameplay overlay/avatar.lua | 6 +++--- .../ScreenGameplay overlay/default.lua | 4 ++-- .../ScreenGameplay overlay/errorbar.lua | 2 +- .../ScreenGameplay overlay/judgecount.lua | 2 +- .../ScreenGameplay overlay/lanecover.lua | 10 +++++----- .../ScreenGameplay overlay/messagebox.lua | 2 +- .../ScreenGameplay overlay/npscalc.lua | 2 +- .../ScreenGameplay underlay/SpeedChange.lua | 12 ++++++------ .../ScreenGameplay underlay/default.lua | 4 ++-- BGAnimations/ScreenPlayerOptions overlay.lua | 2 +- .../ScreenSelectMusic overlay/default.lua | 2 +- .../net/profilecard.lua | 6 +++--- .../ScreenSelectMusic overlay/profilecard.lua | 6 +++--- BGAnimations/ScreenSelectProfile overlay.lua | 2 +- Graphics/Notefield board.lua | 2 +- Scripts/02 CustomizeGameplay.lua | 2 +- Scripts/02 GhettoGameState.lua | 2 +- 22 files changed, 59 insertions(+), 59 deletions(-) diff --git a/BGAnimations/ScreenChartPreview overlay/default.lua b/BGAnimations/ScreenChartPreview overlay/default.lua index f187d48d..dcdf095a 100644 --- a/BGAnimations/ScreenChartPreview overlay/default.lua +++ b/BGAnimations/ScreenChartPreview overlay/default.lua @@ -2,7 +2,7 @@ local pn = GAMESTATE:GetEnabledPlayers()[1] local song = GAMESTATE:GetCurrentSong() local steps = GAMESTATE:GetCurrentSteps() local stepsType = steps:GetStepsType() -local usingreverse = GAMESTATE:GetPlayerState(PLAYER_1):GetCurrentPlayerOptions():UsingReverse() +local usingreverse = GAMESTATE:GetPlayerState():GetCurrentPlayerOptions():UsingReverse() local ssm local musicratio = 1 diff --git a/BGAnimations/ScreenEvaluation decorations/default.lua b/BGAnimations/ScreenEvaluation decorations/default.lua index 340ab555..c00239da 100644 --- a/BGAnimations/ScreenEvaluation decorations/default.lua +++ b/BGAnimations/ScreenEvaluation decorations/default.lua @@ -1,5 +1,5 @@ local song = GAMESTATE:GetCurrentSong() -local pss = STATSMAN:GetCurStageStats():GetPlayerStageStats(PLAYER_1) +local pss = STATSMAN:GetCurStageStats():GetPlayerStageStats() local steps = GAMESTATE:GetCurrentSteps() --ScoreBoard @@ -109,7 +109,7 @@ local function oldEvalStuff() end if not tst[judge] then return end tst = tst[judge] - SCREENMAN:GetTopScreen():SetPlayerStageStatsFromReplayData(SCREENMAN:GetTopScreen():GetStageStats():GetPlayerStageStats(PLAYER_1), tst) + SCREENMAN:GetTopScreen():SetPlayerStageStatsFromReplayData(SCREENMAN:GetTopScreen():GetStageStats():GetPlayerStageStats(), tst) end } @@ -162,7 +162,7 @@ local function oldEvalStuff() self:halign(0) self:maxwidth((SCREEN_WIDTH/2 - 133 - 10)/0.45) self:diffuse(color(colorConfig:get_data().evaluation.BackgroundText)):diffusealpha(0.8) - local mods = GAMESTATE:GetPlayerState(PLAYER_1):GetPlayerOptionsString("ModsLevel_Current") + local mods = GAMESTATE:GetPlayerState():GetPlayerOptionsString("ModsLevel_Current") self:settextf("Mods: %s", mods) end } @@ -376,7 +376,7 @@ local function oldEvalStuff() end, BeginCommand=function(self) local ss = SCREENMAN:GetTopScreen():GetStageStats() - self:Set(ss,ss:GetPlayerStageStats(pn)) + self:Set(ss,ss:GetPlayerStageStats()) end } } @@ -385,7 +385,7 @@ local function oldEvalStuff() local function scoreBoard(pn) local hsTable = getScoreTable(pn, rate) - local pss = STATSMAN:GetCurStageStats():GetPlayerStageStats(pn) + local pss = STATSMAN:GetCurStageStats():GetPlayerStageStats() local profile = PROFILEMAN:GetProfile(pn) local index if hsTable == nil then @@ -1270,7 +1270,7 @@ local function oldEvalStuff() local song = STATSMAN:GetCurStageStats():GetPlayedSongs()[1] local profile = GetPlayerOrMachineProfile(player) local hsTable = getScoreTable(player, getCurRate()) - local pss = STATSMAN:GetCurStageStats():GetPlayerStageStats(player) + local pss = STATSMAN:GetCurStageStats():GetPlayerStageStats() local score = pss:GetHighScore() local scoreIndex = getHighScoreIndex(hsTable, score) local newScoreboardInitialLocalIndex = scoreIndex @@ -2205,7 +2205,7 @@ local function offsetStuff() self:zoom(offsetParamZoom) local pn = GAMESTATE:GetEnabledPlayers()[1] - local pss = STATSMAN:GetCurStageStats():GetPlayerStageStats(pn) + local pss = STATSMAN:GetCurStageStats():GetPlayerStageStats() local steps = GAMESTATE:GetCurrentSteps() self:RunCommandsOnChildren(function(self) @@ -3047,7 +3047,7 @@ local function newEvalStuff() self:xy(-playerInfoFrameWidth/2, -playerInfoFrameHeight + SCREEN_HEIGHT * playerInfoModsTopReferenceRatio) self:zoom(smallerTextScale) local mods = pss:GetHighScore():GetModifiers() - --GAMESTATE:GetPlayerState(PLAYER_1):GetCurrentPlayerOptions():GetInvalidatingMods() + --GAMESTATE:GetPlayerState():GetCurrentPlayerOptions():GetInvalidatingMods() self:settext(mods) self:maxwidth((playerInfoFrameWidth - 6) / smallerTextScale) end @@ -3079,7 +3079,7 @@ t[#t+1] = Def.ActorFrame { OnCommand = function(self) SCREENMAN:GetTopScreen():AddInputCallback(scroller) if PREFSMAN:GetPreference("SortBySSRNormPercent") then - local pss = STATSMAN:GetCurStageStats():GetPlayerStageStats(pn) + local pss = STATSMAN:GetCurStageStats():GetPlayerStageStats() local curScore = pss:GetHighScore() judge = 4 diff --git a/BGAnimations/ScreenEvaluation decorations/scoreboard.lua b/BGAnimations/ScreenEvaluation decorations/scoreboard.lua index 38b89f9f..d7270ee8 100644 --- a/BGAnimations/ScreenEvaluation decorations/scoreboard.lua +++ b/BGAnimations/ScreenEvaluation decorations/scoreboard.lua @@ -17,9 +17,9 @@ local pss local player = GAMESTATE:GetEnabledPlayers()[1] -pss = STATSMAN:GetCurStageStats():GetPlayerStageStats(player) +pss = STATSMAN:GetCurStageStats():GetPlayerStageStats() profile = GetPlayerOrMachineProfile(player) -steps = STATSMAN:GetCurStageStats():GetPlayerStageStats(player):GetPlayedSteps()[1] +steps = STATSMAN:GetCurStageStats():GetPlayerStageStats():GetPlayedSteps()[1] hsTable = getScoreTable(player, getCurRate()) score = pss:GetHighScore() scoreIndex = getHighScoreIndex(hsTable, score) @@ -116,7 +116,7 @@ local function scoreitem(pn,index,scoreIndex,drawindex) self:xy(frameX,frameY+(drawindex*spacing)-4):zoomto(frameWidth,30):halign(0):valign(0):diffuse(getMainColor("frame")):diffusealpha(0.8) end, BeginCommand=function(self) - self:visible(GAMESTATE:IsHumanPlayer(pn)) + self:visible(GAMESTATE:IsHumanPlayer()) end }, @@ -126,7 +126,7 @@ local function scoreitem(pn,index,scoreIndex,drawindex) self:xy(frameX,frameY+(drawindex*spacing)-4):zoomto(frameWidth,30):halign(0):valign(0):diffuse(getMainColor("highlight")):diffusealpha(0.3) end, BeginCommand=function(self) - self:visible(GAMESTATE:IsHumanPlayer(pn) and equals) + self:visible(GAMESTATE:IsHumanPlayer() and equals) end, SetCommand = function(self) self:playcommand("Begin") @@ -161,7 +161,7 @@ local function scoreitem(pn,index,scoreIndex,drawindex) SetCommand = function(self) if hsTable[index] ~= nil then self:diffuse(getClearTypeColor(getClearType(pn,steps,hsTable[index]))) - self:visible(GAMESTATE:IsHumanPlayer(pn)) + self:visible(GAMESTATE:IsHumanPlayer()) end end }, @@ -177,7 +177,7 @@ local function scoreitem(pn,index,scoreIndex,drawindex) SetCommand = function(self) if hsTable[index] ~= nil then self:diffuse(getClearTypeColor(getClearType(pn,steps,hsTable[index]))) - self:visible(GAMESTATE:IsHumanPlayer(pn)) + self:visible(GAMESTATE:IsHumanPlayer()) self:diffuseramp() self:effectoffset(0.03*(lines-drawindex)) self:effectcolor2(color("1,1,1,0.6")) diff --git a/BGAnimations/ScreenEvaluation underlay.lua b/BGAnimations/ScreenEvaluation underlay.lua index 50fa6a9a..7ff34638 100644 --- a/BGAnimations/ScreenEvaluation underlay.lua +++ b/BGAnimations/ScreenEvaluation underlay.lua @@ -38,8 +38,8 @@ if enabled and bgType > 1 then -- 2 = Grade+Clear, 3 = Grade Only -- Get the highest grade from the player (or players if 2P) local pss local highestGrade = "Grade_Failed" - if GAMESTATE:IsPlayerEnabled(PLAYER_1) then - pss = STATSMAN:GetCurStageStats():GetPlayerStageStats(PLAYER_1) + if GAMESTATE:IsPlayerEnabled() then + pss = STATSMAN:GetCurStageStats():GetPlayerStageStats() local playerGrade = pss:GetGrade() if Enum.Reverse(Grade)[playerGrade] < Enum.Reverse(Grade)[highestGrade] then highestGrade = playerGrade diff --git a/BGAnimations/ScreenGameplay overlay/WifeJudgmentSpotting.lua b/BGAnimations/ScreenGameplay overlay/WifeJudgmentSpotting.lua index abf4db0a..800c2398 100644 --- a/BGAnimations/ScreenGameplay overlay/WifeJudgmentSpotting.lua +++ b/BGAnimations/ScreenGameplay overlay/WifeJudgmentSpotting.lua @@ -2,7 +2,7 @@ Basically rewriting the c++ code to not be total shit so this can also not be total shit. ]] local allowedCustomization = playerConfig:get_data(pn_to_profile_slot(PLAYER_1)).CustomizeGameplay -local practiceMode = GAMESTATE:GetPlayerState(PLAYER_1):GetCurrentPlayerOptions():UsingPractice() +local practiceMode = GAMESTATE:GetPlayerState():GetCurrentPlayerOptions():UsingPractice() local jcKeys = tableKeys(colorConfig:get_data().judgment) local jcT = {} -- A "T" following a variable name will designate an object of type table. @@ -140,7 +140,7 @@ local enabledTargetTracker = playerConfig:get_data(pn_to_profile_slot(PLAYER_1)) local enabledDisplayPercent = playerConfig:get_data(pn_to_profile_slot(PLAYER_1)).DisplayPercent local enabledDisplayMean = playerConfig:get_data(pn_to_profile_slot(PLAYER_1)).DisplayMean local leaderboardEnabled = playerConfig:get_data(pn_to_profile_slot(PLAYER_1)).leaderboardEnabled and DLMAN:IsLoggedIn() -local isReplay = GAMESTATE:GetPlayerState(PLAYER_1):GetPlayerController() == "PlayerController_Replay" +local isReplay = GAMESTATE:GetPlayerState():GetPlayerController() == "PlayerController_Replay" local function arbitraryErrorBarValue(value) errorBarFrameWidth = capWideScale(get43size(value), value) @@ -186,7 +186,7 @@ local t = GAMESTATE:UpdateDiscordPresence(largeImageTooltip, detail, state, endTime) screen = SCREENMAN:GetTopScreen() - usingReverse = GAMESTATE:GetPlayerState(PLAYER_1):GetCurrentPlayerOptions():UsingReverse() + usingReverse = GAMESTATE:GetPlayerState():GetCurrentPlayerOptions():UsingReverse() Notefield = screen:GetChild("PlayerP1"):GetChild("NoteField") Notefield:addy(MovableValues.NotefieldY * (usingReverse and 1 or -1)) Notefield:addx(MovableValues.NotefieldX) @@ -281,7 +281,7 @@ end ]] -- Mostly clientside now. We set our desired target goal and listen to the results rather than calculating ourselves. local target = playerConfig:get_data(pn_to_profile_slot(PLAYER_1)).TargetGoal -GAMESTATE:GetPlayerState(PLAYER_1):SetTargetGoal(target / 100) +GAMESTATE:GetPlayerState():SetTargetGoal(target / 100) -- We can save space by wrapping the personal best and set percent trackers into one function, however @@ -678,7 +678,7 @@ Def.ActorFrame { Better optimized frame update bpm display. ]] local BPM -local a = GAMESTATE:GetPlayerState(PLAYER_1):GetSongPosition() +local a = GAMESTATE:GetPlayerState():GetSongPosition() local r = GAMESTATE:GetSongOptionsObject("ModsLevel_Current"):MusicRate() * 60 local GetBPS = SongPosition.GetCurBPS @@ -849,7 +849,7 @@ local function duminput(event) elseif event.DeviceInput.button == "DeviceButton_mousewheel up" then if GAMESTATE:IsPaused() then local pos = SCREENMAN:GetTopScreen():GetSongPosition() - local dir = GAMESTATE:GetPlayerState(PLAYER_1):GetCurrentPlayerOptions():UsingReverse() and 1 or -1 + local dir = GAMESTATE:GetPlayerState():GetCurrentPlayerOptions():UsingReverse() and 1 or -1 local nextpos = pos + dir * 0.05 if loopEndPos ~= nil and nextpos >= loopEndPos then handleRegionSetting(nextpos + 1) @@ -859,7 +859,7 @@ local function duminput(event) elseif event.DeviceInput.button == "DeviceButton_mousewheel down" then if GAMESTATE:IsPaused() then local pos = SCREENMAN:GetTopScreen():GetSongPosition() - local dir = GAMESTATE:GetPlayerState(PLAYER_1):GetCurrentPlayerOptions():UsingReverse() and 1 or -1 + local dir = GAMESTATE:GetPlayerState():GetCurrentPlayerOptions():UsingReverse() and 1 or -1 local nextpos = pos - dir * 0.05 if loopEndPos ~= nil and nextpos >= loopEndPos then handleRegionSetting(nextpos + 1) diff --git a/BGAnimations/ScreenGameplay overlay/avatar.lua b/BGAnimations/ScreenGameplay overlay/avatar.lua index cad34a07..df72b318 100644 --- a/BGAnimations/ScreenGameplay overlay/avatar.lua +++ b/BGAnimations/ScreenGameplay overlay/avatar.lua @@ -11,7 +11,7 @@ local avatarPosition = { } local function PLife(pn) - local life = STATSMAN:GetCurStageStats():GetPlayerStageStats(pn):GetCurrentLife() or 0 + local life = STATSMAN:GetCurStageStats():GetPlayerStageStats():GetCurrentLife() or 0 if life < 0 then return 0 else @@ -19,7 +19,7 @@ local function PLife(pn) end end -local pss = STATSMAN:GetCurStageStats():GetPlayerStageStats(PLAYER_1) +local pss = STATSMAN:GetCurStageStats():GetPlayerStageStats() local profile = GetPlayerOrMachineProfile(PLAYER_1) -- whole frame actorframe @@ -124,7 +124,7 @@ if fullPlayerInfo then self:maxwidth(200 * 2) end, SetCommand = function(self) - local mods = GAMESTATE:GetPlayerState(PLAYER_1):GetPlayerOptionsString("ModsLevel_Current") + local mods = GAMESTATE:GetPlayerState():GetPlayerOptionsString("ModsLevel_Current") self:settext(mods) end diff --git a/BGAnimations/ScreenGameplay overlay/default.lua b/BGAnimations/ScreenGameplay overlay/default.lua index 368b0d8a..1d38fa11 100644 --- a/BGAnimations/ScreenGameplay overlay/default.lua +++ b/BGAnimations/ScreenGameplay overlay/default.lua @@ -1,6 +1,6 @@ local inCustomize = playerConfig:get_data(pn_to_profile_slot(PLAYER_1)).CustomizeGameplay -local inPractice = GAMESTATE:GetPlayerState(PLAYER_1):GetCurrentPlayerOptions():UsingPractice() -local inReplay = GAMESTATE:GetPlayerState(PLAYER_1):GetPlayerController() == "PlayerController_Replay" +local inPractice = GAMESTATE:GetPlayerState():GetCurrentPlayerOptions():UsingPractice() +local inReplay = GAMESTATE:GetPlayerState():GetPlayerController() == "PlayerController_Replay" local t = Def.ActorFrame {} diff --git a/BGAnimations/ScreenGameplay overlay/errorbar.lua b/BGAnimations/ScreenGameplay overlay/errorbar.lua index ea15e7e8..5124f590 100644 --- a/BGAnimations/ScreenGameplay overlay/errorbar.lua +++ b/BGAnimations/ScreenGameplay overlay/errorbar.lua @@ -1,7 +1,7 @@ -- A somewhat naive implementation of the osu's error bar. -- Single Player only until I figure out where to put everything -- Hopefully I can change it so I don't have to initialize like 300 quads beforehand. -local enabled = ((playerConfig:get_data(pn_to_profile_slot(PLAYER_1)).ErrorBar == true) and GAMESTATE:IsHumanPlayer(PLAYER_1)) and +local enabled = ((playerConfig:get_data(pn_to_profile_slot(PLAYER_1)).ErrorBar == true) and GAMESTATE:IsHumanPlayer()) and GAMESTATE:GetNumPlayersEnabled() == 1 local pn = GAMESTATE:GetEnabledPlayers()[1] local bareBone = isBareBone() diff --git a/BGAnimations/ScreenGameplay overlay/judgecount.lua b/BGAnimations/ScreenGameplay overlay/judgecount.lua index 34038c27..829b453e 100644 --- a/BGAnimations/ScreenGameplay overlay/judgecount.lua +++ b/BGAnimations/ScreenGameplay overlay/judgecount.lua @@ -53,7 +53,7 @@ end -- The Judgment text itself (MA for marvelous, etc.) local highlight = playerConfig:get_data(pn_to_profile_slot(PLAYER_1)).JudgeType == 2 and not bareBone -local pss = STATSMAN:GetCurStageStats():GetPlayerStageStats(PLAYER_1) +local pss = STATSMAN:GetCurStageStats():GetPlayerStageStats() local t = Def.ActorFrame { Name = "JudgeCounter", diff --git a/BGAnimations/ScreenGameplay overlay/lanecover.lua b/BGAnimations/ScreenGameplay overlay/lanecover.lua index 4b3d26ab..970e9893 100644 --- a/BGAnimations/ScreenGameplay overlay/lanecover.lua +++ b/BGAnimations/ScreenGameplay overlay/lanecover.lua @@ -18,8 +18,8 @@ local padding = 8 local styleType = ToEnumShortString(GAMESTATE:GetCurrentStyle():GetStyleType()) local prefsP1 = playerConfig:get_data(pn_to_profile_slot(PLAYER_1)).LaneCover -local enabledP1 = prefsP1 ~= 0 and GAMESTATE:IsPlayerEnabled(PLAYER_1) -local isReverseP1 = GAMESTATE:GetPlayerState(PLAYER_1):GetCurrentPlayerOptions():UsingReverse() +local enabledP1 = prefsP1 ~= 0 and GAMESTATE:IsPlayerEnabled() +local isReverseP1 = GAMESTATE:GetPlayerState():GetCurrentPlayerOptions():UsingReverse() if prefsP1 == 2 then -- it's a Hidden LaneCover isReverseP1 = not isReverseP1 end @@ -35,7 +35,7 @@ end local function getPlayerBPM(pn) local pn = GAMESTATE:GetMasterPlayerNumber() - local songPosition = GAMESTATE:GetPlayerState(pn):GetSongPosition() + local songPosition = GAMESTATE:GetPlayerState():GetSongPosition() local ts = SCREENMAN:GetTopScreen() local bpm = 0 if ts:GetScreenType() == "ScreenType_Gameplay" then @@ -56,7 +56,7 @@ local function getMaxDisplayBPM(pn) end local function getSpeed(pn) - local po = GAMESTATE:GetPlayerState(pn):GetPlayerOptions("ModsLevel_Preferred") + local po = GAMESTATE:GetPlayerState():GetPlayerOptions("ModsLevel_Preferred") if po:XMod() ~= nil then return po:XMod() * getPlayerBPM(pn) elseif po:CMod() ~= nil then @@ -72,7 +72,7 @@ local yoffsetreverse = THEME:GetMetric("Player", "ReceptorArrowsYReverse") local yoffsetstandard = THEME:GetMetric("Player", "ReceptorArrowsYStandard") local function getNoteFieldHeight(pn) - local usingreverse = GAMESTATE:GetPlayerState(pn):GetCurrentPlayerOptions():UsingReverse() + local usingreverse = GAMESTATE:GetPlayerState():GetCurrentPlayerOptions():UsingReverse() if usingreverse then return SCREEN_CENTER_Y + yoffsetreverse else diff --git a/BGAnimations/ScreenGameplay overlay/messagebox.lua b/BGAnimations/ScreenGameplay overlay/messagebox.lua index 19365923..82538e47 100644 --- a/BGAnimations/ScreenGameplay overlay/messagebox.lua +++ b/BGAnimations/ScreenGameplay overlay/messagebox.lua @@ -1,5 +1,5 @@ local settext = BitmapText.settext -local isPractice = GAMESTATE:GetPlayerState(PLAYER_1):GetCurrentPlayerOptions():UsingPractice() +local isPractice = GAMESTATE:GetPlayerState():GetCurrentPlayerOptions():UsingPractice() local function highlight(self) self:queuecommand("Highlight") diff --git a/BGAnimations/ScreenGameplay overlay/npscalc.lua b/BGAnimations/ScreenGameplay overlay/npscalc.lua index e9872742..6458622f 100644 --- a/BGAnimations/ScreenGameplay overlay/npscalc.lua +++ b/BGAnimations/ScreenGameplay overlay/npscalc.lua @@ -193,7 +193,7 @@ local function npsDisplay(pn) end local function PLife(pn) - return STATSMAN:GetCurStageStats():GetPlayerStageStats(pn):GetCurrentLife() or 0 + return STATSMAN:GetCurStageStats():GetPlayerStageStats():GetCurrentLife() or 0 end local function npsGraph(pn) diff --git a/BGAnimations/ScreenGameplay underlay/SpeedChange.lua b/BGAnimations/ScreenGameplay underlay/SpeedChange.lua index 6d2a8529..e01fbedc 100644 --- a/BGAnimations/ScreenGameplay underlay/SpeedChange.lua +++ b/BGAnimations/ScreenGameplay underlay/SpeedChange.lua @@ -18,8 +18,8 @@ local t = Def.ActorFrame{ Name="SpeedChange", CodeMessageCommand = function(self, params) local pn = params.PlayerNumber - local po = GAMESTATE:GetPlayerState(pn):GetPlayerOptions("ModsLevel_Preferred") - local os = GAMESTATE:GetPlayerState(pn):GetPlayerOptionsString("ModsLevel_Preferred") + local po = GAMESTATE:GetPlayerState():GetPlayerOptions("ModsLevel_Preferred") + local os = GAMESTATE:GetPlayerState():GetPlayerOptionsString("ModsLevel_Preferred") local speedType = 1 -- 1 = x, 2 = c, 3 = m local xSpeed local cSpeed @@ -27,7 +27,7 @@ local t = Def.ActorFrame{ local topScreen = SCREENMAN:GetTopScreen() --Grab actors for the optionlines beside the profile avatar - if pn == PLAYER_1 and GAMESTATE:IsPlayerEnabled(PLAYER_1) then + if pn == PLAYER_1 and GAMESTATE:IsPlayerEnabled() then avatarOption = topScreen:GetChildren().Overlay:GetChildren().Avatars:GetChildren().P1Avatar:GetChildren().P1AvatarOption end @@ -66,9 +66,9 @@ local t = Def.ActorFrame{ end --Set the speedmod and set the player's option text. - if GAMESTATE:IsPlayerEnabled(pn) then - GAMESTATE:GetPlayerState(pn):SetPlayerOptions("ModsLevel_Preferred",GAMESTATE:GetPlayerState(pn):GetPlayerOptionsString("ModsLevel_Preferred")) - avatarOption:settext(GAMESTATE:GetPlayerState(pn):GetPlayerOptionsString('ModsLevel_Current')) + if GAMESTATE:IsPlayerEnabled() then + GAMESTATE:GetPlayerState():SetPlayerOptions("ModsLevel_Preferred",GAMESTATE:GetPlayerState():GetPlayerOptionsString("ModsLevel_Preferred")) + avatarOption:settext(GAMESTATE:GetPlayerState():GetPlayerOptionsString('ModsLevel_Current')) end end diff --git a/BGAnimations/ScreenGameplay underlay/default.lua b/BGAnimations/ScreenGameplay underlay/default.lua index 90ada7e4..d8011680 100644 --- a/BGAnimations/ScreenGameplay underlay/default.lua +++ b/BGAnimations/ScreenGameplay underlay/default.lua @@ -1,7 +1,7 @@ -local playeroptions = GAMESTATE:GetPlayerState(PLAYER_1):GetPlayerOptions("ModsLevel_Preferred") +local playeroptions = GAMESTATE:GetPlayerState():GetPlayerOptions("ModsLevel_Preferred") playeroptions:Mini(2 - playerConfig:get_data(pn_to_profile_slot(PLAYER_1)).ReceptorSize / 50) local profile = PROFILEMAN:GetProfile(PLAYER_1) -local replaystate = GAMESTATE:GetPlayerState(PLAYER_1):GetPlayerController() == "PlayerController_Replay" +local replaystate = GAMESTATE:GetPlayerState():GetPlayerController() == "PlayerController_Replay" if profile:IsCurrentChartPermamirror() and not replaystate then -- turn on mirror if song is flagged as perma mirror playeroptions:Mirror(true) end diff --git a/BGAnimations/ScreenPlayerOptions overlay.lua b/BGAnimations/ScreenPlayerOptions overlay.lua index 5d0dac92..fa16543f 100644 --- a/BGAnimations/ScreenPlayerOptions overlay.lua +++ b/BGAnimations/ScreenPlayerOptions overlay.lua @@ -37,7 +37,7 @@ t[#t+1] = Def.Actor{ self:queuecommand("Set") end, SetCommand=function(self) - if GAMESTATE:IsPlayerEnabled(PLAYER_1) then + if GAMESTATE:IsPlayerEnabled() then profileP1 = GetPlayerOrMachineProfile(PLAYER_1) if profileP1 ~= nil then if profileP1 == PROFILEMAN:GetMachineProfile() then diff --git a/BGAnimations/ScreenSelectMusic overlay/default.lua b/BGAnimations/ScreenSelectMusic overlay/default.lua index 7a898e80..7dbb54d9 100644 --- a/BGAnimations/ScreenSelectMusic overlay/default.lua +++ b/BGAnimations/ScreenSelectMusic overlay/default.lua @@ -48,7 +48,7 @@ local t = Def.ActorFrame{ CurrentSongChangedMessageCommand = function(self) if profile:IsCurrentChartPermamirror() then local modslevel = "ModsLevel_Preferred" - local playeroptions = GAMESTATE:GetPlayerState(PLAYER_1):GetPlayerOptions(modslevel) + local playeroptions = GAMESTATE:GetPlayerState():GetPlayerOptions(modslevel) playeroptions:Mirror(false) end end, diff --git a/BGAnimations/ScreenSelectMusic overlay/net/profilecard.lua b/BGAnimations/ScreenSelectMusic overlay/net/profilecard.lua index 7e220330..85af24d4 100644 --- a/BGAnimations/ScreenSelectMusic overlay/net/profilecard.lua +++ b/BGAnimations/ScreenSelectMusic overlay/net/profilecard.lua @@ -86,7 +86,7 @@ local function generalFrame(pn) local t = Def.ActorFrame{ SetCommand = function(self) self:xy(frameX,frameY) - self:visible(GAMESTATE:IsPlayerEnabled(pn)) + self:visible(GAMESTATE:IsPlayerEnabled()) end, UpdateInfoCommand = function(self) @@ -426,7 +426,7 @@ local function generalFrame(pn) self:stoptweening() self:decelerate(0.5) local meter = 0 - local enabled = GAMESTATE:IsPlayerEnabled(pn) + local enabled = GAMESTATE:IsPlayerEnabled() if enabled and steps[pn] ~= nil then meter = steps[pn]:GetMSD(getCurRateValue(),1) if meter == 0 then @@ -469,7 +469,7 @@ local function generalFrame(pn) self:stoptweening() self:decelerate(0.5) local meter = 0 - local enabled = GAMESTATE:IsPlayerEnabled(pn) + local enabled = GAMESTATE:IsPlayerEnabled() if enabled and steps[pn] ~= nil then meter = steps[pn]:GetMSD(getCurRateValue(),1) if meter == 0 then diff --git a/BGAnimations/ScreenSelectMusic overlay/profilecard.lua b/BGAnimations/ScreenSelectMusic overlay/profilecard.lua index 3b3d6828..933349a5 100644 --- a/BGAnimations/ScreenSelectMusic overlay/profilecard.lua +++ b/BGAnimations/ScreenSelectMusic overlay/profilecard.lua @@ -86,7 +86,7 @@ local function generalFrame(pn) local t = Def.ActorFrame{ SetCommand = function(self) self:xy(frameX,frameY) - self:visible(GAMESTATE:IsPlayerEnabled(pn)) + self:visible(GAMESTATE:IsPlayerEnabled()) end, UpdateInfoCommand = function(self) @@ -426,7 +426,7 @@ local function generalFrame(pn) self:stoptweening() self:decelerate(0.5) local meter = 0 - local enabled = GAMESTATE:IsPlayerEnabled(pn) + local enabled = GAMESTATE:IsPlayerEnabled() if enabled and steps[pn] ~= nil then meter = steps[pn]:GetMSD(getCurRateValue(),1) if meter == 0 then @@ -469,7 +469,7 @@ local function generalFrame(pn) self:stoptweening() self:decelerate(0.5) local meter = 0 - local enabled = GAMESTATE:IsPlayerEnabled(pn) + local enabled = GAMESTATE:IsPlayerEnabled() if enabled and steps[pn] ~= nil then meter = steps[pn]:GetMSD(getCurRateValue(),1) if meter == 0 then diff --git a/BGAnimations/ScreenSelectProfile overlay.lua b/BGAnimations/ScreenSelectProfile overlay.lua index 098431a5..4dfa1ada 100644 --- a/BGAnimations/ScreenSelectProfile overlay.lua +++ b/BGAnimations/ScreenSelectProfile overlay.lua @@ -151,7 +151,7 @@ function UpdateInternal3(self, Player) local smallframe = frame:GetChild('SmallFrame') local bigframe = frame:GetChild('BigFrame') - if GAMESTATE:IsHumanPlayer(Player) then + if GAMESTATE:IsHumanPlayer() then frame:visible(true) --using profile if any joinframe:visible(false) diff --git a/Graphics/Notefield board.lua b/Graphics/Notefield board.lua index 0eba0e1a..707388bb 100644 --- a/Graphics/Notefield board.lua +++ b/Graphics/Notefield board.lua @@ -38,7 +38,7 @@ local function LaneHighlight() local cols = style:ColumnsPerPlayer() local colWidth = width/cols local hCols = math.floor(cols / 2) - local reverse = GAMESTATE:GetPlayerState(PLAYER_1):GetCurrentPlayerOptions():UsingReverse() + local reverse = GAMESTATE:GetPlayerState():GetCurrentPlayerOptions():UsingReverse() local receptor = reverse and THEME:GetMetric("Player", "ReceptorArrowsYStandard") or THEME:GetMetric("Player", "ReceptorArrowsYReverse") local border = 4 diff --git a/Scripts/02 CustomizeGameplay.lua b/Scripts/02 CustomizeGameplay.lua index 6a83c383..c120a389 100644 --- a/Scripts/02 CustomizeGameplay.lua +++ b/Scripts/02 CustomizeGameplay.lua @@ -8,7 +8,7 @@ MovableValues = {} local function loadValuesTable() allowedCustomization = playerConfig:get_data(pn_to_profile_slot(PLAYER_1)).CustomizeGameplay - usingReverse = GAMESTATE:GetPlayerState(PLAYER_1):GetCurrentPlayerOptions():UsingReverse() + usingReverse = GAMESTATE:GetPlayerState():GetCurrentPlayerOptions():UsingReverse() MovableValues.JudgeX = playerConfig:get_data(pn_to_profile_slot(PLAYER_1)).GameplayXYCoordinates[keymode].JudgeX MovableValues.JudgeY = playerConfig:get_data(pn_to_profile_slot(PLAYER_1)).GameplayXYCoordinates[keymode].JudgeY MovableValues.JudgeZoom = playerConfig:get_data(pn_to_profile_slot(PLAYER_1)).GameplaySizes[keymode].JudgeZoom diff --git a/Scripts/02 GhettoGameState.lua b/Scripts/02 GhettoGameState.lua index 20786667..a3f61e9b 100644 --- a/Scripts/02 GhettoGameState.lua +++ b/Scripts/02 GhettoGameState.lua @@ -196,7 +196,7 @@ end -- Values based on ArrowEffects.cpp -- Gets the note scale from the mini mod being used. function GHETTOGAMESTATE.getNoteFieldScale(self, pn) - local po = GAMESTATE:GetPlayerState(pn):GetPlayerOptions('ModsLevel_Preferred') + local po = GAMESTATE:GetPlayerState():GetPlayerOptions('ModsLevel_Preferred') local val,as = po:Mini() local zoom = 1 zoom = 1-(val*0.5) From e74379b6b6186973bcfc507ec9a1e50337b22649 Mon Sep 17 00:00:00 2001 From: Barinade Date: Sat, 20 Feb 2021 15:46:31 -0600 Subject: [PATCH 18/35] Add 7/ctrl+7 for random song button hotkey --- .../ScreenSelectMusic overlay/tabs.lua | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/BGAnimations/ScreenSelectMusic overlay/tabs.lua b/BGAnimations/ScreenSelectMusic overlay/tabs.lua index 233f5bf8..648528ad 100644 --- a/BGAnimations/ScreenSelectMusic overlay/tabs.lua +++ b/BGAnimations/ScreenSelectMusic overlay/tabs.lua @@ -57,6 +57,24 @@ local function input(event) SCREENMAN:AddNewScreenToTop("ScreenDownload") elseif tonumber(event.char) == 6 then SCREENMAN:AddNewScreenToTop("ScreenPlaylistInfo") + elseif tonumber(event.char) == 7 then + if not CtrlPressed then + -- random all songs + local s = wheel:GetSongs() + if #s == 0 then return end + local rsong = s[math.random(#s)] + wheel:SelectSong(rsong) + else + -- random pack songs + local song = GAMESTATE:GetCurrentSong() + if GAMESTATE:GetSortOrder() == "SortOrder_Group" and song ~= nil then + local group = song:GetGroupName() + local s = wheel:GetSongsInGroup(group) + if #s == 0 then return end + local rsong = s[math.random(#s)] + wheel:SelectSong(rsong) + end + end end end From cf87bdf571da5c74e63cdaecb8784fc012fcbde5 Mon Sep 17 00:00:00 2001 From: Barinade Date: Tue, 2 Mar 2021 19:47:51 -0600 Subject: [PATCH 19/35] Move AAAAA to 99.9935 --- Scripts/Scores.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Scripts/Scores.lua b/Scripts/Scores.lua index 968049df..2e47a439 100644 --- a/Scripts/Scores.lua +++ b/Scripts/Scores.lua @@ -1,6 +1,6 @@ WifeTiers = { - Grade_Tier01 = 0.99996, + Grade_Tier01 = 0.999935, Grade_Tier02 = 0.9998, Grade_Tier03 = 0.9997, Grade_Tier04 = 0.99955, From fd564e8e033602df62b6da404906e7c769c188c6 Mon Sep 17 00:00:00 2001 From: Barinade Date: Sat, 20 Mar 2021 18:56:41 -0500 Subject: [PATCH 20/35] Fix CurrentStepsP1Changed command naming being broken this was changed at a point and it caused something scuffed to happen in the playercard i wonder if anyone noticed (does anyone have this build?) --- .../ScreenSelectMusic overlay/net/profilecard.lua | 7 +++---- BGAnimations/ScreenSelectMusic overlay/profilecard.lua | 8 ++++---- Graphics/MusicWheel highlight.lua | 2 +- Graphics/ScreenSelectMusic BPMDisplay.lua | 2 +- 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/BGAnimations/ScreenSelectMusic overlay/net/profilecard.lua b/BGAnimations/ScreenSelectMusic overlay/net/profilecard.lua index 85af24d4..19a4ea04 100644 --- a/BGAnimations/ScreenSelectMusic overlay/net/profilecard.lua +++ b/BGAnimations/ScreenSelectMusic overlay/net/profilecard.lua @@ -84,9 +84,10 @@ local hsTable = { local function generalFrame(pn) local t = Def.ActorFrame{ - SetCommand = function(self) + BeginCommand = function(self) self:xy(frameX,frameY) self:visible(GAMESTATE:IsPlayerEnabled()) + self:playcommand("Set") end, UpdateInfoCommand = function(self) @@ -109,11 +110,9 @@ local function generalFrame(pn) self:RunCommandsOnChildren(function(self) self:playcommand("Set") end) end, - BeginCommand = function(self) self:playcommand('Set') end, PlayerJoinedMessageCommand = function(self) self:playcommand("UpdateInfo") end, PlayerUnjoinedMessageCommand = function(self) self:playcommand("UpdateInfo") end, - CurrentSongChangedMessageCommand = function(self) self:playcommand("UpdateInfo") end, - CurrentStepsP1ChangedMessageCommand = function(self) self:playcommand("UpdateInfo") end, + CurrentStepsChangedMessageCommand = function(self) self:playcommand("UpdateInfo") end, CurrentRateChangedMessageCommand = function(self) self:playcommand("UpdateInfo") end } diff --git a/BGAnimations/ScreenSelectMusic overlay/profilecard.lua b/BGAnimations/ScreenSelectMusic overlay/profilecard.lua index 933349a5..e042c609 100644 --- a/BGAnimations/ScreenSelectMusic overlay/profilecard.lua +++ b/BGAnimations/ScreenSelectMusic overlay/profilecard.lua @@ -84,13 +84,15 @@ local hsTable = { local function generalFrame(pn) local t = Def.ActorFrame{ - SetCommand = function(self) + BeginCommand = function(self) self:xy(frameX,frameY) self:visible(GAMESTATE:IsPlayerEnabled()) + self:playcommand("UpdateInfo") end, UpdateInfoCommand = function(self) song = GAMESTATE:GetCurrentSong() + for _,pn in pairs(GAMESTATE:GetEnabledPlayers()) do profile[pn] = GetPlayerOrMachineProfile(pn) steps[pn] = GAMESTATE:GetCurrentSteps() @@ -109,11 +111,9 @@ local function generalFrame(pn) self:RunCommandsOnChildren(function(self) self:playcommand("Set") end) end, - BeginCommand = function(self) self:playcommand('Set') end, PlayerJoinedMessageCommand = function(self) self:playcommand("UpdateInfo") end, PlayerUnjoinedMessageCommand = function(self) self:playcommand("UpdateInfo") end, - CurrentSongChangedMessageCommand = function(self) self:playcommand("UpdateInfo") end, - CurrentStepsP1ChangedMessageCommand = function(self) self:playcommand("UpdateInfo") end, + CurrentStepsChangedMessageCommand = function(self) self:playcommand("UpdateInfo") end, CurrentRateChangedMessageCommand = function(self) self:playcommand("UpdateInfo") end } diff --git a/Graphics/MusicWheel highlight.lua b/Graphics/MusicWheel highlight.lua index 07f1a728..1300a247 100644 --- a/Graphics/MusicWheel highlight.lua +++ b/Graphics/MusicWheel highlight.lua @@ -16,7 +16,7 @@ return Def.ActorFrame{ self:effectcolor2(Alpha(getMainColor("highlight"),0.2)) end end, - CurrentStepsP1ChangedMessageCommand = function(self) self:queuecommand('Set') end + CurrentStepsChangedMessageCommand = function(self) self:queuecommand('Set') end } } \ No newline at end of file diff --git a/Graphics/ScreenSelectMusic BPMDisplay.lua b/Graphics/ScreenSelectMusic BPMDisplay.lua index 5c4b2ba7..ca3b2e6a 100644 --- a/Graphics/ScreenSelectMusic BPMDisplay.lua +++ b/Graphics/ScreenSelectMusic BPMDisplay.lua @@ -8,5 +8,5 @@ return Def.BPMDisplay { CurrentSongChangedMessageCommand = function(self) self:playcommand("Set") end, CurrentCourseChangedMessageCommand = function(self) self:playcommand("Set") end, CurrentRateChangedMessageCommand = function(self) self:playcommand("Set") end, - CurrentStepsP1ChangedMessageCommand = function(self) self:playcommand("Set") end + CurrentStepsChangedMessageCommand = function(self) self:playcommand("Set") end } \ No newline at end of file From fb87b920a414c969aac0b349565765046f558ba9 Mon Sep 17 00:00:00 2001 From: Barinade Date: Wed, 24 Mar 2021 22:21:51 -0500 Subject: [PATCH 21/35] Add NSPreview to PlayerOptions --- BGAnimations/ScreenPlayerOptions overlay.lua | 76 ++++++++++++++++++++ 1 file changed, 76 insertions(+) diff --git a/BGAnimations/ScreenPlayerOptions overlay.lua b/BGAnimations/ScreenPlayerOptions overlay.lua index fa16543f..f14a554d 100644 --- a/BGAnimations/ScreenPlayerOptions overlay.lua +++ b/BGAnimations/ScreenPlayerOptions overlay.lua @@ -169,5 +169,81 @@ t[#t+1] = Def.ActorFrame{ } } +local NSPreviewSize = 0.5 +local NSPreviewX = 20 +local NSPreviewY = 125 +local NSPreviewXSpan = 35 +local NSPreviewReceptorY = -30 +local OptionRowHeight = 35 +local NoteskinRow = 0 +local NSDirTable = GameToNSkinElements() + +local function NSkinPreviewWrapper(dir, ele) + return Def.ActorFrame { + InitCommand = function(self) + self:zoom(NSPreviewSize) + end, + LoadNSkinPreview("Get", dir, ele, PLAYER_1) + } +end +local function NSkinPreviewExtraTaps() + local out = Def.ActorFrame {} + for i = 2, #NSDirTable do + out[#out+1] = Def.ActorFrame { + Def.ActorFrame { + InitCommand = function(self) + self:x(NSPreviewXSpan * (i-1)) + end, + NSkinPreviewWrapper(NSDirTable[i], "Tap Note") + }, + Def.ActorFrame { + InitCommand = function(self) + self:x(NSPreviewXSpan * (i-1)):y(NSPreviewReceptorY) + end, + NSkinPreviewWrapper(NSDirTable[i], "Receptor") + } + } + end + return out +end +t[#t + 1] = + Def.ActorFrame { + OnCommand = function(self) + self:xy(NSPreviewX, NSPreviewY) + for i = 0, SCREENMAN:GetTopScreen():GetNumRows() - 1 do + if SCREENMAN:GetTopScreen():GetOptionRow(i) and SCREENMAN:GetTopScreen():GetOptionRow(i):GetName() == "NoteSkins" then + NoteskinRow = i + end + end + self:SetUpdateFunction( + function(self) + local row = SCREENMAN:GetTopScreen():GetCurrentRowIndex(PLAYER_1) + local pos = 0 + if row > 4 then + pos = + NSPreviewY + NoteskinRow * OptionRowHeight - + (SCREENMAN:GetTopScreen():GetCurrentRowIndex(PLAYER_1) - 4) * OptionRowHeight + else + pos = NSPreviewY + NoteskinRow * OptionRowHeight + end + self:y(pos) + self:visible(NoteskinRow - row > -3 and NoteskinRow - row < 7) + end + ) + end, + Def.ActorFrame { + NSkinPreviewWrapper(NSDirTable[1], "Tap Note") + }, + Def.ActorFrame { + InitCommand = function(self) + self:y(NSPreviewReceptorY) + end, + NSkinPreviewWrapper(NSDirTable[1], "Receptor") + } +} +if GetScreenAspectRatio() > 1.7 then + t[#t][#(t[#t]) + 1] = NSkinPreviewExtraTaps() +end + t[#t+1] = LoadActor("_frame") return t \ No newline at end of file From a65a175308eef590c8657635b2e6971955134fd9 Mon Sep 17 00:00:00 2001 From: Barinade Date: Wed, 24 Mar 2021 23:02:49 -0500 Subject: [PATCH 22/35] Fix exp not updating without restarting game --- BGAnimations/ScreenEvaluation underlay.lua | 2 ++ BGAnimations/ScreenGameplay underlay/default.lua | 1 + Scripts/Levels.lua | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/BGAnimations/ScreenEvaluation underlay.lua b/BGAnimations/ScreenEvaluation underlay.lua index 7ff34638..d37e6662 100644 --- a/BGAnimations/ScreenEvaluation underlay.lua +++ b/BGAnimations/ScreenEvaluation underlay.lua @@ -14,6 +14,8 @@ local brightness = 0.4 local t = Def.ActorFrame{} +setCurExp(PLAYER_1) + t[#t+1] = LoadActor("_background") if enabled and bgType == 1 then -- SONG BG diff --git a/BGAnimations/ScreenGameplay underlay/default.lua b/BGAnimations/ScreenGameplay underlay/default.lua index d8011680..66374c26 100644 --- a/BGAnimations/ScreenGameplay underlay/default.lua +++ b/BGAnimations/ScreenGameplay underlay/default.lua @@ -7,6 +7,7 @@ if profile:IsCurrentChartPermamirror() and not replaystate then -- turn on mirro end setMovableKeymode(getCurrentKeyMode()) +setCurExp(PLAYER_1) local t = Def.ActorFrame{} diff --git a/Scripts/Levels.lua b/Scripts/Levels.lua index 349367f8..83c03fee 100644 --- a/Scripts/Levels.lua +++ b/Scripts/Levels.lua @@ -9,7 +9,7 @@ local curExp = { function getProfileExp(pn) local profile = PROFILEMAN:GetProfile(pn) if profile ~= nil then - return math.floor(profile:GetTotalDancePoints()/10 + profile:GetTotalNumSongsPlayed()*50) + return math.floor(profile:GetTotalDancePoints()/10 + SCOREMAN:GetTotalNumberOfScores()*50) else return 0 end From dc703e3622c8fdf42651230942a79e2b79950018 Mon Sep 17 00:00:00 2001 From: Barinade Date: Thu, 25 Mar 2021 18:43:43 -0500 Subject: [PATCH 23/35] Automatically log in upon entering SelectMusic --- .../ScreenSelectMusic overlay/net/profilecard.lua | 10 ++++++++++ BGAnimations/ScreenSelectMusic overlay/profilecard.lua | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/BGAnimations/ScreenSelectMusic overlay/net/profilecard.lua b/BGAnimations/ScreenSelectMusic overlay/net/profilecard.lua index 19a4ea04..5578e80f 100644 --- a/BGAnimations/ScreenSelectMusic overlay/net/profilecard.lua +++ b/BGAnimations/ScreenSelectMusic overlay/net/profilecard.lua @@ -1,6 +1,16 @@ local t = Def.ActorFrame{ InitCommand = function(self) self:delayedFadeIn(6) + + -- auto login + local user = playerConfig:get_data(pn_to_profile_slot(PLAYER_1)).Username + local passToken = playerConfig:get_data(pn_to_profile_slot(PLAYER_1)).Password + if passToken ~= "" and answer ~= "" then + if not DLMAN:IsLoggedIn() then + DLMAN:LoginWithToken(user, passToken) + end + end + end, OffCommand = function(self) self:sleep(0.05) diff --git a/BGAnimations/ScreenSelectMusic overlay/profilecard.lua b/BGAnimations/ScreenSelectMusic overlay/profilecard.lua index e042c609..09eda877 100644 --- a/BGAnimations/ScreenSelectMusic overlay/profilecard.lua +++ b/BGAnimations/ScreenSelectMusic overlay/profilecard.lua @@ -1,6 +1,16 @@ local t = Def.ActorFrame{ InitCommand = function(self) self:delayedFadeIn(6) + + -- auto login + local user = playerConfig:get_data(pn_to_profile_slot(PLAYER_1)).Username + local passToken = playerConfig:get_data(pn_to_profile_slot(PLAYER_1)).Password + if passToken ~= "" and answer ~= "" then + if not DLMAN:IsLoggedIn() then + DLMAN:LoginWithToken(user, passToken) + end + end + end, OffCommand = function(self) self:sleep(0.05) From 0bb432c3d558defee56d06652a4f36256578ee95 Mon Sep 17 00:00:00 2001 From: Barinade Date: Sun, 4 Apr 2021 17:35:07 -0500 Subject: [PATCH 24/35] Fix song search not allowing + and various characters --- BGAnimations/ScreenSelectMusic overlay/currentsort.lua | 5 +---- BGAnimations/ScreenSelectMusic overlay/net/currentsort.lua | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/BGAnimations/ScreenSelectMusic overlay/currentsort.lua b/BGAnimations/ScreenSelectMusic overlay/currentsort.lua index 69898357..bb89c9ee 100644 --- a/BGAnimations/ScreenSelectMusic overlay/currentsort.lua +++ b/BGAnimations/ScreenSelectMusic overlay/currentsort.lua @@ -87,9 +87,6 @@ local function searchInput(event) elseif event.DeviceInput.button == "DeviceButton_delete" then searchstring = "" - elseif event.DeviceInput.button == "DeviceButton_=" then - searchstring = searchstring.."=" - elseif event.DeviceInput.button == "DeviceButton_v" and CtrlPressed then searchstring = searchstring .. HOOKS:GetClipboard() @@ -97,7 +94,7 @@ local function searchInput(event) if CtrlPressed then return false end - if event.char and event.char:match('[%%%+%-%!%@%#%$%^%&%*%(%)%=%_%.%,%:%;%\'%"%>%<%?%/%~%|%w]') and event.char ~= "" then + if event.char and event.char:match('[%%%+%-%!%@%#%$%^%&%*%(%)%=%_%.%,%:%;%\'%"%>%<%?%/%~%|%w%[%]%{%}%`%\\]') and event.char ~= "" then searchstring = searchstring .. event.char end end diff --git a/BGAnimations/ScreenSelectMusic overlay/net/currentsort.lua b/BGAnimations/ScreenSelectMusic overlay/net/currentsort.lua index 20a971b4..4a2638d5 100644 --- a/BGAnimations/ScreenSelectMusic overlay/net/currentsort.lua +++ b/BGAnimations/ScreenSelectMusic overlay/net/currentsort.lua @@ -87,9 +87,6 @@ local function searchInput(event) elseif event.DeviceInput.button == "DeviceButton_delete" then searchstring = "" - elseif event.DeviceInput.button == "DeviceButton_=" then - searchstring = searchstring.."=" - elseif event.DeviceInput.button == "DeviceButton_v" and CtrlPressed then searchstring = searchstring .. HOOKS:GetClipboard() @@ -97,7 +94,7 @@ local function searchInput(event) if CtrlPressed then return false end - if event.char and event.char:match('[%%%+%-%!%@%#%$%^%&%*%(%)%=%_%.%,%:%;%\'%"%>%<%?%/%~%|%w]') and event.char ~= "" then + if event.char and event.char:match('[%%%+%-%!%@%#%$%^%&%*%(%)%=%_%.%,%:%;%\'%"%>%<%?%/%~%|%w%[%]%{%}%`%\\]') and event.char ~= "" then searchstring = searchstring .. event.char end end From 41495396d54388f4b0d921871f9a04d287613c55 Mon Sep 17 00:00:00 2001 From: Barinade Date: Fri, 23 Apr 2021 11:31:50 -0500 Subject: [PATCH 25/35] Add nowplaying.txt like in Til Death not tested but should just work --- .../ScreenGameplay overlay/WifeJudgmentSpotting.lua | 7 +++++++ BGAnimations/ScreenNetSelectMusic underlay.lua | 1 + BGAnimations/ScreenSelectMusic underlay.lua | 1 + 3 files changed, 9 insertions(+) diff --git a/BGAnimations/ScreenGameplay overlay/WifeJudgmentSpotting.lua b/BGAnimations/ScreenGameplay overlay/WifeJudgmentSpotting.lua index 800c2398..2058bcb1 100644 --- a/BGAnimations/ScreenGameplay overlay/WifeJudgmentSpotting.lua +++ b/BGAnimations/ScreenGameplay overlay/WifeJudgmentSpotting.lua @@ -184,6 +184,13 @@ local t = local state = "MSD: " .. string.format("%05.2f", GAMESTATE:GetCurrentSteps():GetMSD(getCurRateValue(), 1)) local endTime = os.time() + GetPlayableTime() GAMESTATE:UpdateDiscordPresence(largeImageTooltip, detail, state, endTime) + local streamerstuff = + "Now playing " .. + GAMESTATE:GetCurrentSong():GetDisplayMainTitle() .. + " by " .. + GAMESTATE:GetCurrentSong():GetDisplayArtist() .. + " in " .. GAMESTATE:GetCurrentSong():GetGroupName() .. " " .. state + File.Write("nowplaying.txt", streamerstuff) screen = SCREENMAN:GetTopScreen() usingReverse = GAMESTATE:GetPlayerState():GetCurrentPlayerOptions():UsingReverse() diff --git a/BGAnimations/ScreenNetSelectMusic underlay.lua b/BGAnimations/ScreenNetSelectMusic underlay.lua index 4250d647..0b40bd71 100644 --- a/BGAnimations/ScreenNetSelectMusic underlay.lua +++ b/BGAnimations/ScreenNetSelectMusic underlay.lua @@ -4,5 +4,6 @@ t[#t+1] = LoadActor("_songbg") t[#t+1] = LoadActor("_particles") GHETTOGAMESTATE:resetGoalTable() -- refresh the goal table entering SSM +File.Write("nowplaying.txt", " ") return t \ No newline at end of file diff --git a/BGAnimations/ScreenSelectMusic underlay.lua b/BGAnimations/ScreenSelectMusic underlay.lua index 4250d647..0b40bd71 100644 --- a/BGAnimations/ScreenSelectMusic underlay.lua +++ b/BGAnimations/ScreenSelectMusic underlay.lua @@ -4,5 +4,6 @@ t[#t+1] = LoadActor("_songbg") t[#t+1] = LoadActor("_particles") GHETTOGAMESTATE:resetGoalTable() -- refresh the goal table entering SSM +File.Write("nowplaying.txt", " ") return t \ No newline at end of file From e2cb1c4bf969eb70824e5467b5268dae2faf7bb1 Mon Sep 17 00:00:00 2001 From: Barinade Date: Sun, 2 May 2021 00:57:39 -0500 Subject: [PATCH 26/35] Fix cursor diamond being visible in borderless windowed --- Scripts/02 GhettoGameState.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Scripts/02 GhettoGameState.lua b/Scripts/02 GhettoGameState.lua index a3f61e9b..f4c1b651 100644 --- a/Scripts/02 GhettoGameState.lua +++ b/Scripts/02 GhettoGameState.lua @@ -190,7 +190,7 @@ end --returns true if windowed. function GHETTOGAMESTATE.isWindowed() - return PREFSMAN:GetPreference("Windowed") + return PREFSMAN:GetPreference("Windowed") or PREFSMAN:GetPreference("FullscreenIsBorderlessWindow") end -- Values based on ArrowEffects.cpp From e9ad37aeea4bf25e95b3004d5da9770091ab5998 Mon Sep 17 00:00:00 2001 From: Barinade Date: Sat, 15 May 2021 01:24:06 -0500 Subject: [PATCH 27/35] Add ungrouped sort compatibility --- BGAnimations/ScreenSelectMusic overlay/currentsort.lua | 1 + BGAnimations/ScreenSelectMusic overlay/net/currentsort.lua | 1 + 2 files changed, 2 insertions(+) diff --git a/BGAnimations/ScreenSelectMusic overlay/currentsort.lua b/BGAnimations/ScreenSelectMusic overlay/currentsort.lua index bb89c9ee..0a8f7ac2 100644 --- a/BGAnimations/ScreenSelectMusic overlay/currentsort.lua +++ b/BGAnimations/ScreenSelectMusic overlay/currentsort.lua @@ -34,6 +34,7 @@ local sortTable = { SortOrder_JackSpeed = 'JackSpeed Rating', SortOrder_Chordjack = 'Chordjack Rating', SortOrder_Technical = 'Technical Rating', + SortOrder_Ungrouped = 'Ungrouped', } local function searchInput(event) diff --git a/BGAnimations/ScreenSelectMusic overlay/net/currentsort.lua b/BGAnimations/ScreenSelectMusic overlay/net/currentsort.lua index 4a2638d5..1b43f997 100644 --- a/BGAnimations/ScreenSelectMusic overlay/net/currentsort.lua +++ b/BGAnimations/ScreenSelectMusic overlay/net/currentsort.lua @@ -34,6 +34,7 @@ local sortTable = { SortOrder_JackSpeed = 'JackSpeed Rating', SortOrder_Chordjack = 'Chordjack Rating', SortOrder_Technical = 'Technical Rating', + SortOrder_Ungrouped = 'Ungrouped', } local function searchInput(event) From 8812a4038ef5e9c4a7fa079b6893cb91e7396762 Mon Sep 17 00:00:00 2001 From: Barinade Date: Sat, 15 May 2021 01:32:32 -0500 Subject: [PATCH 28/35] Add judge indicator to scores in musicinfo --- BGAnimations/ScreenMusicInfo overlay/default.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/BGAnimations/ScreenMusicInfo overlay/default.lua b/BGAnimations/ScreenMusicInfo overlay/default.lua index fed4eca7..1b8ed436 100644 --- a/BGAnimations/ScreenMusicInfo overlay/default.lua +++ b/BGAnimations/ScreenMusicInfo overlay/default.lua @@ -843,7 +843,13 @@ local function scoreList() local w4 = scoreList[scoreIndex]:GetTapNoteScore("TapNoteScore_W4") local w5 = scoreList[scoreIndex]:GetTapNoteScore("TapNoteScore_W5") local miss = scoreList[scoreIndex]:GetTapNoteScore("TapNoteScore_Miss") - self:settextf("%0.2f%% - %d / %d / %d / %d / %d / %d",math.floor(score*10000)/100, w1, w2, w3, w4, w5, miss) + if PREFSMAN:GetPreference("SortBySSRNormPercent") then + self:settextf("%0.2f%% - %d / %d / %d / %d / %d / %d",math.floor(score*10000)/100, w1, w2, w3, w4, w5, miss) + else + local judgestr = table.find(ms.JudgeScalers, notShit.round(scoreList[scoreIndex]:GetJudgeScale(), 2)) + if judgestr == nil then judgestr = 4 end + self:settextf("%0.2f%% (J%d) - %d / %d / %d / %d / %d / %d",math.floor(score*10000)/100, judgestr, w1, w2, w3, w4, w5, miss) + end self:x(self:GetParent():GetChild("Grade"):GetX()+(self:GetParent():GetChild("Grade"):GetWidth()*0.4)+5) end } From b6a5670efa6bb4259e1794c0ef4c1a76f9141854 Mon Sep 17 00:00:00 2001 From: Barinade Date: Thu, 20 May 2021 22:15:59 -0500 Subject: [PATCH 29/35] fix eval throwing error because of pss function change --- BGAnimations/ScreenEvaluation decorations/default.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BGAnimations/ScreenEvaluation decorations/default.lua b/BGAnimations/ScreenEvaluation decorations/default.lua index c00239da..3dad022b 100644 --- a/BGAnimations/ScreenEvaluation decorations/default.lua +++ b/BGAnimations/ScreenEvaluation decorations/default.lua @@ -109,7 +109,7 @@ local function oldEvalStuff() end if not tst[judge] then return end tst = tst[judge] - SCREENMAN:GetTopScreen():SetPlayerStageStatsFromReplayData(SCREENMAN:GetTopScreen():GetStageStats():GetPlayerStageStats(), tst) + SCREENMAN:GetTopScreen():SetPlayerStageStatsFromReplayData(SCREENMAN:GetTopScreen():GetStageStats():GetPlayerStageStats(), tst, pss:GetHighScore()) end } From 4198a8bdea47e57312482875704cc72c71be59e0 Mon Sep 17 00:00:00 2001 From: Barinade Date: Sat, 14 Aug 2021 20:48:28 -0500 Subject: [PATCH 30/35] fix misscount being called cbs now --- .../ScreenEvaluation decorations/default.lua | 12 ++++++------ .../ScreenSelectMusic overlay/net/profilecard.lua | 2 +- .../ScreenSelectMusic overlay/profilecard.lua | 2 +- Scripts/Scores.lua | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/BGAnimations/ScreenEvaluation decorations/default.lua b/BGAnimations/ScreenEvaluation decorations/default.lua index 3dad022b..469d2101 100644 --- a/BGAnimations/ScreenEvaluation decorations/default.lua +++ b/BGAnimations/ScreenEvaluation decorations/default.lua @@ -901,7 +901,7 @@ local function oldEvalStuff() self:diffuse(color(colorConfig:get_data().evaluation.ScoreCardText)) end, SetCommand = function(self) - local missCount = getScoreMissCount(curScore) + local missCount = getScoreComboBreaks(curScore) self:settext(missCount) end } @@ -915,7 +915,7 @@ local function oldEvalStuff() end, SetCommand = function(self) local score = getBestMissCount(pn,index, rate) - local missCount = getScoreMissCount(score) + local missCount = getScoreComboBreaks(score) if missCount ~= nil then self:settext(missCount) @@ -934,8 +934,8 @@ local function oldEvalStuff() SetCommand = function(self) local score = getBestMissCount(pn,index, rate) - local recMissCount = getScoreMissCount(score) - local curMissCount = getScoreMissCount(curScore) + local recMissCount = getScoreComboBreaks(score) + local curMissCount = getScoreComboBreaks(curScore) local diff = 0 if score ~= nil then @@ -966,8 +966,8 @@ local function oldEvalStuff() end, SetCommand = function(self) local score = getBestMissCount(pn,index, rate) - local recMissCount = getScoreMissCount(score) - local curMissCount = getScoreMissCount(curScore) + local recMissCount = getScoreComboBreaks(score) + local curMissCount = getScoreComboBreaks(curScore) local diff = 0 local extra = "" diff --git a/BGAnimations/ScreenSelectMusic overlay/net/profilecard.lua b/BGAnimations/ScreenSelectMusic overlay/net/profilecard.lua index 5578e80f..169433bc 100644 --- a/BGAnimations/ScreenSelectMusic overlay/net/profilecard.lua +++ b/BGAnimations/ScreenSelectMusic overlay/net/profilecard.lua @@ -633,7 +633,7 @@ local function generalFrame(pn) SetCommand = function(self) local score = getBestMissCount(pn, 0, getCurRate()) if score ~= nil then - self:settext("Miss Count: "..getScoreMissCount(score)) + self:settext("Miss Count: "..getScoreComboBreaks(score)) else self:settext("Miss Count: -") end diff --git a/BGAnimations/ScreenSelectMusic overlay/profilecard.lua b/BGAnimations/ScreenSelectMusic overlay/profilecard.lua index 09eda877..afd2738b 100644 --- a/BGAnimations/ScreenSelectMusic overlay/profilecard.lua +++ b/BGAnimations/ScreenSelectMusic overlay/profilecard.lua @@ -634,7 +634,7 @@ local function generalFrame(pn) SetCommand = function(self) local score = getBestMissCount(pn, 0, getCurRate()) if score ~= nil then - self:settext("Miss Count: "..getScoreMissCount(score)) + self:settext("Miss Count: "..getScoreComboBreaks(score)) else self:settext("Miss Count: -") end diff --git a/Scripts/Scores.lua b/Scripts/Scores.lua index 2e47a439..30bf1ebd 100644 --- a/Scripts/Scores.lua +++ b/Scripts/Scores.lua @@ -222,7 +222,7 @@ function getBestMissCount(pn,ignore, rate) indexScore = hsTable[i] if indexScore ~= nil then if indexScore:GetGrade() ~= "Grade_Failed" then - temp = getScoreMissCount(indexScore) + temp = getScoreComboBreaks(indexScore) if temp < lowest then lowest = temp bestScore = indexScore From 3c1781a2b010e3e00b34a83c36fbb82d41986ea2 Mon Sep 17 00:00:00 2001 From: Barinade Date: Sat, 14 Aug 2021 20:49:32 -0500 Subject: [PATCH 31/35] add mean, sd, and time to offsetplot hovering --- Graphics/OffsetGraph.lua | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/Graphics/OffsetGraph.lua b/Graphics/OffsetGraph.lua index 4fd1aea9..a004bed5 100644 --- a/Graphics/OffsetGraph.lua +++ b/Graphics/OffsetGraph.lua @@ -164,6 +164,10 @@ t[#t+1] = Def.Quad{ local row = convertXToRow(xpos) local judgments = SCREENMAN:GetTopScreen():GetReplaySnapshotJudgmentsForNoterow(row) local wifescore = SCREENMAN:GetTopScreen():GetReplaySnapshotWifePercentForNoterow(row) * 100 + local mean = SCREENMAN:GetTopScreen():GetReplaySnapshotMeanForNoterow(row) + local sd = SCREENMAN:GetTopScreen():GetReplaySnapshotSDForNoterow(row) + local timebro = td:GetElapsedTimeFromNoteRow(row) / getCurRateValue() + local marvCount = judgments[10] local perfCount = judgments[9] local greatCount = judgments[8] @@ -173,7 +177,18 @@ t[#t+1] = Def.Quad{ --txt:settextf("x %f\nrow %f\nbeat %f\nfinalsecond %f", xpos, row, row/48, finalSecond) -- The odd formatting here is in case we want to add translation support. - txt:settextf("%f%%\n%s: %d\n%s: %d\n%s: %d\n%s: %d\n%s: %d\n%s: %d", wifescore, "Marvelous", marvCount, "Perfect", perfCount, "Great", greatCount, "Good", goodCount, "Bad", badCount, "Miss", missCount) + txt:settextf("%f%%\n%s: %d\n%s: %d\n%s: %d\n%s: %d\n%s: %d\n%s: %d\n%s: %0.2fms\n%s: %0.2fms\n%s: %0.2fs", + wifescore, + "Marvelous", marvCount, + "Perfect", perfCount, + "Great", greatCount, + "Good", goodCount, + "Bad", badCount, + "Miss", missCount, + "Std. Dev", sd, + "Mean", mean, + "Time", timebro + ) else bar:visible(false) txt:visible(false) From a3b1b3dc82d7051feb212c5d32c90519b1287e37 Mon Sep 17 00:00:00 2001 From: Barinade Date: Sun, 15 Aug 2021 23:28:22 -0500 Subject: [PATCH 32/35] fix asset settings being rarely out of order --- .../ScreenAssetSettings overlay/default.lua | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/BGAnimations/ScreenAssetSettings overlay/default.lua b/BGAnimations/ScreenAssetSettings overlay/default.lua index a978df10..b28dd068 100644 --- a/BGAnimations/ScreenAssetSettings overlay/default.lua +++ b/BGAnimations/ScreenAssetSettings overlay/default.lua @@ -2,13 +2,12 @@ local top local profile = PROFILEMAN:GetProfile(PLAYER_1) -local curType = 1 -local assetTypes = {} -for k,v in pairs(assetFolders) do - assetTypes[curType] = k - curType = curType + 1 -end -curType = 2 +local curType = 2 +local assetTypes = { + "toasty", + "avatar", + "judgment", +} local maxPage = 1 local curPage = 1 From 1c85d04bb834971178a4f0952d8955f1750efe4a Mon Sep 17 00:00:00 2001 From: Barinade Date: Mon, 15 Nov 2021 18:58:19 -0600 Subject: [PATCH 33/35] fix player options being broken --- Languages/en.ini | 3 ++- metrics.ini | 12 ++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/Languages/en.ini b/Languages/en.ini index ad60cca6..ac5389ae 100644 --- a/Languages/en.ini +++ b/Languages/en.ini @@ -107,6 +107,7 @@ PersonalBest = Personal Best 3.0x=3.0x [OptionTitles] +Rate=Rate DefaultScoreType =Default ScoreType TipType =Tip Type SongBGEnabled =Show Background @@ -142,7 +143,7 @@ InstantSearch=Instant Search [OptionExplanations] Avatars=Set Avatars. - +Rate=Playback rate of the Song. DefaultScoreType =Default ScoreType TipType =Sets the Tiptype to either display tips or random quotes and phrases or nothing at all. diff --git a/metrics.ini b/metrics.ini index 02d31b15..83f6dbcd 100644 --- a/metrics.ini +++ b/metrics.ini @@ -435,6 +435,18 @@ PlayerNameplateP1X= PlayerNameplateP1Y= LineNames="1,Rate,CG,PRAC,8,RS,14,2,3A,3B,4,5,R1,R2,7,9,10,13,SF,LDB,DispPct,DispMen,JT,TTT,TTG,TTM,EB,LC,CH,NPS,16,LD,JD,BG,BGB,Fail" +Line1="lua,ArbitrarySpeedMods()" +Line5="list,Turn" +Line7="list,Scroll" +Line9="list,Holds" +Line13="list,Hide" +Line16="list,Steps" +Line4="list,Appearance" +Line3A="list,EffectsReceptor" +Line3B="list,EffectsArrow" +Line2="list,Accel" +Line14="list,Persp" +Line8="list,NoteSkins" Line10="list,Mines" LineSF="lua,OptionRowScreenFilter()" LineJT="lua,JudgeType()" From 3f2d477c76cd8fe4e644182f765d4dacc3be4eff Mon Sep 17 00:00:00 2001 From: Barinade Date: Fri, 10 Dec 2021 18:38:55 -0600 Subject: [PATCH 34/35] update version --- Scripts/00 ThemeInfo.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Scripts/00 ThemeInfo.lua b/Scripts/00 ThemeInfo.lua index 44cdb986..3202b7ba 100644 --- a/Scripts/00 ThemeInfo.lua +++ b/Scripts/00 ThemeInfo.lua @@ -3,7 +3,7 @@ themeInfo = { Name = "spawncamping-wallhack (etterna .71.0)", Version = "2.2.6", -- a.b.c, a for complete overhauls, b for major releases, c for minor additions/bugfix. - Date = "20200923", + Date = "20211210", } function getThemeName() From db6a660bb0daf1c84e338a5fd8e72ecac002afc2 Mon Sep 17 00:00:00 2001 From: Barinade Date: Fri, 10 Dec 2021 18:40:07 -0600 Subject: [PATCH 35/35] update readme to be more specific --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4da0e77b..86a65aff 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -Refer to poco's fork for the latest theme for the etterna client. +Refer to poco's fork for development builds of this theme. https://github.com/poco0317/spawncamping-wallhack