My apologies, I'm not sure if I understand your response.
For clarity sake, what I'm saying is that you can replace this code starting at line 247:
(I hate the markdown system they use here.... Does not work half the time....)
script.on_event(defines.events.on_tick, function(e)
if e.tick % REFRESH_RATE == 0 then
for k,player in pairs(game.players) do
draw_gui(player)
end
end
end)
With this:
script.on_nth_event(defines.events.on_nth_tick, REFRESH_RATE, function(e)
for k,player in pairs(game.players) do
draw_gui(player)
end
end)
Doesn't solve what Sdclark99 asked, but rather eliminates a lua calculation that must be run every tick.
I maybe should have started a new thread on it than just posting in this one. :)