2007-06-10 21:04:15 +03:00
|
|
|
#ifndef CBUILDINGHANDLER_H
|
|
|
|
#define CBUILDINGHANDLER_H
|
2008-03-02 15:16:11 +02:00
|
|
|
#include "../global.h"
|
2007-06-10 21:04:15 +03:00
|
|
|
|
|
|
|
enum EbuildingType {NEUTRAL=0, CASTLE, RAMPART, TOWER, INFERNO, NECROPOLIS, DUNGEON, STRONGHOLD, FORTRESS, CONFLUX};
|
|
|
|
|
|
|
|
class CBuilding //a typical building encountered in every castle ;]
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
std::string name;
|
|
|
|
std::string refName; //reference name, for identification
|
|
|
|
int wood, mercury, ore, sulfur, crystal, gems, gold;
|
|
|
|
std::string description;
|
|
|
|
EbuildingType type; //type of building (occures in many castles or is specific for one castle)
|
|
|
|
bool isDwelling; //true, if this building is a dwelling
|
|
|
|
};
|
|
|
|
|
|
|
|
class CBuildingHandler
|
|
|
|
{
|
|
|
|
public:
|
2008-03-02 15:16:11 +02:00
|
|
|
//std::map<int, std::map<int, CBuilding*> > buildings; ///< first int is the castle ID, second the building ID (in ERM-U format)
|
2007-06-10 21:04:15 +03:00
|
|
|
std::vector<CBuilding> buildings; //vector of buildings
|
|
|
|
std::vector<CBuilding> resourceSilos; //vector with resource silos only - for castle profiled descriptions
|
2007-06-10 23:14:37 +03:00
|
|
|
std::vector<CBuilding> grails; //vector with grail - type buildings only - for castle profiled descriptions
|
|
|
|
std::vector<CBuilding> blacksmiths; //vector with names and descriptions for blacksmith (castle - dependent)
|
|
|
|
CBuilding blacksmith; //global name and description for blacksmiths
|
|
|
|
CBuilding moat; //description and name of moat
|
|
|
|
CBuilding shipyard; //castle - independent name and description of shipyard
|
|
|
|
CBuilding shipyardWithShip; //name and description for shipyard with ship
|
|
|
|
CBuilding artMerchant; //name and description of artifact merchant
|
|
|
|
CBuilding l1horde, l2horde, l3horde, l4horde, l5horde; //castle - independent horde names and descriptions
|
|
|
|
CBuilding grail; //castle - independent grail description
|
|
|
|
CBuilding resSilo; //castle - independent resource silo name and description
|
|
|
|
void loadBuildings(); //main loader, calls loading functions below
|
|
|
|
void loadNames(); //loads castle - specufuc names and descriptoins
|
|
|
|
void loadNeutNames(); //loads castle independent names and descriptions
|
2007-06-11 20:21:27 +03:00
|
|
|
void loadDwellingNames(); //load names for dwellgins
|
2007-06-10 21:04:15 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif //CBUILDINGHANDLER_H
|