From 18d73cdc74ca96fcf1a158832c0036ebc29fe77f Mon Sep 17 00:00:00 2001 From: Octav Sandulescu Date: Fri, 24 Jul 2015 16:46:28 +0000 Subject: [PATCH] Change up how the tick to tick is calculated. Seriously, I'm not sure what I was smoking. --- evoGUI.lua | 4 +--- info.json | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/evoGUI.lua b/evoGUI.lua index 1cb1779..1fe5088 100644 --- a/evoGUI.lua +++ b/evoGUI.lua @@ -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) @@ -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 diff --git a/info.json b/info.json index 2466daa..1db43af 100644 --- a/info.json +++ b/info.json @@ -1,6 +1,6 @@ { "name": "EvoGUI", - "version": "0.2.0", + "version": "0.2.1", "title": "Evolution Factor Indicator", "author": "Octav \"narc\" Sandulescu", "contact": "factorio-mods@narc.ro",