Fix duplicate variable name

This commit is contained in:
Ben 2024-06-01 01:48:24 +02:00
parent 3877075b46
commit b70c72c535
Signed by: ben
GPG key ID: 0F54A7ED232D3319

View file

@ -255,11 +255,11 @@ end
function get_orders() function get_orders()
orders = {} orders = {}
local orders = colony.getWorkOrders() local colony_orders = colony.getWorkOrders()
if orders ~= nil then if colony_orders ~= nil then
for i, order in pairs(orders) do for i, wo in pairs(colony_orders) do
local res = colony.getWorkOrderResources(order.id) local res = colony.getWorkOrderResources(wo.id)
table.insert(orders, {id=order.id, type=order.workOrderType, target=order.type, pos=order.builder, item=res.item, claimed=order.isClaimed, delivering=res.delivering}) table.insert(orders, {id=wo.id, type=wo.workOrderType, target=wo.type, pos=wo.builder, resources=res, claimed=wo.isClaimed, delivering=res.delivering})
wait_for(config.step_sleep_time) wait_for(config.step_sleep_time)
end end
end end