Skip to content

Commit

Permalink
Allow access to Wifescore via ReplaySnapshots from Evaluation
Browse files Browse the repository at this point in the history
  • Loading branch information
poco0317 committed Nov 10, 2019
1 parent cdc0abb commit 92eb552
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/Etterna/Screen/Others/ScreenEvaluation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -389,12 +389,21 @@ class LunaScreenEvaluation : public Luna<ScreenEvaluation>
LuaHelpers::CreateTableFromArray(toPush, L);
return 1;
}
static int GetReplaySnapshotWifePercentForNoterow(T* p, lua_State* L)
{
int row = IArg(1);
auto rs = PlayerAI::GetReplaySnapshotForNoterow(row);

lua_pushnumber(L, rs->curwifescore / rs->maxwifescore);
return 1;
}

LunaScreenEvaluation()
{
ADD_METHOD(GetStageStats);
ADD_METHOD(SetPlayerStageStatsFromReplayData);
ADD_METHOD(GetReplaySnapshotJudgmentsForNoterow);
ADD_METHOD(GetReplaySnapshotWifePercentForNoterow);
}
};

Expand Down

0 comments on commit 92eb552

Please sign in to comment.