Added logistics, small fixes and cleanup
This commit is contained in:
18
logistic-network-stats.lua
Normal file
18
logistic-network-stats.lua
Normal file
@@ -0,0 +1,18 @@
|
||||
function GetAllLogisticGrids()
|
||||
local resultParts = {}
|
||||
resultParts[#resultParts+1] = "---logistic-grids---\n"
|
||||
for _,surface in pairs(game.surfaces) do
|
||||
local grids = game.forces["player"].logistic_networks[surface.name]
|
||||
for _,grid in pairs(grids) do
|
||||
resultParts[#resultParts+1] = ("%s:%d:%d:%d:%d:%d:%d"):format(
|
||||
surface.name,
|
||||
grid.network_id,
|
||||
grid.all_construction_robots,
|
||||
grid.all_logistic_robots,
|
||||
grid.available_construction_robots,
|
||||
grid.available_logistic_robots,
|
||||
grid.robot_limit)
|
||||
end
|
||||
end
|
||||
return table.concat(resultParts, "\n")
|
||||
end
|
||||
Reference in New Issue
Block a user