[Orxonox-commit 1962] r6679 - code/branches/pickup4/data/gui/scripts
dafrick at orxonox.net
dafrick at orxonox.net
Fri Apr 9 20:30:12 CEST 2010
Author: dafrick
Date: 2010-04-09 20:30:12 +0200 (Fri, 09 Apr 2010)
New Revision: 6679
Modified:
code/branches/pickup4/data/gui/scripts/PickupInventory.lua
Log:
Fixed annoying bug in PickupInventory (typos ;) ), use and drop functionality finally working.
Modified: code/branches/pickup4/data/gui/scripts/PickupInventory.lua
===================================================================
--- code/branches/pickup4/data/gui/scripts/PickupInventory.lua 2010-04-06 13:04:56 UTC (rev 6678)
+++ code/branches/pickup4/data/gui/scripts/PickupInventory.lua 2010-04-09 18:30:12 UTC (rev 6679)
@@ -15,7 +15,7 @@
P.carrierList = {}
function P.init()
-
+ carrierList = {}
end
function P.show()
@@ -27,6 +27,8 @@
local root = winMgr:getWindow("orxonox/PickupInventory/Inventory")
+ P.carrierList = {}
+
P.getCarrierList(carrier)
for k,v in pairs(P.carrierList) do
local window = P.createCarrierBox(v,k)
@@ -130,12 +132,11 @@
function P.InventoryUseButton_clicked(e)
local arguments = P.windowToCarrierHelper(e)
- debug(0, "(Buh: " .. arguments[1] .. "|" .. arguments[2] .. ")")
- orxonox.PickupManager:getInstance():usePickup(arguments[2], P.carrierList[arguments[1]], 1)
+ orxonox.PickupManager:getInstance():usePickup(arguments[2], P.carrierList[arguments[1]], true)
end
function P.InventoryDropButton_clicked(e)
- local arguments = P.windowToCarierHelper(e)
+ local arguments = P.windowToCarrierHelper(e)
orxonox.PickupManager:getInstance():dropPickup(arguments[2], P.carrierList[arguments[1]])
end
More information about the Orxonox-commit
mailing list