Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 2055


Ignore:
Timestamp:
Oct 29, 2008, 3:57:16 PM (15 years ago)
Author:
dsommer
Message:

Added checkifvalid, checkifslot and additem functions

Location:
code/branches/pickups/src/orxonox/objects/pickup
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • code/branches/pickups/src/orxonox/objects/pickup/ShipEquipmentClasses.h

    r1998 r2055  
    2222        class _OrxonoxExport ShipEquipment{
    2323        public:
    24                 void AddItem(Shipitem toAddItem);
    25                 void RemoveItem(Shipitem toRemoveItem);
    26                 bool CheckifValid(Shipitem toBeChecked);
    27                 int
     24                void AddItem(Shipitem* toAddItem);
     25                void RemoveItem(Shipitem* toRemoveItem);
     26                bool CheckifValid(Shipitem* toBeChecked);
     27                bool CheckifSpace();
    2828        private:
    29                 std::map<std::string, Item*> Shipitems;
    30                
    31                                
     29                multimap<std::string, ShipItem*> Equipment;
     30                multimap<std::string, ShipItem*> Usable;
     31                multimap<std::string, ShipItem*> Trunk;
    3232       
    3333
     34
     35}
    3436
    3537
  • code/branches/pickups/src/orxonox/objects/pickup/ShipItem.cc

    r1998 r2055  
    55        return This.type};
    66       
     7subItemTypePermanent CheckSubType(){
     8        return This.subtype_permanent};
    79       
  • code/branches/pickups/src/orxonox/objects/pickup/ShipItem.h

    r2000 r2055  
    2020        public:
    2121                itemType CheckType();
     22                virtual
    2223
    2324        private:
    2425                itemType type;
     26                string itemname;
    2527        };
    2628
     
    4143
    4244                        public:
    43                                 subItemTypeUseable CheckSubType();
     45                                //subItemTypeUseable CheckSubType();
    4446
    4547                        private:
    46                                 subItemTypeUseable subtype;
     48                                subItemTypeUseable subtype_usable;
    4749};
    4850
     
    6163
    6264                        private:
    63                                 subItemTypePermanent subtype;
     65                                subItemTypePermanent subtype_permanent;
    6466};
    6567
     
    6769Class _OrxonoxExport Powerups : public ShipItem{
    6870
    69         enum subItemTypePowerups{ //Diffrent Types of Items of the Type Powerups
     71        enum subItem TypePowerups{ //Diffrent Types of Items of the Type Powerups
    7072                        Weapon,
    7173                        Boosters,
     
    7678                        };
    7779                        public:
    78                         subItemTypePowerups CheckSubType();
     80                        //subItemTypePowerups CheckSubType();
    7981
    8082                        private:
    81                         subItemTypePowerups subtype;
     83                        subItemTypePowerups subtype_powerups;
    8284};
    8385
Note: See TracChangeset for help on using the changeset viewer.