Etterna 0.74.4
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
Profile Class Reference

Player data that persists between sessions. More...

#include <Profile.h>

Collaboration diagram for Profile:
Collaboration graph
[legend]

Public Member Functions

 Profile ()
 Set up the Profile with default values.
 
auto GetDisplayNameOrHighScoreName () const -> std::string
 
auto GetDefaultModifiers (const Game *pGameType, std::string &sModifiersOut) const -> bool
 
void SetDefaultModifiers (const Game *pGameType, const std::string &sModifiers)
 
void AddStepTotals (int iNumTapsAndHolds, int iNumJumps, int iNumHolds, int iNumRolls, int iNumMines, int iNumHands, int iNumLifts)
 
auto GetGuid () -> std::string *
 
void AddToFavorites (const std::string &ck)
 
void AddToPermaMirror (const std::string &ck)
 
void RemoveFromFavorites (const std::string &ck)
 
void RemoveFromPermaMirror (const std::string &ck)
 
bool AddGoal (const std::string &ck)
 
void RemoveGoal (const std::string &ck, DateTime assigned)
 
bool LoadGoalIfNew (ScoreGoal goal)
 
void FillGoalTable ()
 
auto HasGoal (const std::string &ck) const -> bool
 
auto GetLowestGoalForRate (const std::string &ck, float rate) -> ScoreGoal &
 
void SetAnyAchievedGoals (const std::string &ck, float &rate, const HighScore &pscore)
 
auto GetBestGrade (const Song *song, StepsType st) const -> Grade
 
auto GetBestWifeScore (const Song *song, StepsType st) const -> float
 
void AddScreenshot (const Screenshot &screenshot)
 
int GetNextScreenshotIndex () const
 
void InitAll ()
 
void InitEditableData ()
 
void InitGeneralData ()
 
void InitScreenshotData ()
 
void ClearStats ()
 
void swap (Profile &other)
 
void HandleStatsPrefixChange (std::string dir)
 
auto LoadAllFromDir (const std::string &sDir, LoadingWindow *ld) -> ProfileLoadResult
 
auto LoadStatsFromDir (std::string dir, bool require_signature) -> ProfileLoadResult
 
void LoadTypeFromDir (const std::string &dir)
 
void LoadCustomFunction (const std::string &sDir)
 
auto SaveAllToDir (const std::string &sDir) const -> bool
 
auto LoadEditableDataFromDir (const std::string &sDir) -> ProfileLoadResult
 
void SaveTypeToDir (const std::string &dir) const
 
void SaveEditableDataToDir (const std::string &sDir) const
 
void CalculateStatsFromScores (LoadingWindow *ld)
 
void CalculateStatsFromScores ()
 
void SaveStatsWebPageToDir (const std::string &sDir) const
 
void PushSelf (lua_State *L)
 

Static Public Member Functions

static auto MakeGuid () -> std::string
 
static void MoveBackupToDir (const std::string &sFromDir, const std::string &sToDir)
 
static auto MakeUniqueFileNameNoExtension (const std::string &sDir, const std::string &sFileNameBeginning) -> std::string
 
static auto MakeFileNameNoExtension (const std::string &sFileNameBeginning, int iIndex) -> std::string
 

Public Attributes

int m_ListPriority { 0 }
 
std::map< std::string, Playlistallplaylists
 
std::string m_sDisplayName
 
std::string m_sProfileID
 
std::string m_sLastUsedHighScoreName
 The last used name for high scoring purposes.
 
std::string m_sGuid
 
std::map< std::string, std::string > m_sDefaultModifiers
 
SortOrder m_SortOrder { SortOrder_Invalid }
 
Difficulty m_LastDifficulty { Difficulty_Invalid }
 
StepsType m_LastStepsType { StepsType_Invalid }
 
SongID m_lastSong
 
int m_iCurrentCombo { 0 }
 
int m_iTotalSessions { 0 }
 
int m_iTotalSessionSeconds { 0 }
 
int m_iTotalGameplaySeconds { 0 }
 
int m_iTotalDancePoints { 0 }
 
int m_iNumExtraStagesPassed { 0 }
 
int m_iNumExtraStagesFailed { 0 }
 
int m_iNumToasties { 0 }
 
int m_iTotalTapsAndHolds { 0 }
 
int m_iTotalJumps { 0 }
 
int m_iTotalHolds { 0 }
 
int m_iTotalRolls { 0 }
 
int m_iTotalMines { 0 }
 
int m_iTotalHands { 0 }
 
int m_iTotalLifts { 0 }
 
float m_fPlayerRating
 
float m_fPlayerSkillsets [NUM_Skillset] {}
 
bool m_bNewProfile { false }
 Is this a brand new profile?
 
std::string profiledir
 
bool IsEtternaProfile { false }
 
std::string m_sLastPlayedMachineGuid
 Which machine did we play on last, based on the Guid?
 
DateTime m_LastPlayedDate
 
DateTime m_lastRankedChartkeyCheck
 
std::map< StyleID, int > m_iNumSongsPlayedByStyle
 
int m_iNumSongsPlayedByDifficulty [NUM_Difficulty] {}
 
int m_iNumSongsPlayedByMeter [MAX_METER+1] {}
 
int m_iNumTotalSongsPlayed { 0 }
 Count the total number of songs played.
 
int m_iNumStagesPassedByGrade [NUM_Grade] {}
 
std::set< std::string > FavoritedCharts
 
std::set< std::string > PermaMirrorCharts
 
std::unordered_map< std::string, GoalsForChartgoalmap
 
std::vector< ScoreGoal * > goaltable
 
int sortmode = 1
 
int filtermode = 1
 
bool asc = false
 
LuaTable m_UserTable
 
std::vector< Screenshotm_vScreenshots
 

Detailed Description

Player data that persists between sessions.

This can be stored on a local disk or on a memory card.

Constructor & Destructor Documentation

◆ Profile()

Profile::Profile ( )
inline

Set up the Profile with default values.

Note: there are probably a lot of variables.

Member Data Documentation

◆ m_iNumTotalSongsPlayed

int Profile::m_iNumTotalSongsPlayed { 0 }

Count the total number of songs played.

This stat counts once per song, even if two players are active.

◆ m_sLastPlayedMachineGuid

std::string Profile::m_sLastPlayedMachineGuid
mutable

Which machine did we play on last, based on the Guid?

This is mutable because it's overwritten on save, but is usually const everywhere else. It was decided to keep const on the whole save chain and keep this mutable. -Chris

◆ m_sLastUsedHighScoreName

std::string Profile::m_sLastUsedHighScoreName

The last used name for high scoring purposes.

This really shouldn't be in "editable", but it's needed in the smaller editable file so that it can be ready quickly.


The documentation for this class was generated from the following files: