142 : m_sGuid(MakeGuid())
145 m_fPlayerRating = 0.F;
146 FOREACH_ENUM(Skillset, ss)
147 m_fPlayerSkillsets[ss] = 0.F;
149 m_LastPlayedDate.
Init();
150 m_lastRankedChartkeyCheck.
Init();
152 FOREACH_ENUM(Difficulty, i)
153 m_iNumSongsPlayedByDifficulty[i] = 0;
154 for (
auto& i : m_iNumSongsPlayedByMeter) {
158 ZERO(m_iNumStagesPassedByGrade);
163 auto GetDisplayNameOrHighScoreName() const -> std::
string;
164 auto GetDefaultModifiers(const
Game* pGameType,
165 std::
string& sModifiersOut) const ->
bool;
166 void SetDefaultModifiers(const
Game* pGameType,
167 const std::
string& sModifiers);
169 void AddStepTotals(
int iNumTapsAndHolds,
178 int m_ListPriority{ 0 };
180 std::map<std::string, Playlist> allplaylists;
183 std::string m_sDisplayName;
185 std::string m_sProfileID;
194 static auto MakeGuid() -> std::string;
195 auto GetGuid() -> std::string* {
return &m_sGuid; }
197 std::map<std::string, std::string> m_sDefaultModifiers;
198 SortOrder m_SortOrder{ SortOrder_Invalid };
199 Difficulty m_LastDifficulty{ Difficulty_Invalid };
200 StepsType m_LastStepsType{ StepsType_Invalid };
202 int m_iCurrentCombo{ 0 };
203 int m_iTotalSessions{ 0 };
204 int m_iTotalSessionSeconds{ 0 };
205 int m_iTotalGameplaySeconds{ 0 };
206 int m_iTotalDancePoints{ 0 };
207 int m_iNumExtraStagesPassed{ 0 };
208 int m_iNumExtraStagesFailed{ 0 };
209 int m_iNumToasties{ 0 };
210 int m_iTotalTapsAndHolds{ 0 };
211 int m_iTotalJumps{ 0 };
212 int m_iTotalHolds{ 0 };
213 int m_iTotalRolls{ 0 };
214 int m_iTotalMines{ 0 };
215 int m_iTotalHands{ 0 };
216 int m_iTotalLifts{ 0 };
217 float m_fPlayerRating;
218 float m_fPlayerSkillsets[NUM_Skillset]{};
223 std::string profiledir;
224 bool IsEtternaProfile{
false };
233 mutable DateTime m_lastRankedChartkeyCheck;
237 std::map<StyleID, int> m_iNumSongsPlayedByStyle;
238 int m_iNumSongsPlayedByDifficulty[NUM_Difficulty]{};
239 int m_iNumSongsPlayedByMeter[MAX_METER + 1]{};
245 int m_iNumStagesPassedByGrade[NUM_Grade]{};
249 void AddToFavorites(
const std::string& ck) { FavoritedCharts.emplace(ck); }
250 void AddToPermaMirror(
const std::string& ck)
252 PermaMirrorCharts.emplace(ck);
254 void RemoveFromFavorites(
const std::string& ck);
255 void RemoveFromPermaMirror(
const std::string& ck);
256 std::set<std::string> FavoritedCharts;
257 std::set<std::string> PermaMirrorCharts;
260 bool AddGoal(
const std::string& ck);
261 void RemoveGoal(
const std::string& ck,
DateTime assigned);
263 std::unordered_map<std::string, GoalsForChart> goalmap;
264 void FillGoalTable();
265 std::vector<ScoreGoal*> goaltable;
271 auto HasGoal(
const std::string& ck)
const ->
bool
273 return goalmap.count(ck) == 1;
275 auto GetLowestGoalForRate(
const std::string& ck,
float rate) ->
ScoreGoal&;
276 void SetAnyAchievedGoals(
const std::string& ck,
284 auto GetBestGrade(
const Song* song, StepsType st)
const -> Grade;
285 auto GetBestWifeScore(
const Song* song, StepsType st)
const -> float;
288 std::vector<Screenshot> m_vScreenshots;
289 void AddScreenshot(
const Screenshot& screenshot);
290 int GetNextScreenshotIndex()
const {
return static_cast<int>(m_vScreenshots.size()); }
297 InitScreenshotData();
299 void InitEditableData();
300 void InitGeneralData();
301 void InitScreenshotData();
307 void HandleStatsPrefixChange(std::string dir);
308 auto LoadAllFromDir(
const std::string& sDir,
LoadingWindow* ld)
309 -> ProfileLoadResult;
310 auto LoadStatsFromDir(std::string dir,
bool require_signature)
311 -> ProfileLoadResult;
312 void LoadTypeFromDir(
const std::string& dir);
313 void LoadCustomFunction(
const std::string& sDir);
314 auto SaveAllToDir(
const std::string& sDir)
const -> bool;
316 auto LoadEditableDataFromDir(
const std::string& sDir) -> ProfileLoadResult;
318 void SaveTypeToDir(
const std::string& dir)
const;
319 void SaveEditableDataToDir(
const std::string& sDir)
const;
322 void CalculateStatsFromScores();
324 void SaveStatsWebPageToDir(
const std::string& sDir)
const;
326 static void MoveBackupToDir(
const std::string& sFromDir,
327 const std::string& sToDir);
328 static auto MakeUniqueFileNameNoExtension(
329 const std::string& sDir,
330 const std::string& sFileNameBeginning) -> std::string;
331 static auto MakeFileNameNoExtension(
const std::string& sFileNameBeginning,
332 int iIndex) -> std::string;
335 void PushSelf(lua_State* L);