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.

54 lines
1.1 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose: Holds defintion for game ammo types
  4. //
  5. // $Workfile: $
  6. // $Date: $
  7. // $NoKeywords: $
  8. //=============================================================================//
  9. #ifndef CS_AMMODEF_H
  10. #define CS_AMMODEF_H
  11. #ifdef _WIN32
  12. #pragma once
  13. #endif
  14. #include "ammodef.h"
  15. #include "cs_blackmarket.h"
  16. class ConVar;
  17. struct CSAmmoCost
  18. {
  19. int buySize;
  20. int cost;
  21. };
  22. //=============================================================================
  23. // >> CCSAmmoDef
  24. //=============================================================================
  25. class CCSAmmoDef : public CAmmoDef
  26. {
  27. public:
  28. void AddAmmoCost( char const* name, int cost, int buySize );
  29. CCSAmmoDef(void);
  30. ~CCSAmmoDef( void );
  31. int GetBuySize( int nAmmoIndex ) const;
  32. int GetCost( int nAmmoIndex ) const;
  33. private:
  34. CSAmmoCost m_csAmmo[MAX_AMMO_TYPES];
  35. };
  36. // Get the global ammodef object. This is usually implemented in each mod's game rules file somewhere,
  37. // so the mod can setup custom ammo types.
  38. CCSAmmoDef* GetCSAmmoDef();
  39. #endif // CS_AMMODEF_H