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:
Frank
2025-12-31 13:17:13 +01:00
parent f7556fac0e
commit 11a8792398
@@ -8597,8 +8597,8 @@ function WAREHOUSE:_DeleteStockItem(stockitem)
local item=self.stock[i] --#WAREHOUSE.Assetitem
if item.uid==stockitem.uid then
table.remove(self.stock,i)
-- remove also from warehouse DB
_WAREHOUSEDB.Assets[stockitem.uid]=nil
-- 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
break
end
end