Skip to content

Commit 92eb552

Browse files
committed
Allow access to Wifescore via ReplaySnapshots from Evaluation
1 parent cdc0abb commit 92eb552

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/Etterna/Screen/Others/ScreenEvaluation.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -389,12 +389,21 @@ class LunaScreenEvaluation : public Luna<ScreenEvaluation>
389389
LuaHelpers::CreateTableFromArray(toPush, L);
390390
return 1;
391391
}
392+
static int GetReplaySnapshotWifePercentForNoterow(T* p, lua_State* L)
393+
{
394+
int row = IArg(1);
395+
auto rs = PlayerAI::GetReplaySnapshotForNoterow(row);
396+
397+
lua_pushnumber(L, rs->curwifescore / rs->maxwifescore);
398+
return 1;
399+
}
392400

393401
LunaScreenEvaluation()
394402
{
395403
ADD_METHOD(GetStageStats);
396404
ADD_METHOD(SetPlayerStageStatsFromReplayData);
397405
ADD_METHOD(GetReplaySnapshotJudgmentsForNoterow);
406+
ADD_METHOD(GetReplaySnapshotWifePercentForNoterow);
398407
}
399408
};
400409

0 commit comments

Comments
 (0)