Skip to content

Commit

Permalink
rename SetPlayerStageStatsFromReplayData to RescoreReplay
Browse files Browse the repository at this point in the history
nobody can stop me
  • Loading branch information
poco0317 committed Dec 18, 2022
1 parent 6d538c0 commit 754bbbe
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ local t = Def.ActorFrame {
if PREFSMAN:GetPreference("SortBySSRNormPercent") then
forcedScreenEntryJudgeWindow = 4
-- update replaysnapshots and pss for current score being rejudged to j4
screen:SetPlayerStageStatsFromReplayData(pss, ms.JudgeScalers[forcedScreenEntryJudgeWindow], score)
screen:RescoreReplay(pss, ms.JudgeScalers[forcedScreenEntryJudgeWindow], score)
end

--- propagate set command through children with the song
Expand All @@ -62,7 +62,7 @@ local t = Def.ActorFrame {

-- we assume the score has a replay
-- recalculate playerstagestats using the replay
screen:SetPlayerStageStatsFromReplayData(pss, ms.JudgeScalers[judgeSetting], params.score)
screen:RescoreReplay(pss, ms.JudgeScalers[judgeSetting], params.score)

chosenScore = params.score

Expand Down
2 changes: 1 addition & 1 deletion Themes/Rebirth/BGAnimations/offsetplot.lua
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ local t = Def.ActorFrame {
if isOver(bg) then
local top = SCREENMAN:GetTopScreen()
-- dont break if it will break (we can only do this from the eval screen)
if not top.SetPlayerStageStatsFromReplayData then
if not top.RescoreReplay then
return
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ local function GraphDisplay(pn)
RecalculateGraphsMessageCommand = function(self, params)
-- called by the end of a codemessagecommand somewhere else
if not tso[params.judge] then return end
local success = SCREENMAN:GetTopScreen():SetPlayerStageStatsFromReplayData(SCREENMAN:GetTopScreen():GetStageStats():GetPlayerStageStats(), tso[params.judge], score)
local success = SCREENMAN:GetTopScreen():RescoreReplay(SCREENMAN:GetTopScreen():GetStageStats():GetPlayerStageStats(), tso[params.judge], score)
if not success then return end
self:playcommand("Begin")
MESSAGEMAN:Broadcast("SetComboGraph")
Expand Down
7 changes: 3 additions & 4 deletions src/Etterna/Screen/Others/ScreenEvaluation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -268,11 +268,10 @@ class LunaScreenEvaluation : public Luna<ScreenEvaluation>
LuaHelpers::Push(L, p->GetStageStats());
return 1;
}
static int SetPlayerStageStatsFromReplayData(T* p, lua_State* L)
static int RescoreReplay(T* p, lua_State* L)
{
Locator::getLogger()->info("Setting PSS from ReplayData via Lua");
Locator::getLogger()->info("Rescoring ReplayData via Lua");
PlayerStageStats* pPSS = Luna<PlayerStageStats>::check(L, 1);
NoteData nd = GAMESTATE->m_pCurSteps->GetNoteData();

// allow either a highscore or nothing, which defaults to most recent
HighScore* hs;
Expand Down Expand Up @@ -359,7 +358,7 @@ class LunaScreenEvaluation : public Luna<ScreenEvaluation>
LunaScreenEvaluation()
{
ADD_METHOD(GetStageStats);
ADD_METHOD(SetPlayerStageStatsFromReplayData);
ADD_METHOD(RescoreReplay);
ADD_METHOD(GetReplayRate);
ADD_METHOD(GetReplayJudge);
ADD_METHOD(ScoreUsedInvalidModifier);
Expand Down

0 comments on commit 754bbbe

Please sign in to comment.