Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

142 lines
5.2 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose: Interface of the CWeaponAward class, and its subclasses
  4. //
  5. // $Workfile: $
  6. // $Date: $
  7. //
  8. //------------------------------------------------------------------------------------------------------
  9. // $Log: $
  10. //
  11. // $NoKeywords: $
  12. //=============================================================================//
  13. #ifndef WEAPONAWARDS_H
  14. #define WEAPONAWARDS_H
  15. #ifdef WIN32
  16. #pragma once
  17. #endif
  18. #include "Award.h"
  19. //------------------------------------------------------------------------------------------------------
  20. // Purpose: CWeaponAward is the superclass for any award that is based simply
  21. // on number of kills with a specific weapon.
  22. //------------------------------------------------------------------------------------------------------
  23. class CWeaponAward: public CAward
  24. {
  25. protected:
  26. map<PID,int> accum;
  27. char* killtype;
  28. public:
  29. CWeaponAward(char* awardname, char* killname):CAward(awardname),killtype(killname){}
  30. void getWinner();
  31. };
  32. //------------------------------------------------------------------------------------------------------
  33. // Purpose: CFlamethrowerAward is an award given to the player who gets the
  34. // most kills with "flames"
  35. //------------------------------------------------------------------------------------------------------
  36. class CFlamethrowerAward: public CWeaponAward
  37. {
  38. protected:
  39. void noWinner(CHTMLFile& html);
  40. void extendedinfo(CHTMLFile& html);
  41. public:
  42. explicit CFlamethrowerAward():CWeaponAward("Blaze of Glory","flames"){}
  43. };
  44. //------------------------------------------------------------------------------------------------------
  45. // Purpose: CAssaultCannonAward is an award given to the player who gets the
  46. // most kills with "ac" (the assault cannon)
  47. //------------------------------------------------------------------------------------------------------
  48. class CAssaultCannonAward: public CWeaponAward
  49. {
  50. protected:
  51. void noWinner(CHTMLFile& html);
  52. void extendedinfo(CHTMLFile& html);
  53. public:
  54. explicit CAssaultCannonAward():CWeaponAward("Swiss Cheese","ac"){}
  55. };
  56. //------------------------------------------------------------------------------------------------------
  57. // Purpose: CKnifeAward is an award given to the player who gets the most kills
  58. // with the "knife"
  59. //------------------------------------------------------------------------------------------------------
  60. class CKnifeAward: public CWeaponAward
  61. {
  62. protected:
  63. void noWinner(CHTMLFile& html);
  64. void extendedinfo(CHTMLFile& html);
  65. public:
  66. explicit CKnifeAward():CWeaponAward("Assassin","knife"){}
  67. };
  68. //------------------------------------------------------------------------------------------------------
  69. // Purpose: CRocketryAward is an award given to the player who gets the most kills
  70. // with "rocket"s.
  71. //------------------------------------------------------------------------------------------------------
  72. class CRocketryAward: public CWeaponAward
  73. {
  74. protected:
  75. void noWinner(CHTMLFile& html);
  76. void extendedinfo(CHTMLFile& html);
  77. public:
  78. explicit CRocketryAward():CWeaponAward("Rocketry","rocket"){}
  79. };
  80. //------------------------------------------------------------------------------------------------------
  81. // Purpose: CGrenadierAward is an award given to the player who gets the most
  82. // kills with "gl_grenade"s
  83. //------------------------------------------------------------------------------------------------------
  84. class CGrenadierAward: public CWeaponAward
  85. {
  86. protected:
  87. void noWinner(CHTMLFile& html);
  88. void extendedinfo(CHTMLFile& html);
  89. public:
  90. explicit CGrenadierAward():CWeaponAward("Grenadier","gl_grenade"){}
  91. };
  92. //------------------------------------------------------------------------------------------------------
  93. // Purpose: CDemolitionsAward is an award given to the player who kills the most
  94. // people with "detpack"s.
  95. //------------------------------------------------------------------------------------------------------
  96. class CDemolitionsAward: public CWeaponAward
  97. {
  98. protected:
  99. void noWinner(CHTMLFile& html);
  100. void extendedinfo(CHTMLFile& html);
  101. public:
  102. explicit CDemolitionsAward():CWeaponAward("Demolitions","detpack"){}
  103. };
  104. //------------------------------------------------------------------------------------------------------
  105. // Purpose: CBiologicalWarfareAward is given to the player who kills the most
  106. // people with "infection"s
  107. //------------------------------------------------------------------------------------------------------
  108. class CBiologicalWarfareAward: public CWeaponAward
  109. {
  110. protected:
  111. void noWinner(CHTMLFile& html);
  112. void extendedinfo(CHTMLFile& html);
  113. public:
  114. CBiologicalWarfareAward():CWeaponAward("Biological Warfare","infection"){}
  115. };
  116. //------------------------------------------------------------------------------------------------------
  117. // Purpose: CBestSentryAward is given to the player who kills the most people
  118. // with sentry guns that he/she created ("sentrygun")
  119. //------------------------------------------------------------------------------------------------------
  120. class CBestSentryAward: public CWeaponAward
  121. {
  122. protected:
  123. void noWinner(CHTMLFile& html);
  124. void extendedinfo(CHTMLFile& html);
  125. public:
  126. CBestSentryAward():CWeaponAward("Best Sentry Placement","sentrygun"){}
  127. };
  128. #endif // WEAPONAWARDS_H