v1.2 Fixed some issues with expiring timers leaving info up.
His Dad [03-21-15 - 08:07]
v1.2 Fixed some issues with expiring timers leaving info up.
diff --git a/GRID.lua b/GRID.lua
index debdb7f..1932670 100644
--- a/GRID.lua
+++ b/GRID.lua
@@ -166,7 +166,7 @@ end
function RT.GRID_Update(timestamp)
local emp_start, em_finish
for k, _ in pairs(RT.SV.data.Craft) do
- if ( (RT.SV.data.Craft[k][0].Simu_craft ~= 0 or RT.SV.data.Craft[k][1].Simu_craft ~= 0 or RT.SV.data.Craft[k][2].Simu_craft ~= 0)) then
+ -- if ( (RT.SV.data.Craft[k][0].Simu_craft ~= 0 or RT.SV.data.Craft[k][1].Simu_craft ~= 0 or RT.SV.data.Craft[k][2].Simu_craft ~= 0)) then
for craft_id = 0, 2,1 do
if (RT.SV.data.Craft[k][craft_id].MaxResearch ~= nil ) then
local MaxResearch = RT.SV.data.Craft[k][craft_id].MaxResearch
@@ -192,6 +192,10 @@ function RT.GRID_Update(timestamp)
for simcraft = 1, 3,1 do
+ --erase the display, need when a research is completed.
+ RT.UI.GRID_WD[k][craft_id][simcraft]["text"]:SetHidden(true)
+ RT.UI.GRID_WD[k][craft_id][simcraft]["item_icon"]:SetHidden(true)
+ RT.UI.GRID_WD[k][craft_id][simcraft]["trait_icon"]:SetHidden(true)
if (RT.SV.data.Craft[k][craft_id].doing[simcraft] ~= nil)then
@@ -208,14 +212,14 @@ function RT.GRID_Update(timestamp)
local tFormatted = FormatTimeSeconds(currenttimer, TIME_FORMAT_STYLE_COLONS, TIME_FORMAT_PRECISION_SECONDS, TIME_FORMAT_DIRECTION_DESCENDING)
-- chop seconds
RT.UI.GRID_WD[k][craft_id][simcraft]["text"]:SetText(string.sub(tFormatted, 1,string.len(tFormatted)-3))
- else
+ else -- only triggers on display of not logged in chars. Current Char causes a data reload
RT.UI.GRID_WD[k][craft_id][simcraft]["text"]:SetText(RT.L["Finished"])
RT.UI.GRID_WD[k].label:SetText("|cFF0000" .. string.upper(k) .."|r" )
end
end
end
end
- end
+ -- end
end
RT.Set_Shortest()
end
diff --git a/ResearchTimer.lua b/ResearchTimer.lua
index 138d8de..363d49c 100644
--- a/ResearchTimer.lua
+++ b/ResearchTimer.lua
@@ -135,14 +135,14 @@ end
function RT.CommandText_setup(option)
option = string.lower(option)
- RT.options = { string.match(option,"^(%S*)%s*(.-)$") }
-
+ RT.options = string.match(option,"^(%S*)%s*(.-)$")
+ d("RT.options: ".. RT.options)
if option == "" then
RT.toggleGRID()
- elseif RT.options.read ~= nil then -- cause a reread of the data without sorting
+ elseif RT.options == "read" then -- cause a reread of the data without sorting
d("RT: Running Collect_Data()")
RT.Collect_Data()
- elseif RT.options.debug ~= nil then
+ elseif RT.options == "debug" then
if RT.debug
then d("debug off")
else d("debug on")