Index: /code/trunk/data/defaultConfig/keybindings.ini
===================================================================
--- /code/trunk/data/defaultConfig/keybindings.ini	(revision 11703)
+++ /code/trunk/data/defaultConfig/keybindings.ini	(revision 11704)
@@ -70,24 +70,24 @@
 KeyNoConvert=
 KeyNumLock=
-KeyNumRow0="useUnusePickup 0"
-KeyNumRow1="useUnusePickup 1"
-KeyNumRow2="useUnusePickup 2"
-KeyNumRow3="useUnusePickup 3"
-KeyNumRow4="useUnusePickup 4"
-KeyNumRow5="useUnusePickup 5"
-KeyNumRow6="useUnusePickup 6"
-KeyNumRow7="useUnusePickup 7"
-KeyNumRow8="useUnusePickup 8"
-KeyNumRow9="useUnusePickup 9"
-KeyNumpad0="useUnusePickup 0"
-KeyNumpad1="useUnusePickup 1"
-KeyNumpad2="useUnusePickup 2"
-KeyNumpad3="useUnusePickup 3"
-KeyNumpad4="useUnusePickup 4"
-KeyNumpad5="useUnusePickup 5"
-KeyNumpad6="useUnusePickup 6"
-KeyNumpad7="useUnusePickup 7"
-KeyNumpad8="useUnusePickup 8"
-KeyNumpad9="useUnusePickup 9"
+KeyNumRow0=
+KeyNumRow1="toggleFormationFlight"
+KeyNumRow2="FFChangeMode"
+KeyNumRow3=
+KeyNumRow4=
+KeyNumRow5=
+KeyNumRow6=
+KeyNumRow7=
+KeyNumRow8=
+KeyNumRow9=
+KeyNumpad0=
+KeyNumpad1=
+KeyNumpad2=
+KeyNumpad3=
+KeyNumpad4=
+KeyNumpad5=
+KeyNumpad6=
+KeyNumpad7=
+KeyNumpad8=
+KeyNumpad9=
 KeyNumpadAdd=
 KeyNumpadComma=
@@ -96,6 +96,6 @@
 KeyNumpadPeriod=
 KeyNumpadSubtract=
-KeyO="toggleFormationFlight"
-KeyP="FFChangeMode"
+KeyO=
+KeyP=
 KeyPageDown="scale -1 rotateRoll"
 KeyPageUp=
Index: /code/trunk/data/gui/scripts/KeyBindMenu.lua
===================================================================
--- /code/trunk/data/gui/scripts/KeyBindMenu.lua	(revision 11703)
+++ /code/trunk/data/gui/scripts/KeyBindMenu.lua	(revision 11704)
@@ -36,5 +36,4 @@
     table.insert(commandList, "pause")
     table.insert(commandList, "printScreen")
-    table.insert(commandList, "useUnusePickup")
     if orxonox.GUIManager:inDevMode() then
         table.insert(commandList, "printScreenHD")
@@ -72,5 +71,4 @@
     table.insert(nameList, "Pause")
     table.insert(nameList, "Screenshot")
-    table.insert(nameList, "Pickup 0")
     if orxonox.GUIManager:inDevMode() then
         table.insert(nameList, "HD screenshot")
Index: /code/trunk/src/modules/overlays/CMakeLists.txt
===================================================================
--- /code/trunk/src/modules/overlays/CMakeLists.txt	(revision 11703)
+++ /code/trunk/src/modules/overlays/CMakeLists.txt	(revision 11704)
@@ -16,4 +16,5 @@
   LINK_LIBRARIES
     orxonox
+    pickup
     weapons
   SOURCE_FILES ${OVERLAYS_SRC_FILES}
Index: /code/trunk/src/modules/overlays/hud/HUDPickupSystem.cc
===================================================================
--- /code/trunk/src/modules/overlays/hud/HUDPickupSystem.cc	(revision 11703)
+++ /code/trunk/src/modules/overlays/hud/HUDPickupSystem.cc	(revision 11704)
@@ -38,5 +38,4 @@
 #include "HUDPickupSystem.h"
 #include "HUDPickupItem.h"
-#include "pickup/Pickup.h"
 #include "pickup/PickupManager.h"
 
@@ -66,8 +65,9 @@
     }
     
