summaryrefslogtreecommitdiff
path: root/game/shared/tf/tf_upgrades_shared.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 /game/shared/tf/tf_upgrades_shared.h
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'game/shared/tf/tf_upgrades_shared.h')
-rw-r--r--game/shared/tf/tf_upgrades_shared.h57
1 files changed, 57 insertions, 0 deletions
diff --git a/game/shared/tf/tf_upgrades_shared.h b/game/shared/tf/tf_upgrades_shared.h
new file mode 100644
index 0000000..4b0f081
--- /dev/null
+++ b/game/shared/tf/tf_upgrades_shared.h
@@ -0,0 +1,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