2006-06-10 01:07:11 +02:00
|
|
|
//Andrew aka pyrolink - ajdecker1022@msn.com
|
2006-07-13 05:29:33 +02:00
|
|
|
//Manages the tech templates. More detail: see CFormation and CEntityTemplate (collections)
|
2006-06-10 01:07:11 +02:00
|
|
|
|
|
|
|
|
|
|
|
#ifndef TECHNOLOGY_COLLECTION_INCLUDED
|
|
|
|
#define TECHNOLOGY_COLLECTION_INCLUDED
|
|
|
|
|
|
|
|
#include "ps/CStr.h"
|
|
|
|
#include "ps/Singleton.h"
|
|
|
|
#include "Technology.h"
|
|
|
|
#include "ps/Game.h"
|
|
|
|
|
|
|
|
#define g_TechnologyCollection CTechnologyCollection::GetSingleton()
|
|
|
|
|
|
|
|
class CTechnologyCollection : public Singleton<CTechnologyCollection>
|
|
|
|
{
|
2006-07-18 06:17:46 +02:00
|
|
|
typedef std::map<CStrW, CTechnology*> TechMap;
|
|
|
|
typedef std::map<CStrW, CStr> TechFilenameMap;
|
|
|
|
|
|
|
|
TechMap m_techs[PS_MAX_PLAYERS+1];
|
|
|
|
TechFilenameMap m_techFilenames;
|
2006-07-19 01:59:48 +02:00
|
|
|
|
2006-06-10 01:07:11 +02:00
|
|
|
public:
|
2006-07-19 01:59:48 +02:00
|
|
|
std::vector<CTechnology*> activeTechs[PS_MAX_PLAYERS+1];
|
|
|
|
|
2006-07-20 16:37:58 +02:00
|
|
|
CTechnology* getTechnology( const CStrW& techType, CPlayer* player );
|
2006-07-19 01:59:48 +02:00
|
|
|
~CTechnologyCollection();
|
|
|
|
|
2006-06-10 01:07:11 +02:00
|
|
|
int loadTechnologies();
|
|
|
|
void LoadFile( const char* path );
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|