Index: code/trunk/src/modules/pickup/CMakeLists.txt
===================================================================
--- code/trunk/src/modules/pickup/CMakeLists.txt	(revision 6710)
+++ code/trunk/src/modules/pickup/CMakeLists.txt	(revision 6711)
@@ -15,4 +15,6 @@
   FIND_HEADER_FILES
   TOLUA_FILES
+    PickupManager.h
+    PickupRepresentation.h
   DEFINE_SYMBOL
     "PICKUP_SHARED_BUILD"
Index: code/trunk/src/modules/pickup/PickupManager.cc
===================================================================
--- code/trunk/src/modules/pickup/PickupManager.cc	(revision 6710)
+++ code/trunk/src/modules/pickup/PickupManager.cc	(revision 6711)
@@ -35,14 +35,23 @@
 
 #include "core/CoreIncludes.h"
+#include "core/LuaState.h"
+#include "core/GUIManager.h"
 #include "core/ScopedSingletonManager.h"
 #include "core/Identifier.h"
 #include "interfaces/PickupCarrier.h"
+#include "infos/PlayerInfo.h"
 #include "worldentities/pawns/Pawn.h"
 #include "PickupRepresentation.h"
 
+#include "ToluaBindPickup.h"
+
 namespace orxonox
 {
-
+    // Register tolua_open function when loading the library
+    DeclareToluaInterface(Pickup);
+    
     ManageScopedSingleton(PickupManager, ScopeID::Root, false);
+    
+    /*static*/ const std::string PickupManager::guiName_s = "PickupInventory";
     
     /**
@@ -110,3 +119,60 @@
     }
     
+    PickupCarrier* PickupManager::getPawn(void)
+    {
+        Pawn* pawn = dynamic_cast<Pawn*>(GUIManager::getInstancePtr()->getPlayer(PickupManager::guiName_s)->getControllableEntity());
+        if(pawn == NULL)
+            return NULL;
+        return dynamic_cast<PickupCarrier*>(pawn);
+    }
+    
+    int PickupManager::getNumCarrierChildren(PickupCarrier* carrier)
+    {
+        if(carrier == NULL)
+            return 0;
+        return carrier->getNumCarrierChildren();
+    }
+            
+    PickupCarrier* PickupManager::getCarrierChild(int index, PickupCarrier* carrier)
+    {
+        if(carrier == NULL)
+            return NULL;
+        return carrier->getCarrierChild(index);
+    }
+    
+    const std::string& PickupManager::getCarrierName(orxonox::PickupCarrier* carrier)
+    {
+        if(carrier == NULL)
+            return BLANKSTRING;
+        return carrier->getCarrierName();
+    }
+    
+    PickupRepresentation* PickupManager::getPickupRepresentation(int index, PickupCarrier* carrier)
+    {
+        Pickupable* pickup = carrier->getPickup(index);
+        if(pickup == NULL)
+            return NULL;
+        
+        return this->getRepresentation(pickup->getPickupIdentifier());
+    }
+    
+    int PickupManager::getNumPickups(PickupCarrier* carrier)
+    {
+        if(carrier == NULL)
+            return 0;
+        return carrier->getNumPickups();
+    }
+    
+    void PickupManager::dropPickup(int index, PickupCarrier* carrier)
+    {
+        Pickupable* pickup = carrier->getPickup(index);
+        carrier->drop(pickup);
+    }
+    
+    void PickupManager::usePickup(int index, PickupCarrier* carrier, bool use)
+    {
+        Pickupable* pickup = carrier->getPickup(index);
+        pickup->setUsed(use);
+    }
+    
 }
Index: code/trunk/src/modules/pickup/PickupManager.h
===================================================================
--- code/trunk/src/modules/pickup/PickupManager.h	(revision 6710)
+++ code/trunk/src/modules/pickup/PickupManager.h	(revision 6711)
@@ -44,17 +44,18 @@
 #include "core/OrxonoxClass.h"
 
-namespace orxonox
-{
+namespace orxonox // tolua_export
+{ // tolua_export
 
     /**
     @brief
         Manages Pickupables.
-        In essence has two tasks to fulfill. Firstly it must link Pickupables (through their PickupIdentifiers) and their PickupRepresentations. Secondly it manages the Pickup GUI.
+        In essence has two tasks to fulfill. Firstly it must link Pickupables (through their PickupIdentifiers) and their PickupRepresentations. Secondly it manages the PickupInventory.
         //TODO: Manage Pickup GUI.
     @author
         Damian 'Mozork' Frick
     */
-    class _PickupExport PickupManager : public Singleton<PickupManager>, public OrxonoxClass
-    {
+    class _PickupExport PickupManager // tolua_export
+        : public Singleton<PickupManager>, public OrxonoxClass
+    { // tolua_export
         friend class Singleton<PickupManager>;
         
@@ -63,18 +64,33 @@
             virtual ~PickupManager();
             
-            static PickupManager& getInstance() { return Singleton<PickupManager>::getInstance(); }
+            static PickupManager& getInstance() { return Singleton<PickupManager>::getInstance(); } // tolua_export
             
             bool registerRepresentation(const PickupIdentifier* identifier, PickupRepresentation* representation); //!< Registers a PickupRepresentation together with the PickupIdentifier of the Pickupable the PickupRepresentation represents.
             PickupRepresentation* getRepresentation(const PickupIdentifier* identifier); //!< Get the PickupRepresentation representing the Pickupable with the input PickupIdentifier.
             
+            // tolua_begin
+            orxonox::PickupCarrier* getPawn(void);
+            
+            int getNumCarrierChildren(orxonox::PickupCarrier* carrier);
+            orxonox::PickupCarrier* getCarrierChild(int index, orxonox::PickupCarrier* carrier);
+            
+            const std::string& getCarrierName(orxonox::PickupCarrier* carrier);
+            
+            int getNumPickups(orxonox::PickupCarrier* carrier);
+            PickupRepresentation* getPickupRepresentation(int index, orxonox::PickupCarrier* carrier);
+            void dropPickup(int index, orxonox::PickupCarrier* carrier);
+            void usePickup(int index, orxonox::PickupCarrier* carrier, bool use);
+            // tolua_end
+            
         private:
             static PickupManager* singletonPtr_s;
+            static const std::string guiName_s;
             
             PickupRepresentation* defaultRepresentation_; //!< The default PickupRepresentation.
             std::map<const PickupIdentifier*, PickupRepresentation*, PickupIdentifierCompare> representations_; //!< Map linking PickupIdentifiers (representing types if Pickupables) and PickupRepresentations.
         
-    };
+    }; // tolua_export
     
-}
+} // tolua_export
 
 #endif // _PickupManager_H__
