Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/pickups2/src/orxonox/objects/pickup/ShipEquipment.h @ 2389

Last change on this file since 2389 was 2389, checked in by dsommer, 15 years ago

funktioniert :)

  • Property svn:eol-style set to native
File size: 1.4 KB
Line 
1#ifndef _ShipEquipment_H__
2#define _ShipEquipment_H__
3#include <string>
4#include <map>
5
6/*
7multimap<std::string, Item*> equipment_;
8equipment_.insert(pair<std::string, Item*>("Weapon", new Item()));*/
9
10
11/*          std::map<std::itemtype, Item*> EQClasses;
12            EQClasses["jacke"] = 0;
13            Item* item = itemMap_["jacke"];
14
15           if (itemMap_["jacke"])
16           if (itemMap_.find("jacke") != itemMap_.end()) */
17namespace orxonox
18{
19    class Item;
20
21    class _OrxonoxExport ShipEquipment
22    {
23        public:
24        inline int getSpace()
25        {
26        return Usable.size()+Trunk.size();
27        };
28        bool insert(Item* item);
29        bool erase (Item* item);
30        //void print(std::multimap<std::string, Item*> eut);
31        void eraseAll();
32        //bool checkSlot(Item* item);
33        Item* checkSlot(Item* item);
34//      const std::multimap<std::string, Item*>& getEquipment() const { return this->Equipment; }
35        inline std::multimap<std::string, Item*>& getEquipment() {return this->Equipment;}
36        inline std::multimap<std::string, Item*>& getUsable() {return this->Usable;}
37        inline std::multimap<std::string, Item*>& getTrunk() {return this->Trunk;}
38        inline Pawn* getPlayer() {return this->player ;}
39        inline void setPlayer(Pawn* setplayer)
40        {this->player = setplayer;}
41        private:
42            Pawn* player;
43            std::multimap<std::string, Item*> Equipment;
44            std::multimap<std::string, Item*> Usable;
45            std::multimap<std::string, Item*> Trunk;
46    };
47}
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62#endif
Note: See TracBrowser for help on using the repository browser.