diff options
| author | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
|---|---|---|
| committer | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
| commit | 3bf9df6b2785fa6d951086978a3e66f49427166a (patch) | |
| tree | 2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /utils/tfstats/customaward.h | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'utils/tfstats/customaward.h')
| -rw-r--r-- | utils/tfstats/customaward.h | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/utils/tfstats/customaward.h b/utils/tfstats/customaward.h new file mode 100644 index 0000000..c133585 --- /dev/null +++ b/utils/tfstats/customaward.h @@ -0,0 +1,62 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: Interface to CCustomAward +// +// $Workfile: $ +// $Date: $ +// +//------------------------------------------------------------------------------------------------------ +// $Log: $ +// +// $NoKeywords: $ +//=============================================================================// +#ifndef CUSTOMAWARD_H +#define CUSTOMAWARD_H +#ifdef WIN32 +#pragma once +#endif +#pragma warning(disable :4786) +#include "Award.h" +#include "TextFile.h" +#include "CustomAwardTriggers.h" +#include <list> + +using namespace std; +//------------------------------------------------------------------------------------------------------ +// Purpose: CCustomAward represents an award that is user-definable via +// a configuration file. Other than their runtime definitions, Custom awards +// act just like other static awards. +//------------------------------------------------------------------------------------------------------ +class CCustomAward: public CAward +{ +public: + //factory method. + static CCustomAward* readCustomAward(CTextFile& f); +protected: + list<CCustomAwardTrigger*> triggers; + bool namemode; + + map<string,string> extraProps; + + map<PID,int> plrscores; //this is wrt to the current award. score in this sense is not related to game score + // but simply a score that is relative to other contenders for the award. + map<PID,int> plrnums; //this is the number of times any of the triggers was activated + + map<string,int> stringscores; //this is wrt to the current award. score in this sense is not related to game score + // but simply a score that is relative to other contenders for the award. + map<string,int> stringnums; //this is the number of times any of the triggers was activated + + string noWinnerMsg; + string extraInfoMsg; + virtual void extendedinfo(CHTMLFile& html); + virtual void noWinner(CHTMLFile& html); + +public: + explicit CCustomAward(CMatchInfo* pmi):CAward("custom_temp"){} + + void getWinner(); + + +}; + +#endif // CUSTOMAWARD_H |