summaryrefslogtreecommitdiff
path: root/utils/tfstats/weaponawards.h
diff options
context:
space:
mode:
authorFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
committerFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
commit3bf9df6b2785fa6d951086978a3e66f49427166a (patch)
tree2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /utils/tfstats/weaponawards.h
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'utils/tfstats/weaponawards.h')
-rw-r--r--utils/tfstats/weaponawards.h142
1 files changed, 142 insertions, 0 deletions
diff --git a/utils/tfstats/weaponawards.h b/utils/tfstats/weaponawards.h
new file mode 100644
index 0000000..c963adb
--- /dev/null
+++ b/utils/tfstats/weaponawards.h
@@ -0,0 +1,142 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose: Interface of the CWeaponAward class, and its subclasses
+//
+// $Workfile: $
+// $Date: $
+//
+//------------------------------------------------------------------------------------------------------
+// $Log: $
+//
+// $NoKeywords: $
+//=============================================================================//
+#ifndef WEAPONAWARDS_H
+#define WEAPONAWARDS_H
+#ifdef WIN32
+#pragma once
+#endif
+#include "Award.h"
+
+//------------------------------------------------------------------------------------------------------
+// Purpose: CWeaponAward is the superclass for any award that is based simply
+// on number of kills with a specific weapon.
+//------------------------------------------------------------------------------------------------------
+class CWeaponAward: public CAward
+{
+protected:
+ map<PID,int> accum;
+ char* killtype;
+public:
+ CWeaponAward(char* awardname, char* killname):CAward(awardname),killtype(killname){}
+ void getWinner();
+};
+
+//------------------------------------------------------------------------------------------------------
+// Purpose: CFlamethrowerAward is an award given to the player who gets the
+// most kills with "flames"
+//------------------------------------------------------------------------------------------------------
+class CFlamethrowerAward: public CWeaponAward
+{
+protected:
+ void noWinner(CHTMLFile& html);
+ void extendedinfo(CHTMLFile& html);
+public:
+ explicit CFlamethrowerAward():CWeaponAward("Blaze of Glory","flames"){}
+};
+
+//------------------------------------------------------------------------------------------------------
+// Purpose: CAssaultCannonAward is an award given to the player who gets the
+// most kills with "ac" (the assault cannon)
+//------------------------------------------------------------------------------------------------------
+class CAssaultCannonAward: public CWeaponAward
+{
+protected:
+ void noWinner(CHTMLFile& html);
+ void extendedinfo(CHTMLFile& html);
+public:
+ explicit CAssaultCannonAward():CWeaponAward("Swiss Cheese","ac"){}
+};
+
+
+//------------------------------------------------------------------------------------------------------
+// Purpose: CKnifeAward is an award given to the player who gets the most kills
+// with the "knife"
+//------------------------------------------------------------------------------------------------------
+class CKnifeAward: public CWeaponAward
+{
+protected:
+ void noWinner(CHTMLFile& html);
+ void extendedinfo(CHTMLFile& html);
+public:
+ explicit CKnifeAward():CWeaponAward("Assassin","knife"){}
+};
+
+//------------------------------------------------------------------------------------------------------
+// Purpose: CRocketryAward is an award given to the player who gets the most kills
+// with "rocket"s.
+//------------------------------------------------------------------------------------------------------
+class CRocketryAward: public CWeaponAward
+{
+protected:
+ void noWinner(CHTMLFile& html);
+ void extendedinfo(CHTMLFile& html);
+public:
+ explicit CRocketryAward():CWeaponAward("Rocketry","rocket"){}
+};
+
+//------------------------------------------------------------------------------------------------------
+// Purpose: CGrenadierAward is an award given to the player who gets the most
+// kills with "gl_grenade"s
+//------------------------------------------------------------------------------------------------------
+class CGrenadierAward: public CWeaponAward
+{
+protected:
+ void noWinner(CHTMLFile& html);
+ void extendedinfo(CHTMLFile& html);
+public:
+ explicit CGrenadierAward():CWeaponAward("Grenadier","gl_grenade"){}
+};
+
+//------------------------------------------------------------------------------------------------------
+// Purpose: CDemolitionsAward is an award given to the player who kills the most
+// people with "detpack"s.
+//------------------------------------------------------------------------------------------------------
+class CDemolitionsAward: public CWeaponAward
+{
+protected:
+ void noWinner(CHTMLFile& html);
+ void extendedinfo(CHTMLFile& html);
+public:
+ explicit CDemolitionsAward():CWeaponAward("Demolitions","detpack"){}
+};
+
+//------------------------------------------------------------------------------------------------------
+// Purpose: CBiologicalWarfareAward is given to the player who kills the most
+// people with "infection"s
+//------------------------------------------------------------------------------------------------------
+class CBiologicalWarfareAward: public CWeaponAward
+{
+protected:
+ void noWinner(CHTMLFile& html);
+ void extendedinfo(CHTMLFile& html);
+public:
+ CBiologicalWarfareAward():CWeaponAward("Biological Warfare","infection"){}
+};
+
+
+//------------------------------------------------------------------------------------------------------
+// Purpose: CBestSentryAward is given to the player who kills the most people
+// with sentry guns that he/she created ("sentrygun")
+//------------------------------------------------------------------------------------------------------
+class CBestSentryAward: public CWeaponAward
+{
+protected:
+ void noWinner(CHTMLFile& html);
+ void extendedinfo(CHTMLFile& html);
+public:
+ CBestSentryAward():CWeaponAward("Best Sentry Placement","sentrygun"){}
+};
+
+
+
+#endif // WEAPONAWARDS_H