|
Last change
on this file since 2318 was
2294,
checked in by dsommer, 17 years ago
|
|
…
|
-
Property svn:eol-style set to
native
|
|
File size:
995 bytes
|
| Line | |
|---|
| 1 | #ifndef _ShipEquipment_H__ |
|---|
| 2 | #define _ShipEquipment_H__ |
|---|
| 3 | #include <string> |
|---|
| 4 | #include <map> |
|---|
| 5 | #include "Item.h" |
|---|
| 6 | |
|---|
| 7 | /* |
|---|
| 8 | multimap<std::string, Item*> equipment_; |
|---|
| 9 | equipment_.insert(pair<std::string, Item*>("Weapon", new Item()));*/ |
|---|
| 10 | |
|---|
| 11 | |
|---|
| 12 | /* std::map<std::itemtype, Item*> EQClasses; |
|---|
| 13 | EQClasses["jacke"] = 0; |
|---|
| 14 | Item* item = itemMap_["jacke"]; |
|---|
| 15 | |
|---|
| 16 | if (itemMap_["jacke"]) |
|---|
| 17 | if (itemMap_.find("jacke") != itemMap_.end()) */ |
|---|
| 18 | namespace orxonox |
|---|
| 19 | { |
|---|
| 20 | class _OrxonoxExport ShipEquipment |
|---|
| 21 | { |
|---|
| 22 | public: |
|---|
| 23 | inline int getSpace() |
|---|
| 24 | { |
|---|
| 25 | return Usable.size()+Trunk.size(); |
|---|
| 26 | }; |
|---|
| 27 | bool insert(Item* item); |
|---|
| 28 | bool erase (Item* item); |
|---|
| 29 | const bool checkSlot(Item* item) const; |
|---|
| 30 | // const std::multimap<std::string, Item*>& getEquipment() const { return this->Equipment; } |
|---|
| 31 | |
|---|
| 32 | private: |
|---|
| 33 | std::multimap<std::string, Item*> Equipment; |
|---|
| 34 | std::multimap<std::string, Item*> Usable; |
|---|
| 35 | std::multimap<std::string, Item*> Trunk; |
|---|
| 36 | }; |
|---|
| 37 | } |
|---|
| 38 | |
|---|
| 39 | |
|---|
| 40 | |
|---|
| 41 | |
|---|
| 42 | |
|---|
| 43 | |
|---|
| 44 | |
|---|
| 45 | |
|---|
| 46 | |
|---|
| 47 | |
|---|
| 48 | |
|---|
| 49 | |
|---|
| 50 | |
|---|
| 51 | |
|---|
| 52 | #endif |
|---|
Note: See
TracBrowser
for help on using the repository browser.