mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-06-16 13:23:56 -07:00
Techs will now apply to units created after they are researched. This was SVN commit r4143.
33 lines
886 B
C++
33 lines
886 B
C++
//Andrew aka pyrolink - ajdecker1022@msn.com
|
|
//Manages the tech templates. More detail: see CFormation and CEntityTemplate (collections)
|
|
|
|
|
|
#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>
|
|
{
|
|
typedef std::map<CStrW, CTechnology*> TechMap;
|
|
typedef std::map<CStrW, CStr> TechFilenameMap;
|
|
|
|
TechMap m_techs[PS_MAX_PLAYERS+1];
|
|
TechFilenameMap m_techFilenames;
|
|
|
|
public:
|
|
std::vector<CTechnology*> activeTechs[PS_MAX_PLAYERS+1];
|
|
|
|
CTechnology* getTechnology( CStrW techType, CPlayer* player );
|
|
~CTechnologyCollection();
|
|
|
|
int loadTechnologies();
|
|
void LoadFile( const char* path );
|
|
};
|
|
|
|
#endif
|