Index: code/branches/presentation3/src/orxonox/interfaces/InterfaceCompilation.cc
===================================================================
--- code/branches/presentation3/src/orxonox/interfaces/InterfaceCompilation.cc	(revision 7150)
+++ code/branches/presentation3/src/orxonox/interfaces/InterfaceCompilation.cc	(revision 7162)
@@ -59,15 +59,25 @@
     {
         RegisterRootObject(PickupCarrier);
-
-        this->setCarrierName("PickupCarrier");
     }
 
     PickupCarrier::~PickupCarrier()
     {
+
+    }
+
+    void PickupCarrier::preDestroy(void)
+    {
         std::set<Pickupable*>::iterator it = this->pickups_.begin();
+        std::set<Pickupable*>::iterator temp;
         while(it != this->pickups_.end())
         {
-            (*it)->destroy();
+            (*it)->carrierDestroyed();
+            temp = it;
             it = this->pickups_.begin();
+            if(it == temp) // Infinite loop avoidance, in case the pickup wasn't removed from the carrier somewhere in the carrierDestroy() procedure.
+            {
+                COUT(2) << "Oops. In a PickupCarrier, while cleaning up, a Pickupable (&" << (*temp) << ") didn't unregister itself as it should have." << std::endl;;
+                it++;
+            }
         }
 
Index: code/branches/presentation3/src/orxonox/interfaces/PickupCarrier.h
===================================================================
--- code/branches/presentation3/src/orxonox/interfaces/PickupCarrier.h	(revision 7150)
+++ code/branches/presentation3/src/orxonox/interfaces/PickupCarrier.h	(revision 7162)
@@ -79,4 +79,5 @@
             PickupCarrier(); //!< Constructor.
             virtual ~PickupCarrier(); //!< Destructor.
+            void preDestroy(void);
 
             /**
@@ -138,10 +139,4 @@
             virtual const Vector3& getCarrierPosition(void) = 0;
 
-            /**
-            @brief Get the name of this PickupCarrier.
-            @return Returns the name as a string.
-            */
-            const std::string& getCarrierName(void) { return this->carrierName_; } // tolua_export
-
         protected:
             /**
@@ -160,4 +155,14 @@
 
             /**
+            @brief Get all Pickupables this PickupCarrier has.
+            @return  Returns the set of all Pickupables this PickupCarrier has.
+            */
+            std::set<Pickupable*>& getPickups(void)
+                { return this->pickups_; }
+
+        private:
+            std::set<Pickupable*> pickups_; //!< The list of Pickupables carried by this PickupCarrier.
+
+            /**
             @brief Adds a Pickupable to the list of pickups that are carried by this PickupCarrier.
             @param pickup A pointer to the pickup to be added.
@@ -165,5 +170,8 @@
             */
             bool addPickup(Pickupable* pickup)
-                { return this->pickups_.insert(pickup).second; }
+                {
+                    COUT(4) << "Adding Pickupable (&" << pickup << ") to PickupCarrier (&" << this << ")" << std::endl;
+                    return this->pickups_.insert(pickup).second;
+                }
 
             /**
@@ -173,72 +181,7 @@
             */
             bool removePickup(Pickupable* pickup)
-                { return this->pickups_.erase(pickup) == 1; }
-
-            /**
-            @brief Get all Pickupables this PickupCarrier has.
-            @return  Returns the set of all Pickupables this PickupCarrier has.
-            */
-            std::set<Pickupable*>& getPickups(void)
-                { return this->pickups_; }
-
-            /**
-            @brief Set the name of this PickupCarrier.
-                   The name needs to be set in the constructor of every class inheriting from PickupCarrier, by calling setCarrierName().
-            @param name The name to be set.
-            */
-            void setCarrierName(const std::string& name)
-                { this->carrierName_ = name; }
-
-        private:
-            std::set<Pickupable*> pickups_; //!< The list of Pickupables carried by this PickupCarrier.
-            std::string carrierName_; //!< The name of the PickupCarrier, as displayed in the PickupInventory.
-
-            /**
-            @brief Get the number of carrier children this PickupCarrier has.
-            @return Returns the number of carrier children.
-            */
-            unsigned int getNumCarrierChildren(void)
                 {
-                    std::vector<PickupCarrier*>* list = this->getCarrierChildren();
-                    unsigned int size = list->size();
-                    delete list;
-                    return size;
-                }
-
-            /**
-            @brief Get the index-th child of this PickupCarrier.
-            @param index The index of the child to return.
-            @return Returns the index-th child.
-            */
-            PickupCarrier* getCarrierChild(unsigned int index)
-                {
-                    std::vector<PickupCarrier*>* list = this->getCarrierChildren();
-                    if(list->size() < index)
-                        return NULL;
-                    PickupCarrier* carrier = (*list)[index];
-                    delete list;
-                    return carrier;
-                }
-
-            /**
-            @brief Get the number of Pickupables this PickupCarrier carries.
-            @return returns the number of pickups.
-            */
-            unsigned int getNumPickups(void)
-                { return this->pickups_.size(); }
-
-            /**
-            @brief Get the index-th Pickupable of this PickupCarrier.
-            @param index The index of the Pickupable to return.
-            @return Returns the index-th pickup.
-            */
-            Pickupable* getPickup(unsigned int index)
-                {
-                    std::set<Pickupable*>::iterator it;
-                    for(it = this->pickups_.begin(); index != 0 && it != this->pickups_.end(); it++)
-                        index--;
-                    if(it == this->pickups_.end())
-                        return NULL;
-                    return *it;
+                    COUT(4) << "Removing Pickupable (&" << pickup << ") from PickupCarrier (&" << this << ")" << std::endl;
+                    return this->pickups_.erase(pickup) == 1;
                 }
 
Index: code/branches/presentation3/src/orxonox/interfaces/Pickupable.cc
===================================================================
--- code/branches/presentation3/src/orxonox/interfaces/Pickupable.cc	(revision 7150)
+++ code/branches/presentation3/src/orxonox/interfaces/Pickupable.cc	(revision 7162)
@@ -58,4 +58,6 @@
 
         this->pickupIdentifier_ = new PickupIdentifier(this);
+        this->beingDestroyed_ = false;
+        this->enabled_ = true;
     }
 