-    void HUDPickupSystem::sync(std::vector<Pickupable*> p, std::map<Pickupable*, uint32_t> indexes_)
+    void HUDPickupSystem::tick(float dt)
     {
+        SUPER(HUDPickupSystem, tick, dt);
+
         //hide all pickup symbols in HUD and delete from local map
-        
         for(HUDPickupItem* item : items_)
         {
@@ -84,12 +84,14 @@
         const float y = 0.075f;
 
-        for(Pickupable* pickup:p)
+        int numPickups = PickupManager::getInstance().getNumPickups();
+        for (int index = 0; index < numPickups; ++index)
         {
-            int index = indexes_.find(pickup)->second;
             int row = index / 5;
             int column = index % 5;
 
+            const PickupInventoryContainer* container = PickupManager::getInstance().popPickup();
+
             HUDPickupItem* item = new HUDPickupItem(this->getContext());
-            item->initializeMaterial(this->getIcon(((Pickup*)pickup)->getRepresentationName()), offsetX+column*x, offsetY+row*y);
+            item->initializeMaterial(this->getIcon(container->representationName), offsetX+column*x, offsetY+row*y);
             item->setOverlayGroup(this->getOverlayGroup());
             items_.push_back(item);
Index: /code/trunk/src/modules/overlays/hud/HUDPickupSystem.h
===================================================================
--- /code/trunk/src/modules/overlays/hud/HUDPickupSystem.h	(revision 11703)
+++ /code/trunk/src/modules/overlays/hud/HUDPickupSystem.h	(revision 11704)
@@ -37,8 +37,9 @@
 #include "util/OgreForwardRefs.h"
 #include "overlays/OrxonoxOverlay.h"
+#include "tools/interfaces/Tickable.h"
 
 namespace orxonox
 {
-    class _OverlaysExport HUDPickupSystem : public OrxonoxOverlay
+    class _OverlaysExport HUDPickupSystem : public OrxonoxOverlay, public Tickable
     {
     public:
@@ -46,6 +47,6 @@
         virtual ~HUDPickupSystem();
 
-        void sizeChanged();
-        void sync(std::vector<Pickupable*> p, std::map<Pickupable*, uint32_t> indexes_);
+        virtual void tick(float dt) override;
+        virtual void sizeChanged() override;
 
     private:
Index: /code/trunk/src/modules/pickup/CMakeLists.txt
===================================================================
--- /code/trunk/src/modules/pickup/CMakeLists.txt	(revision 11703)
+++ /code/trunk/src/modules/pickup/CMakeLists.txt	(revision 11704)
@@ -19,5 +19,4 @@
     PickupPrecompiledHeaders.h
   LINK_LIBRARIES
-    overlays
     orxonox
   SOURCE_FILES ${PICKUP_SRC_FILES}
Index: /code/trunk/src/modules/pickup/PickupManager.cc
===================================================================
--- /code/trunk/src/modules/pickup/PickupManager.cc	(revision 11703)
+++ /code/trunk/src/modules/pickup/PickupManager.cc	(revision 11704)
@@ -41,7 +41,4 @@
 #include "network/Host.h"
 #include "network/NetworkFunctionIncludes.h"
-#include "core/input/KeyBinderManager.h"    //for keybinding
-#include "core/input/KeyBinder.h"           //for keybinding
-#include "core/command/ConsoleCommandIncludes.h"
 
 #include "infos/PlayerInfo.h"
@@ -51,5 +48,4 @@
 #include "CollectiblePickup.h"
 #include "PickupRepresentation.h"
-#include "overlays/hud/HUDPickupSystem.h"
 
 namespace orxonox
@@ -67,6 +63,4 @@
 
     RegisterAbstractClass(PickupManager).inheritsFrom<PickupListener>();
-
-    SetConsoleCommand("useUnusePickup", &PickupManager::useUnusePickup).addShortcut().setActive(true);
 
     /**
@@ -265,7 +259,4 @@
         assert(pickup);
 
-        for (HUDPickupSystem* hud : ObjectList<HUDPickupSystem>())
-            pickupSystem = hud;
-        
         if(!GameMode::isMaster()) // If this is neither standalone nor the server.
             return;
@@ -295,10 +286,4 @@
             this->indexes_[pickup] = index;
             this->pickups_[index] = pickup;
-
-            this->picks.push_back(pickup);
-
-            if(pickupSystem)
-                pickupSystem->sync(picks, indexes_);
-            
         }
         else // If it was dropped, it is removed from the required lists.
@@ -308,12 +293,7 @@
             index = it->second;
 
-            this->indexes_.erase(pickup);
-            this->pickups_.erase(index); //set to null, so that can be identified as free slot by getPickupIndex()
-
-
-            this->picks.erase(std::remove(this->picks.begin(), this->picks.end(), pickup), this->picks.end()); //remove pickup from vector
-
-            if(pickupSystem)
-                pickupSystem->sync(picks, indexes_);
+            // Remove the Pickupable from the indexes_ and pickups_ list.
+            this->indexes_.erase(it);
+            this->pickups_.erase(index);
         }
 
@@ -342,31 +322,4 @@
 
     }
-
-    //This function is called by the command line or by the key binding
-    //it uses or unuses the pickup, depending on its current state
-    //or drops it (depends what you comment/uncomment)
-    void PickupManager::useUnusePickup(uint32_t index) 
-    {
-        PickupManager& manager = PickupManager::getInstance();
-
-        if(!manager.pickups_.count(index)) return; //if pickup is no longer here, dont do anything
-
-        Pickupable* pickup=manager.pickups_.find(index)->second;
-        if(pickup==nullptr)
-        {
-            return;                       //pickup does not exist
-        }
-
-        //if the pickup should be dropped upon key press
-        manager.dropPickup(index);
-
-        //if the pickup should be used/unused upon key press
-
-        // if(pickup->isUsed())
-        //     manager.usePickup(index, false);
-        // else
-        //     manager.usePickup(index, true);
-    }
-
 
     /**
@@ -448,8 +401,5 @@
             Pickupable* pickupable = this->pickups_.find(pickup)->second;
             if(pickupable != nullptr)
-            {
                 pickupable->drop();
-
-            }
         }
         // If we're neither server nor standalone we drop the pickup by calling dropPickupNetworked() of the PickupManager on the server.
@@ -544,6 +494,6 @@
     /**
     @brief
-        Get a new index between 0 and 9 for a Pickupable.
-        If all slots are occupied, the Pickupable in the first slot will be dropped.
+        Get a new index for a Pickupable.
+        This will work as long as the number of Pickupables that are picked up is sufficiently small and as long as they don't exist forever.
     @return
         Returns the new index.
@@ -551,14 +501,7 @@
     uint32_t PickupManager::getPickupIndex(void)
     {
-        //check if there are free slots available
-
-        for(uint32_t i=0; i<10; i++)
-        {
-            if(!pickups_.count(i)) return i;
-        }
-        //all slots are full and we have to drop sth
-        orxout(internal_info, context::pickups) << "everything was full and we have now dropped the first element" << endl;
-        this->dropPickup(0);
-        return 0;
+        if(this->pickupHighestIndex_ == uint32_t(~0x0)-1) // If we've reached the highest possible number, we wrap around.
+            this->pickupHighestIndex_ = 0;
+        return this->pickupHighestIndex_++;
     }
 
Index: /code/trunk/src/modules/pickup/PickupManager.h
===================================================================
--- /code/trunk/src/modules/pickup/PickupManager.h	(revision 11703)
+++ /code/trunk/src/modules/pickup/PickupManager.h	(revision 11704)
@@ -42,8 +42,7 @@
 
 #include "PickupRepresentation.h"
-#include "interfaces/Pickupable.h"
+
 #include "util/Singleton.h"
 #include "interfaces/PickupListener.h"
-#include "overlays/hud/HUDPickupSystem.h"
 
 namespace orxonox // tolua_export
@@ -136,5 +135,4 @@
 
             void dropPickup(uint32_t pickup); //!< Drop the input Pickupable.
-            static void useUnusePickup(uint32_t index); //tolua_export
             void usePickup(uint32_t pickup, bool use); //!< Use (or unuse) the input Pickupable.
              /**
@@ -149,10 +147,6 @@
             static void dropPickupNetworked(uint32_t pickup); //!< Helper method to drop the input pickup on the server.
             static void usePickupNetworked(uint32_t pickup, bool use); //!< Helper method to use (or unuse) the input Pickupable on the server.
-            void setPickupSystem(HUDPickupSystem* system);
 
         private:
-            HUDPickupSystem* pickupSystem;
-            std::vector<Pickupable*> picks;
-
             static PickupManager* singletonPtr_s;
             static const std::string guiName_s; //!< The name of the PickupInventory
@@ -172,5 +166,5 @@
             void updateGUI(void); //!< Updates the PickupInventory GUI.
             uint32_t getPickupIndex(void); //!< Get a new index for a Pickupable.
-            
+
     }; // tolua_export
 
Index: /code/trunk/src/orxonox/CMakeLists.txt
===================================================================
--- /code/trunk/src/orxonox/CMakeLists.txt	(revision 11703)
+++ /code/trunk/src/orxonox/CMakeLists.txt	(revision 11704)
@@ -20,5 +20,4 @@
 INCLUDE_DIRECTORIES(
   ${CMAKE_SOURCE_DIR}/src/libraries
-  ${CMAKE_SOURCE_DIR}/src/modules
   ${CMAKE_CURRENT_SOURCE_DIR}
 )
Index: /code/trunk/src/orxonox/interfaces/Pickupable.h
===================================================================
--- /code/trunk/src/orxonox/interfaces/Pickupable.h	(revision 11703)
+++ /code/trunk/src/orxonox/interfaces/Pickupable.h	(revision 11704)
@@ -96,11 +96,4 @@
 
             /**
-            @brief Check whether the Pickupable is in the process of being destroyed.
-            @return Returns true if so.
-            */
-            inline bool isBeingDestroyed(void)
-                { return this->beingDestroyed_; }
-                
-            /**
             @brief Returns whether the Pickupable is currently picked up.
             @return Returns true if the Pickupable is currently picked up, false if not.
@@ -162,4 +155,11 @@
 
             /**
+            @brief Check whether the Pickupable is in the process of being destroyed.
+            @return Returns true if so.
+            */
+            inline bool isBeingDestroyed(void)
+                { return this->beingDestroyed_; }
+
+            /**
             @brief Facilitates the creation of a PickupSpawner upon dropping of the Pickupable.
                    This method must be implemented by any class directly inheriting from Pickupable.
