Index: code/trunk/data/gui/scripts/PickupInventory.lua
===================================================================
--- code/trunk/data/gui/scripts/PickupInventory.lua	(revision 7500)
+++ code/trunk/data/gui/scripts/PickupInventory.lua	(revision 7504)
@@ -45,5 +45,5 @@
                 local useButton = winMgr:getWindow("orxonox/PickupInventory/Details" .. k .. "/UseButton")
                 local dropButton = winMgr:getWindow("orxonox/PickupInventory/Details" .. k .. "/DropButton")
-                if orxonox.PickupManager:getInstance():isValidPickup(pickup) == false then
+                if orxonox.PickupManager:getInstance():isValidPickup(pickup.pickup) == false then
                     useButton:setEnabled(false)
                     dropButton:setEnabled(false)
@@ -51,8 +51,8 @@
                 else
                     useButton:setEnabled(true)
-                    if pickup:isUsed() == true then
+                    if pickup.inUse == true then
                         useButton:setText("unuse")
                         orxonox.GUIManager:subscribeEventHelper(useButton, "Clicked", P.name .. ".InventoryUseDetailButton_clicked")
-                        if pickup:isUsable() == false then
+                        if pickup.usable == false then
                             useButton:setEnabled(false)
                         end
@@ -60,10 +60,10 @@
                         useButton:setText("use")
                         orxonox.GUIManager:subscribeEventHelper(useButton, "Clicked", P.name .. ".InventoryUnuseDetailButton_clicked")
-                        if pickup:isUnusable() == false then
+                        if pickup.unusable == false then
                             useButton:setEnabled(false)
                         end
                     end
 
-                    if pickup:isPickedUp() == false then
+                    if pickup.pickedUp == false then
                         useButton:setEnabled(false)
                         dropButton:setEnabled(false)
@@ -108,5 +108,5 @@
 
 function P.createPickupEntry(index, pickup)
-    local representation = orxonox.PickupManager:getInstance():getPickupRepresentation(pickup)
+    local representation = orxonox.PickupManager:getInstance():getPickupRepresentation(pickup.pickup)
 
     local name = "orxonox/PickupInventory/Box/Pickup" .. index
@@ -133,8 +133,8 @@
     useButton:setPosition(CEGUI.UVector2(CEGUI.UDim(0.3, P.imageHeight+10),CEGUI.UDim(0, (P.imageHeight-P.textHeight)/2)))
     useButton:setSize(CEGUI.UVector2(CEGUI.UDim(0, P.buttonWidth), CEGUI.UDim(0, P.textHeight)))
-    if pickup:isUsed() == false then
+    if pickup.inUse == false then
         useButton:setText("use")
         orxonox.GUIManager:subscribeEventHelper(useButton, "Clicked", P.name .. ".InventoryUseButton_clicked")
-        if pickup:isUsable() == false then
+        if pickup.usable == false then
             useButton:setEnabled(false)
         end
@@ -142,5 +142,5 @@
         useButton:setText("unuse")
         orxonox.GUIManager:subscribeEventHelper(useButton, "Clicked", P.name .. ".InventoryUnuseButton_clicked")
-        if pickup:isUnusable() == false then
+        if pickup.unusable == false then
             useButton:setEnabled(false)
         end
@@ -193,5 +193,5 @@
 function P.createDetailsWindow(pickupIndex)
     local pickup = P.pickupsList[pickupIndex]
-    local representation = orxonox.PickupManager:getInstance():getPickupRepresentation(pickup)
+    local representation = orxonox.PickupManager:getInstance():getPickupRepresentation(pickup.pickup)
 
     local index = P.getNewDetailNumber()
@@ -238,8 +238,8 @@
     useButton:setPosition(CEGUI.UVector2(CEGUI.UDim(0, P.detailImageSize+10),CEGUI.UDim(1, -40)))
     useButton:setSize(CEGUI.UVector2(CEGUI.UDim(0, P.buttonWidth), CEGUI.UDim(0, P.textHeight)))
-    if pickup:isUsed() == false then
+    if pickup.inUse == false then
         useButton:setText("use")
         orxonox.GUIManager:subscribeEventHelper(useButton, "Clicked", P.name .. ".InventoryUseDetailButton_clicked")
-        if pickup:isUsable() == false then
+        if pickup.usable == false then
             useButton:setEnabled(false)
         end
@@ -247,5 +247,5 @@
         useButton:setText("unuse")
         orxonox.GUIManager:subscribeEventHelper(useButton, "Clicked", P.name .. ".InventoryUnuseDetailButton_clicked")
-        if pickup:isUnusable() == false then
+        if pickup.unusable == false then
             useButton:setEnabled(false)
         end
@@ -277,15 +277,18 @@
 function P.InventoryUseButton_clicked(e)
     local pickupIndex = P.windowToPickupHelper(e)
-    orxonox.PickupManager:getInstance():usePickup(P.pickupsList[pickupIndex], true)
+    local pickup = P.pickupsList[pickupIndex]
+    orxonox.PickupManager:getInstance():usePickup(pickup.pickup, true)
 end
 
 function P.InventoryUnuseButton_clicked(e)
     local pickupIndex = P.windowToPickupHelper(e)
-    orxonox.PickupManager:getInstance():usePickup(P.pickupsList[pickupIndex], false)
+    local pickup = P.pickupsList[pickupIndex]
+    orxonox.PickupManager:getInstance():usePickup(pickup.pickup, false)
 end
 
 function P.InventoryDropButton_clicked(e)
     local pickupIndex = P.windowToPickupHelper(e)
-    orxonox.PickupManager:getInstance():dropPickup(P.pickupsList[pickupIndex])
+    local pickup = P.pickupsList[pickupIndex]
+    orxonox.PickupManager:getInstance():dropPickup(pickup.pickup)
 end
 
@@ -297,15 +300,18 @@
 function P.InventoryUseDetailButton_clicked(e)
     local pickupIndex = P.windowToPickupHelper(e)
-    orxonox.PickupManager:getInstance():usePickup(P.detailPickups[pickupIndex], true)
+    local pickup = P.detailPickups[pickupIndex]
+    orxonox.PickupManager:getInstance():usePickup(pickup.pickup, true)
 end
 
 function P.InventoryUnuseDetailButton_clicked(e)
     local pickupIndex = P.windowToPickupHelper(e)
-    orxonox.PickupManager:getInstance():usePickup(P.detailPickups[pickupIndex], false)
+    local pickup = P.detailPickups[pickupIndex]
+    orxonox.PickupManager:getInstance():usePickup(pickup.pickup, false)
 end
 
 function P.InventoryDropDetailButton_clicked(e)
     local pickupIndex = P.windowToPickupHelper(e)
-    orxonox.PickupManager:getInstance():dropPickup(P.detailPickups[pickupIndex])
+    local pickup = P.detailPickups[pickupIndex]
+    orxonox.PickupManager:getInstance():dropPickup(pickup.pickup)
 end
 
