Skip to content

Commit

Permalink
0.3.0 Release! Fixed a loop condition bug
Browse files Browse the repository at this point in the history
  • Loading branch information
dustine committed Jun 16, 2017
1 parent 5a46e90 commit 2a90a09
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion control.lua
Original file line number Diff line number Diff line change
Expand Up @@ -348,10 +348,11 @@ script.on_event(defines.events.on_tick, function(event)
local max
-- log(counters.done_nodes)
-- print((5-#nodes%5)%5)
if event.tick%60 == 59 then max = -1 -- Damage control, does ALL remaining nodes in the end until you nil
if event.tick%60 == 59 then max = math.huge -- Damage control, does ALL remaining nodes in the end until you nil
elseif event.tick%60 >= (60-#nodes%60)%60 then max = math.ceil(#nodes/60) -- separates the nodes over 60 seconds
else max = math.floor(#nodes/60) end
-- max = math.ceil(#nodes/5)
-- print(counters.nid)

while counters.nid and iter < max do
local node = nodes[counters.nid]
Expand Down

0 comments on commit 2a90a09

Please sign in to comment.