Index: code/trunk/src/modules/pickup/PickupPrereqs.h
===================================================================
--- code/trunk/src/modules/pickup/PickupPrereqs.h	(revision 6710)
+++ code/trunk/src/modules/pickup/PickupPrereqs.h	(revision 6711)
@@ -65,5 +65,5 @@
 namespace orxonox
 {
-
+    
     class DroppedPickup;
     class Pickup;
Index: code/trunk/src/modules/pickup/PickupRepresentation.cc
===================================================================
--- code/trunk/src/modules/pickup/PickupRepresentation.cc	(revision 6710)
+++ code/trunk/src/modules/pickup/PickupRepresentation.cc	(revision 6711)
@@ -86,4 +86,5 @@
         this->name_ = "Pickup";
         this->spawnerTemplate_ = "";
+        this->inventoryRepresentation_ = "Default";
         this->pickup_ = NULL;
     }
@@ -97,7 +98,8 @@
         SUPER(PickupRepresentation, XMLPort, xmlelement, mode);
         
-        XMLPortParam(PickupRepresentation, "name", setName, getName, xmlelement, mode);
-        XMLPortParam(PickupRepresentation, "description", setDescription, getDescription, xmlelement, mode);
+        XMLPortParam(PickupRepresentation, "pickupName", setPickupName, getPickupName, xmlelement, mode);
+        XMLPortParam(PickupRepresentation, "pickupDescription", setPickupDescription, getPickupDescription, xmlelement, mode);
         XMLPortParam(PickupRepresentation, "spawnerTemplate", setSpawnerTemplate, getSpawnerTemplate, xmlelement, mode);
+        XMLPortParam(PickupRepresentation, "inventoryRepresentation", setInventoryRepresentation, getInventoryRepresentation, xmlelement, mode);
         XMLPortObject(PickupRepresentation, Pickupable, "pickup", setPickup, getPickup, xmlelement, mode);
         XMLPortObject(PickupRepresentation, StaticEntity, "spawner-representation", setSpawnerRepresentation, getSpawnerRepresentationIndex, xmlelement, mode);