@@ -66,14 +68,41 @@
     Pickupable::~Pickupable()
     {
-        if(this->isUsed())
-            this->setUsed(false);
-
-        if(this->isPickedUp())
-        {
-            this->drop(false);
-        }
-
+        COUT(4) << "Pickupable (" << this->getIdentifier()->getName() << ") (&" << this << ") destroyed." << std::endl;
         if(this->pickupIdentifier_ != NULL)
             this->pickupIdentifier_->destroy();
+    }
+
+    /**
+    @brief
+        A method that is called by OrxonoxClass::destroy() before the object is actually destroyed.
+    */
+    void Pickupable::preDestroy(void)
+    {
+        this->beingDestroyed_ = true;
+
+        if(this->isPickedUp())
+            this->drop(false); // Drops the pickup without creating a PickupSpawner.
+    }
+
+    /**
+    @brief
+        Is called internally within the pickup module to destroy pickups.
+    */
+    void Pickupable::destroy(void)
+    {
+        this->destroyPickup();
+    }
+
+    /**
+    @brief
+        Destroys a Pickupable.
+        If the Pickupable is already in the process of being destroyed a warning is displayed and this method is skipped.
+    */
+    void Pickupable::destroyPickup(void)
+    {
+        if(!this->beingDestroyed_)
+            this->OrxonoxClass::destroy();
+        else
+            COUT(2) << this->getIdentifier()->getName() << " may be unsafe. " << std::endl;
     }
 
@@ -88,5 +117,8 @@
     bool Pickupable::setUsed(bool used)
     {
-        if(this->used_ == used)
+        if(this->used_ == used || !this->isPickedUp()) // If either the used status of the Pickupable doesn't change or it isn't picked up.
+            return false;
+
+        if((!this->isUsable() && used) || (!this->isUnusable() && !used)) // If either the Pickupable is requested to be used but it is not usable or the Pickupable is requested to be unused, while it is not unusable.
             return false;
 
@@ -112,4 +144,5 @@
         if(carrier == NULL)
             return false;
+
         return this->isTarget(carrier->getIdentifier());
     }
