Skip to content
This repository has been archived by the owner on Oct 22, 2024. It is now read-only.

Commit

Permalink
Change up how the tick to tick is calculated.
Browse files Browse the repository at this point in the history
Seriously, I'm not sure what I was smoking.
  • Loading branch information
narc0tiq committed Jul 24, 2015
1 parent 61eeb82 commit 18d73cd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions evoGUI.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@ require "defines"

if not evogui then evogui = {} end
evogui.update_delay = 60 -- ticks to wait between each GUI update
evogui.previous = nil -- game tick when we did our last GUI update

local function update_gui()
if evogui.previous == nil or (game.tick - evogui.previous) >= evogui.update_delay then
if (game.tick % evogui.update_delay) == 0 then
for i, player in ipairs(game.players) do
evogui.create_or_update(player)

Expand All @@ -15,7 +14,6 @@ local function update_gui()
evogui.update_day_time(player.gui.top.evoGUI)
end
end
evogui.previous = game.tick
end
end
evogui.update_gui = update_gui
Expand Down
2 changes: 1 addition & 1 deletion info.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "EvoGUI",
"version": "0.2.0",
"version": "0.2.1",
"title": "Evolution Factor Indicator",
"author": "Octav \"narc\" Sandulescu",
"contact": "[email protected]",
Expand Down

0 comments on commit 18d73cd

Please sign in to comment.