std::vector< AString > AStringVector
Score AddScore(const AString &a_Name, Score a_Delta)
Adds a_Delta and returns the new score.
std::pair< AString, Score > cTrackedPlayer
void SetDisplayName(const AString &a_Name)
static eType StringToType(const AString &a_Name)
void Reset(void)
Resets the objective.
std::map< AString, Score > cScoreMap
eType GetType(void) const
cObjective(const AString &a_Name, const AString &a_DisplayName, eType a_Type, cWorld *a_World)
void SetScore(const AString &a_Name, Score a_Score)
Sets the score of the specified player.
const AString & GetName(void) const
static AString TypeToString(eType a_Type)
Score SubScore(const AString &a_Name, Score a_Delta)
Subtracts a_Delta and returns the new score.
void ResetScore(const AString &a_Name)
Resets the score of the specified player.
const AString & GetDisplayName(void) const
Score GetScore(const AString &a_Name) const
Returns the score of the specified player.
void SendTo(cClientHandle &a_Client)
Send this objective to the specified client.
const AString & GetDisplayName(void) const
bool m_CanSeeFriendlyInvisible
const AString & GetPrefix(void) const
size_t GetNumPlayers(void) const
Returns the number of registered players.
bool CanSeeFriendlyInvisible(void) const
cTeam(const AString &a_Name, const AString &a_DisplayName, const AString &a_Prefix, const AString &a_Suffix)
void SetDisplayName(const AString &a_Name)
void SetCanSeeFriendlyInvisible(bool a_Flag)
void SetPrefix(const AString &a_Prefix)
const AString & GetSuffix(void) const
void SetSuffix(const AString &a_Suffix)
bool AllowsFriendlyFire(void) const
const AString & GetName(void) const
void Reset(void)
Removes all registered players.
bool m_AllowsFriendlyFire
bool HasPlayer(const AString &a_Name) const
Returns whether the specified player is in this team.
void SetFriendlyFire(bool a_Flag)
bool RemovePlayer(const AString &a_Name)
Removes a player from the team.
std::set< AString > cPlayerNameSet
bool AddPlayer(const AString &a_Name)
Adds a new player to the team.
size_t GetNumObjectives(void) const
cObjective * GetObjective(const AString &a_Name)
Retrieves the objective with the specified name, nullptr if not found.
AStringVector GetTeamNames()
Retrieves the list of team names.
std::pair< AString, cTeam > cNamedTeam
cTeam * RegisterTeam(const AString &a_Name, const AString &a_DisplayName, const AString &a_Prefix, const AString &a_Suffix)
Registers a new team, returns the cTeam instance, nullptr on name collision.
cTeam * QueryPlayerTeam(const AString &a_Name)
size_t GetNumTeams(void) const
cObjectiveMap m_Objectives
cObjective * GetObjectiveIn(eDisplaySlot a_Slot)
bool ForEachObjectiveWith(cObjective::eType a_Type, cObjectiveCallback a_Callback)
Execute callback for each objective with the specified type Returns true if all objectives processed,...
cTeam * GetTeam(const AString &a_Name)
Retrieves the team with the specified name, nullptr if not found.
bool ForEachTeam(cTeamCallback a_Callback)
Execute callback for each team.
void AddPlayerScore(const AString &a_Name, cObjective::eType a_Type, cObjective::Score a_Value=1)
std::map< AString, cObjective > cObjectiveMap
void SendTo(cClientHandle &a_Client)
Send this scoreboard to the specified client.
cCriticalSection m_CSObjectives
std::map< AString, cTeam > cTeamMap
cObjective * m_Display[dsCount]
cScoreboard(cWorld *a_World)
cObjective * RegisterObjective(const AString &a_Name, const AString &a_DisplayName, cObjective::eType a_Type)
Registers a new scoreboard objective, returns the cObjective instance, nullptr on name collision.
void SetDisplay(const AString &a_Objective, eDisplaySlot a_Slot)
bool ForEachObjective(cObjectiveCallback a_Callback)
Execute callback for each objective.
std::pair< AString, cObjective > cNamedObjective
bool RemoveObjective(const AString &a_Name)
Removes a registered objective, returns true if operation was successful.
bool RemoveTeam(const AString &a_Name)
Removes a registered team, returns true if operation was successful.
cCriticalSection m_CSTeams