Kraeius's Avatar
Files 1
Downloads 51,967
Favorites 170
My AddOns
View Feature Request
Text in RED when free research slots ( patch included here )
Feature #: 345
File: RAETIA InfoHub
Date: 05/17/14 08:06 PM
By: alexminion
Status: Feature already added
Text will show RED when there are free research slots available. Patch:


function RIB.UpdateResearchStatus()
if RIB.SavedVars.ShowResearchStatus == true then
local bs_timeRemainingSecs, bs_maxSimultaneousResearch, bs_numFreeSlots = RIB.GetTimeForResearchStatus(CRAFTING_TYPE_BLACKSMITHING)
local ww_timeRemainingSecs, ww_maxSimultaneousResearch, ww_numFreeSlots = RIB.GetTimeForResearchStatus(CRAFTING_TYPE_WOODWORKING)
local cl_timeRemainingSecs, cl_maxSimultaneousResearch, cl_numFreeSlots = RIB.GetTimeForResearchStatus(CRAFTING_TYPE_CLOTHIER)
local blacksmithing, woodworking, clothing
local bscolor = "|cFFFFFF"
local wwcolor = "|cFFFFFF"
local clcolor = "|cFFFFFF"
if RIB.StoClockFormat(bs_timeRemainingSecs) == "00:00:00" then
blacksmithing = "BS: " .. RIB.Colours.Crimson .. "Open!" .. RIB.Colours.White .. spacer
RIB.UpdateInformationBar()
else
if (bs_numFreeSlots > 0) then
bscolor = RIB.Colours.Crimson
else
bscolor = RIB.Colours.LawnGreen
end
blacksmithing = "BS: " .. bscolor .. RIB.StoClockFormat(bs_timeRemainingSecs) .. RIB.Colours.White .. spacer
RIB.UpdateInformationBar()
end
if RIB.StoClockFormat(ww_timeRemainingSecs) == "00:00:00" then
woodworking = "WW: " .. RIB.Colours.Crimson .. "Open!" .. RIB.Colours.White .. spacer
RIB.UpdateInformationBar()
else
if (ww_numFreeSlots > 0) then
wwcolor = RIB.Colours.Crimson
else
wwcolor = RIB.Colours.LawnGreen
end
woodworking = "WW: " .. wwcolor .. RIB.StoClockFormat(ww_timeRemainingSecs) .. RIB.Colours.White .. spacer
RIB.UpdateInformationBar()
end
if RIB.StoClockFormat(cl_timeRemainingSecs) == "00:00:00" then
clothing = "CL: " .. RIB.Colours.Crimson .. "Open!" .. RIB.Colours.White .. spacer
RIB.UpdateInformationBar()
else
if (cl_numFreeSlots > 0) then
clcolor = RIB.Colours.Crimson
else
clcolor = RIB.Colours.LawnGreen
end
clothing = "CL: " .. clcolor .. RIB.StoClockFormat(cl_timeRemainingSecs) .. RIB.Colours.White .. spacer
RIB.UpdateInformationBar()
end
RIB.Strings.ResearchStatus = RIB.Colours.White .. "Research: " .. RIB.Colours.White .. blacksmithing .. " " .. RIB.Colours.White .. woodworking .. " " .. RIB.Colours.White .. clothing
RIBInformationBarResearchStatus:SetText(RIB.Strings.ResearchStatus)
RIB.UpdateInformationBar()
end
end