mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2026-08-10 08:29:52 +00:00
Update Warehouse.lua
- fixed bug that assets cannot be found in DB and therefore are not added to the requesting warehouse
This commit is contained in:
@@ -8597,8 +8597,8 @@ function WAREHOUSE:_DeleteStockItem(stockitem)
|
|||||||
local item=self.stock[i] --#WAREHOUSE.Assetitem
|
local item=self.stock[i] --#WAREHOUSE.Assetitem
|
||||||
if item.uid==stockitem.uid then
|
if item.uid==stockitem.uid then
|
||||||
table.remove(self.stock,i)
|
table.remove(self.stock,i)
|
||||||
-- remove also from warehouse DB
|
-- remove also from warehouse DB (not good! causes an error if the asset needs to be added to a requesting wherehouse)
|
||||||
_WAREHOUSEDB.Assets[stockitem.uid]=nil
|
--_WAREHOUSEDB.Assets[stockitem.uid]=nil
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user