Fix duplicate variable name
This commit is contained in:
parent
3877075b46
commit
b70c72c535
10
test.lua
10
test.lua
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue