summaryrefslogtreecommitdiff
path: root/game/shared/cstrike/cs_ammodef.h
blob: 0175bcd07a8b15bbbe020881652dd59f1729787f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose:		Holds defintion for game ammo types
//
// $Workfile:     $
// $Date:         $
// $NoKeywords: $
//=============================================================================//

#ifndef CS_AMMODEF_H
#define CS_AMMODEF_H

#ifdef _WIN32
#pragma once
#endif

#include "ammodef.h"
#include "cs_blackmarket.h"

class ConVar;

struct CSAmmoCost
{
	int	buySize;
	int	cost;
};

//=============================================================================
//	>> CCSAmmoDef
//=============================================================================
class CCSAmmoDef : public CAmmoDef
{

public:

	void AddAmmoCost( char const* name, int cost, int buySize );

	CCSAmmoDef(void);
	~CCSAmmoDef( void );

	int GetBuySize( int nAmmoIndex ) const;
	int GetCost( int nAmmoIndex ) const;

private:
	CSAmmoCost	m_csAmmo[MAX_AMMO_TYPES];
};


// Get the global ammodef object. This is usually implemented in each mod's game rules file somewhere,
// so the mod can setup custom ammo types.
CCSAmmoDef* GetCSAmmoDef();


#endif // CS_AMMODEF_H