Index: code/trunk/src/modules/pickup/PickupRepresentation.h
===================================================================
--- code/trunk/src/modules/pickup/PickupRepresentation.h	(revision 6710)
+++ code/trunk/src/modules/pickup/PickupRepresentation.h	(revision 6711)
@@ -45,6 +45,6 @@
 #include "core/BaseObject.h"
 
-namespace orxonox
-{
+namespace orxonox // tolua_export
+{ // tolua_export
 
     /**
@@ -53,6 +53,7 @@
         They are created through XML and are registered with the PickupManager.
     */
-    class _PickupExport PickupRepresentation : public BaseObject
-    {
+    class _PickupExport PickupRepresentation // tolua_export
+        : public BaseObject
+    { // tolua_export
         
         public:
@@ -67,5 +68,5 @@
             @param name The name.
             */
-            inline void setName(const std::string& name)
+            inline void setPickupName(const std::string& name)
                 { this->name_ = name; }
             /**
@@ -73,5 +74,5 @@
             @param description The Description.
             */
-            inline void setDescription(const std::string& description)
+            inline void setPickupDescription(const std::string& description)
                 { this->description_ = description; }
             /**
@@ -90,4 +91,10 @@
                 { this->spawnerRepresentation_ = representation; }
             /**
+            @brief Set the image representing the pickup in the PickupInventory.
+            @param image A string with the name of the image representing the pickup.
+            */
+            inline void setInventoryRepresentation(const std::string& image)
+                { this->inventoryRepresentation_ = image; }
+            /**
             @brief Set the Pickupable that is represented by this PickupRepresentation.
             @param pickup A pointer to the Pickupable.
@@ -100,12 +107,10 @@
             @return Returns the name.
             */
-            inline const std::string& getName(void)
-                { return this->name_; }
+            inline const std::string& getPickupName(void) { return this->name_; } // tolua_export
             /**
             @brief Get the description of the Pickupable represented by this PickupRepresentation.
             @return Returns the description.
             */
-            inline const std::string& getDescription(void)
-                { return this->description_; }
+            inline const std::string& getPickupDescription(void) { return this->description_; } // tolua_export
             /**
             @brief Get the name of spawnerTemplate the Pickupable represented by this PickupRepresentation.
@@ -121,4 +126,9 @@
             inline const StaticEntity* getSpawnerRepresentationIndex(unsigned int index)
                 { if(index == 0) return this->spawnerRepresentation_; return NULL; }
+            /**
+            @brief Get the name of the image representing the pickup in the PickupInventory.
+            @return Returns the name of the image as a string.
+            */
+            inline const std::string& getInventoryRepresentation(void) { return this->inventoryRepresentation_; } // tolua_export
             /**
             @brief Get the Pickupable represented by this PickupRepresentation.
@@ -139,10 +149,11 @@
             std::string spawnerTemplate_; //!<  The name of the template of this PickupRepresentation.
             StaticEntity* spawnerRepresentation_; //!< The spawnerRepresentation of this PickupRepresentation.
+            std::string inventoryRepresentation_; //!< The name of an image representing the pickup in the PickupInventory. TODO: Exact format and placement of image?
             
             Pickupable* pickup_; //!< The Pickupable that is represented by this PickupRepresentation.
             
-    };
+    }; // tolua_export
 
-}
+} // tolua_export
     
 #endif // _PickupRepresentation_H__
Index: code/trunk/src/modules/pickup/PickupSpawner.cc
===================================================================
--- code/trunk/src/modules/pickup/PickupSpawner.cc	(revision 6710)
+++ code/trunk/src/modules/pickup/PickupSpawner.cc	(revision 6711)
@@ -180,6 +180,7 @@
             {
                 Vector3 distance = it->getWorldPosition() - this->getWorldPosition();
+                PickupCarrier* carrier = dynamic_cast<PickupCarrier*>(*it);
                 //! If a Pawn, that fits the target-range of the item spawned by this Pickup, is in trigger-distance.
-                if (distance.length() < this->triggerDistance_ && this->pickup_->isTarget(*it))
+                if (distance.length() < this->triggerDistance_ && carrier != NULL && carrier->isTarget(this->pickup_))
                 {
                     this->trigger(*it);
