changeset 48:a2fc078e4d70 Prospect Me 2

Cleaned up formatting a bit in an attempt to streamline and make the data more readable, especially with large sets of results.
author Vynn <mischivin@gmail.com>
date Thu, 17 Nov 2016 02:06:18 -0500
parents 4c684bba5777
children 9dae86337a41
files ProspectMe_Tooltip.lua
diffstat 1 files changed, 41 insertions(+), 32 deletions(-) [+]
line wrap: on
line diff
--- a/ProspectMe_Tooltip.lua	Thu Nov 17 01:07:51 2016 -0500
+++ b/ProspectMe_Tooltip.lua	Thu Nov 17 02:06:18 2016 -0500
@@ -79,55 +79,64 @@
 				--NumofEachQuality, Percent of Each Quality
 				self:AddLine(" ")
 				local color
-					if ProspectMe.Results[item].TimesProspected < 100 then
-						color = "|cffff0000"
-						elseif ProspectMe.Results[item].TimesProspected < 200 then
-							color = "|cffffff00"
-						else
-							color = "|cff00ff00"
-						end
+				if ProspectMe.Results[item].TimesProspected < 100 then
+					color = "|cffff0000"
+				elseif ProspectMe.Results[item].TimesProspected < 200 then
+					color = "|cffffff00"
+				else
+					color = "|cff00ff00"
+				end
+				
+				-- SKill Text Block ""
+				local skilltext
 				if spellid == 225902 or spellid == 225904 or subclass == ProspectMe.Vars.ORE then
-					self:AddDoubleLine("Prospect Me","Times Prospected: " .. color .. ProspectMe.Results[item].TimesProspected,0.5,1,0.5,0.5,0.5,1)
+					skilltext = "Prospected"
 				elseif spellid == 210116 or subclass == ProspectMe.Vars.HERB then
-					self:AddDoubleLine("Prospect Me","Times Milled: " .. color .. ProspectMe.Results[item].TimesProspected,0.5,1,0.5,0.5,0.5,1)
+					skilltext = "Milled"
 				else
-					self:AddDoubleLine("Prospect Me","Times Processed: " .. color .. ProspectMe.Results[item].TimesProspected,0.5,1,0.5,0.5,0.5,1)
+					skilltext = "Processed"
+				end
+				self:AddDoubleLine("Prospect Me","Times " .. skilltext .. ":  " .. color .. ProspectMe.Results[item].TimesProspected,1,0.82,0,1,1,1)
+				self:AddLine(" ")
+				
+				-- Economics Text Block
+				local spelltext
+				if spellid == 225902 or spellid == 225904 then
+					spelltext = "Mass Prospect"
+				elseif spellid == 210116 then
+					spelltext = "Mass Mill"
+				elseif subclass == ProspectMe.Vars.ORE then
+					spelltext = "Prospect"
+				elseif subclass == ProspectMe.Vars.HERB then
+					spelltext = "Mill" 
+				else
+					spelltext = "Process"
 				end
 				if spellid then
 					ctp = price * 20
 					lifetimeReturn = lifetimeReturn * 4
 				end
-				if spellid == 225902 or spellid == 225904 then
-					self:AddDoubleLine("Cost to Mass Prospect: " .. ProspectMe.FormatPrice(ctp), " Average Return: " .. ProspectMe.FormatPrice(lifetimeReturn))
-				elseif spellid == 210116 then
-					self:AddDoubleLine("Cost to Mass Mill: " .. ProspectMe.FormatPrice(ctp), " Average Return: " .. ProspectMe.FormatPrice(lifetimeReturn))
-				elseif subclass == ProspectMe.Vars.ORE then
-					self:AddDoubleLine("Cost to Prospect: " .. ProspectMe.FormatPrice(ctp), " Average Return: " .. ProspectMe.FormatPrice(lifetimeReturn))
-				elseif subclass == ProspectMe.Vars.HERB then
-					self:AddDoubleLine("Cost to Mill: " .. ProspectMe.FormatPrice(ctp), " Average Return: " .. ProspectMe.FormatPrice(lifetimeReturn))
-				else
-					self:AddDoubleLine("Cost to Process: " .. ProspectMe.FormatPrice(ctp), " Average Return: " .. ProspectMe.FormatPrice(lifetimeReturn))
-				end
-				self:AddLine(" ")
 				local profit = lifetimeReturn - ctp
 				local margin = (lifetimeReturn / ctp * 100) - 100
-				if margin > 30 then
-					self:AddLine("Estimated Profit: " .. ProspectMe.FormatPrice(profit) .. "\nMargin:  |cff00ff00" .. string.format("[%.1f%%]", margin))
-				elseif margin > 15 then
-					self:AddLine("Estimated Profit: " .. ProspectMe.FormatPrice(profit) .. "\nMargin:  |cffffff00" .. string.format("[%.1f%%]", margin))
-				elseif margin > 0 then
-					self:AddLine("Estimated Profit: " .. ProspectMe.FormatPrice(profit) .. "\nMargin:  |cffff0000" .. string.format("[%.1f%%]", margin))
+				self:AddDoubleLine("Estimated Profit:  " .. ProspectMe.FormatPrice(profit), "Cost to " .. spelltext .. ":  " .. ProspectMe.FormatPrice(ctp),1,1,1,1,1,1)
+				if margin < 30 then
+					color = "|cffffff00"
+				elseif margin < 15 then
+					color = "|cffff0000"
 				else
-					self:AddLine("No profit to be made",1,0,0)
+					color = "|cff00ff00"
 				end
+				self:AddDoubleLine("Margin:  " .. color .. string.format("[%.1f%%]", margin),  "Average Return:  " .. ProspectMe.FormatPrice(lifetimeReturn),1,1,1,1,1,1)
 				self:AddLine(" ")
+				
+				-- Results Text Block
 				local t
 				if IsAltKeyDown() == ProspectMe.Config.PerSession then
 					t = ProspectMe.Results
-					self:AddDoubleLine("Lifetime Results","Hold/Release Alt to toggle",0.5,0.5,1,0.5,0.5,0.5)
+					self:AddDoubleLine("Lifetime Results","Hold Alt to display",1,0.82,0,0.5,0.5,0.5)
 				else
 					t = ProspectMe.Session
-					self:AddDoubleLine("Session Results","Hold/Release Alt to toggle",0.5,0.5,1,0.5,0.5,0.5)
+					self:AddDoubleLine("Session Results","Hold Alt to display",1,0.82,0,0.5,0.5,0.5)
 				end
 				if t[item] then
 					for q = 7, 0, -1 do
@@ -145,7 +154,7 @@
 									p = ""
 								end
 								if ProspectMe.Config.ShowNumber then
-									n = "[" .. num .. "]"
+									n = "|cffffffffx" .. num
 								else
 									n = ""
 								end