| [2000] | 1 | #ifndef _ShipEquipment_H__ | 
|---|
 | 2 | #define _ShipEquipment_H__ | 
|---|
 | 3 | #include <string> | 
|---|
| [2500] | 4 | #include <map> | 
|---|
| [2000] | 5 |  | 
|---|
 | 6 | /* | 
|---|
| [2500] | 7 | multimap<std::string, BaseItem*> equipment_; | 
|---|
 | 8 | equipment_.insert(pair<std::string, BaseItem*>("Weapon", new BaseItem()));*/ | 
|---|
| [2000] | 9 |  | 
|---|
 | 10 |  | 
|---|
| [2500] | 11 | /*          std::map<std::itemtype, BaseItem*> EQClasses; | 
|---|
 | 12 |             EQClasses["jacke"] = 0; | 
|---|
 | 13 |             BaseItem* item = itemMap_["jacke"]; | 
|---|
 | 14 |  | 
|---|
 | 15 |            if (itemMap_["jacke"]) | 
|---|
 | 16 |            if (itemMap_.find("jacke") != itemMap_.end()) */ | 
|---|
| [2094] | 17 | namespace orxonox | 
|---|
 | 18 | { | 
|---|
| [2500] | 19 |     class BaseItem; | 
|---|
 | 20 | /** | 
|---|
 | 21 | @brief | 
|---|
 | 22 |     ShipEquipment is the inventory of a player. It's part of the Pawn class. | 
|---|
 | 23 |  | 
|---|
 | 24 | */ | 
|---|
| [2094] | 25 |     class _OrxonoxExport ShipEquipment | 
|---|
 | 26 |     { | 
|---|
 | 27 |         public: | 
|---|
| [2500] | 28 |         inline int getSpace() | 
|---|
 | 29 |         { | 
|---|
 | 30 |         return Usable.size()+Trunk.size(); | 
|---|
 | 31 |         }; | 
|---|
 | 32 |         bool insert(BaseItem* item); | 
|---|
 | 33 |         bool erase (BaseItem* item); | 
|---|
 | 34 |         //void print(std::multimap<std::string, BaseItem*> eut); | 
|---|
 | 35 |         void eraseAll(); | 
|---|
 | 36 |         //bool checkSlot(BaseItem* item); | 
|---|
 | 37 |         BaseItem* checkSlot(BaseItem* item); | 
|---|
 | 38 | //      const std::multimap<std::string, BaseItem*>& getEquipment() const { return this->Equipment; } | 
|---|
 | 39 |         inline std::multimap<std::string, BaseItem*>& getEquipment() {return this->Equipment;} | 
|---|
 | 40 |         inline std::multimap<std::string, BaseItem*>& getUsable() {return this->Usable;} | 
|---|
 | 41 |         inline std::multimap<std::string, BaseItem*>& getTrunk() {return this->Trunk;} | 
|---|
 | 42 |         inline Pawn* getPlayer() {return this->player ;} | 
|---|
 | 43 |         inline void setPlayer(Pawn* setplayer) | 
|---|
 | 44 |         {this->player = setplayer;} | 
|---|
| [2094] | 45 |         private: | 
|---|
| [2500] | 46 |             Pawn* player;//!< Is a pointer to the belonging player | 
|---|
 | 47 |             std::multimap<std::string, BaseItem*> Equipment;//!< the Equipment for permanent Items | 
|---|
 | 48 |             std::multimap<std::string, BaseItem*> Usable;//!< Where Usables are stored | 
|---|
 | 49 |             std::multimap<std::string, BaseItem*> Trunk;//!< Every other Item is stored here | 
|---|
| [2094] | 50 |     }; | 
|---|
| [2083] | 51 | } | 
|---|
| [2000] | 52 |  | 
|---|
 | 53 |  | 
|---|
 | 54 |  | 
|---|
 | 55 |  | 
|---|
 | 56 |  | 
|---|
 | 57 |  | 
|---|
 | 58 |  | 
|---|
 | 59 |  | 
|---|
 | 60 |  | 
|---|
 | 61 |  | 
|---|
 | 62 |  | 
|---|
 | 63 |  | 
|---|
 | 64 |  | 
|---|
 | 65 |  | 
|---|
 | 66 | #endif | 
|---|