@@ -131,4 +164,5 @@
                 return true;
         }
+
         return false;
     }
@@ -178,13 +212,12 @@
             return false;
 
-        if(!carrier->addPickup(this))
+        if(!this->setCarrier(carrier))
         {
             COUT(3) << "A Pickupable (&" << this << ") was trying to be added to a PickupCarrier, but was already present." << std::endl;
             return false;
         }
-
+        
+        this->setPickedUp(true);
         COUT(4) << "Pickupable (&" << this << ") got picked up by a PickupCarrier (&" << carrier << ")." << std::endl;
-        this->setCarrier(carrier);
-        this->setPickedUp(true);
         return true;
     }
@@ -194,5 +227,5 @@
         Can be called to drop a Pickupable.
     @param createSpawner
-        If true a spawner is be created for the dropped Pickupable. True is default.
+        If true a spawner is to be created for the dropped Pickupable. True is default.
     @return
         Returns true if the Pickupable has been dropped, false if not.
@@ -200,11 +233,11 @@
     bool Pickupable::drop(bool createSpawner)
     {
-        if(!this->isPickedUp()) //!< If the Pickupable is not picked up.
-            return false;
-
-        assert(this->getCarrier()); //!> The Carrier cannot be NULL at this point. //TODO: Too conservative?
+        if(!this->isPickedUp()) // If the Pickupable is not picked up.
+            return false;
+
+        assert(this->getCarrier()); // The Carrier cannot be NULL at this point.
         if(!this->getCarrier()->removePickup(this)) //TODO Shouldn't this be a little later?
-            COUT(2) << "Pickupable (&" << this << ") is being dropped, but it was not present in the PickupCarriers list of pickups." << std::endl;
-        
+            COUT(2) << "Pickupable (&" << this << ", " << this->getIdentifier()->getName() << ") is being dropped, but it was not present in the PickupCarriers list of pickups." << std::endl;
+
         COUT(4) << "Pickupable (&" << this << ") got dropped up by a PickupCarrier (&" << this->getCarrier() << ")." << std::endl;
         this->setUsed(false);
@@ -217,8 +250,6 @@
         this->setCarrier(NULL);
 
-        if(!created && createSpawner)
-        {
+        if(!created && createSpawner) // If a PickupSpawner should have been created but wasn't.
             this->destroy();
-        }
 
         return true;
@@ -235,5 +266,5 @@
     bool Pickupable::setPickedUp(bool pickedUp)
     {
-        if(this->pickedUp_ == pickedUp)
+        if(this->pickedUp_ == pickedUp) // If the picked up status has not changed.
             return false;
 
@@ -241,4 +272,6 @@
 
         this->pickedUp_ = pickedUp;
+        if(!pickedUp) // if the Pickupable has been dropped it unregisters itself with its PickupCarrier.
+            this->getCarrier()->removePickup(this);
         this->changedPickedUp();
         GUIManager::getInstance().getLuaState()->doString("PickupInventory.update()");
@@ -251,17 +284,34 @@
     @param carrier
         Sets the input PickupCarrier as the carrier of the pickup.
-    */
-    inline bool Pickupable::setCarrier(PickupCarrier* carrier, bool tell)
-    {
-        if(this->carrier_ == carrier)
+    @param tell
+        If true (default) the pickup is added to the list of pickups in the PickupCarrier.
+    @return
+        Returns true if successful, false if not.
+    */
+    bool Pickupable::setCarrier(orxonox::PickupCarrier* carrier, bool tell)
+    {
+        if(this->carrier_ == carrier) // If the PickupCarrier doesn't change.
             return false;
 
         COUT(4) << "Pickupable (&" << this << ") changed Carrier (& " << carrier << ")." << std::endl;
 
+        if(carrier != NULL && tell)
+        {
+            if(!carrier->addPickup(this))
+                return false;
+        }
+        
         this->carrier_ = carrier;
         this->changedCarrier();
-        if(tell && carrier != NULL)
-            this->carrier_->pickups_.insert(this);
-        return true;
+        return true;
+    }
+
+    /**
+    @brief
+        Is called by the PickupCarrier when it is being destroyed.
+    */
+    void Pickupable::carrierDestroyed(void)
+    {
+        this->destroy();
     }
 
Index: code/branches/presentation3/src/orxonox/interfaces/Pickupable.h
===================================================================
--- code/branches/presentation3/src/orxonox/interfaces/Pickupable.h	(revision 7150)
+++ code/branches/presentation3/src/orxonox/interfaces/Pickupable.h	(revision 7162)
@@ -95,6 +95,26 @@
             virtual void changedPickedUp(void) {}
 
-            bool pickup(PickupCarrier* carrier);
-            bool drop(bool createSpawner = true);
+            /**
+            @brief Returns whether the Pickupable can be used.
+            @return Returns true if it can be used.
+            */
+            inline bool isUsable(void) { return this->enabled_; } // tolua_export
+            
+            /**
+            @brief Returns whether the Pickupable can be unused.
+            @return Returns true if it can be unused.
+            */
+            inline bool isUnusable(void) { return this->enabled_; } // tolua_export
+
+            /**
+            @brief Returns whether the Pickupable is enabled.
+                   Once a Pickupable is disabled it cannot be enabled again. A Pickupable that is disabled can neither be used nor unused.
+            @return Returns true if the Pickupable is enabled.
+            */
+            inline bool isEnabled(void)
+                { return this->enabled_; }
+
+            bool pickup(PickupCarrier* carrier); //!< Can be called to pick up a Pickupable.
+            bool drop(bool createSpawner = true); //!< Can be called to drop a Pickupable.
 
             virtual bool isTarget(PickupCarrier* carrier) const; //!< Get whether the given PickupCarrier is a target of this pickup.
@@ -115,5 +135,11 @@
             bool setUsed(bool used); //!< Sets the Pickupable to used or unused, depending on the input.
             bool setPickedUp(bool pickedUp); //!< Helper method to set the Pickupable to either picked up or not picked up.
-            bool setCarrier(PickupCarrier* carrier, bool tell = false); //!< Sets the carrier of the pickup.
+            //TODO: private?
+            bool setCarrier(PickupCarrier* carrier, bool tell = true); //!< Sets the carrier of the pickup.
+
+            //TODO: private?
+            virtual void carrierDestroyed(void); //!< Is called by the PickupCarrier when it is being destroyed.
+
+            void destroy(void); //!< Is called internally within the pickup module to destroy pickups.
 
         protected:
@@ -122,4 +148,13 @@
             */
             void initializeIdentifier(void) {}
+
+            virtual void preDestroy(void); //!< A method that is called by OrxonoxClass::destroy() before the object is actually destroyed.
+            virtual void destroyPickup(void); //!< Destroys a Pickupable.
+
+            /**
+            @brief Sets the Pickuapble to disabled.
+            */
+            inline void setDisabled(void)
+                { this->enabled_ = false; }
 
             /**
@@ -136,9 +171,13 @@
         private:
 
-            bool used_; //!< Whether the pickup is currently in use or not.
-            bool pickedUp_; //!< Whether the pickup is currently picked up or not.
+            bool used_; //!< Whether the Pickupable is currently in use or not.
+            bool pickedUp_; //!< Whether the Pickupable is currently picked up or not.
 
-            PickupCarrier* carrier_; //!< The carrier of the pickup.
-            std::list<Identifier*> targets_; //!< The possible targets of this pickup.
+            bool enabled_; //!< Whether the Pickupable is enabled or not.
+
+            PickupCarrier* carrier_; //!< The PickupCarrier of the Pickupable.
+            std::list<Identifier*> targets_; //!< The possible targets of this Pickupable.
+
+            bool beingDestroyed_; //!< Is true if the Pickupable is in the process of being destroyed.
 
         // For implementing the Rewardable interface:
