blob: 4b0f081e6dbe6718ee54002c8e033932f185b7b3 (
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
56
57
|
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose: Load item upgrade data from KeyValues
//
// $NoKeywords: $
//=============================================================================
#ifndef TF_UPGRADES_SHARED_H
#define TF_UPGRADES_SHARED_H
#ifdef CLIENT_DLL
#define CTFPlayer C_TFPlayer
#endif
class CTFPlayer;
class CMannVsMachineUpgrades
{
public:
char szAttrib[ MAX_ATTRIBUTE_DESCRIPTION_LENGTH ];
char szIcon[ MAX_PATH ];
float flIncrement;
float flCap;
int nCost;
int nUIGroup;
int nQuality;
int nTier; // If set, upgrades in the same tier - for the same player/item - will be mutually exclusive
};
class CMannVsMachineUpgradeManager : public CAutoGameSystem
{
public:
CMannVsMachineUpgradeManager();
virtual void LevelInitPostEntity();
virtual void LevelShutdownPostEntity();
void ParseUpgradeBlockForUIGroup( KeyValues *pKV, int iDefaultUIGroup );
int GetAttributeIndexByName( const char* pszAttributeName );
void LoadUpgradesFile( void );
void LoadUpgradesFileFromPath( const char *pszPath );
public:
CUtlVector< CMannVsMachineUpgrades > m_Upgrades;
private:
CUtlMap< const char*, int > m_AttribMap;
};
extern CMannVsMachineUpgradeManager g_MannVsMachineUpgrades;
int GetUpgradeStepData( CTFPlayer *pPlayer, int nWeaponSlot, int nUpgradeIndex, int &nCurrentStep, bool &bOverCap );
#endif // TF_UPGRADES_H
|