Skip to content

Commit

Permalink
Added support for tracking Apexis Crystals
Browse files Browse the repository at this point in the history
  • Loading branch information
Joshua Worden committed Nov 15, 2014
1 parent e3192fc commit 7385109
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
12 changes: 12 additions & 0 deletions TitanPoints.lua
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ function TitanPanelPointsButton_OnLoad(self)
--ShowColoredText = true,
},
savedVariables = {
ShowApexis = 1,
ShowGarrison = 1,
ShowTimeless = 1,
ShowConquest = 1,
Expand Down Expand Up @@ -100,6 +101,7 @@ function TitanPanelRightClickMenu_PreparePointsMenu()

local info = {};
TitanPanelRightClickMenu_AddTitle(TitanPlugins[TITAN_POINTS_ID].menuText);
TitanPanelRightClickMenu_AddToggleVar(TITAN_POINTS_MENU_APEXIS, TITAN_POINTS_ID, "ShowApexis");
TitanPanelRightClickMenu_AddToggleVar(TITAN_POINTS_MENU_GARRISON, TITAN_POINTS_ID, "ShowGarrison");
TitanPanelRightClickMenu_AddToggleVar(TITAN_POINTS_MENU_TIMELESS, TITAN_POINTS_ID, "ShowTimeless");
TitanPanelRightClickMenu_AddToggleVar(TITAN_POINTS_MENU_CONQUEST, TITAN_POINTS_ID, "ShowConquest");
Expand Down Expand Up @@ -157,6 +159,8 @@ function TitanPanelPoints_GetLabel(CurrencyType)
if(shortLabels ~= nil) then
if(CurrencyType==TITAN_POINTS_GARRISON) and TitanGetVar(TITAN_POINTS_ID,"ShowGarrison") then
label = TITAN_POINTS_LABEL_GARRISON_SHORT;
elseif(CurrencyType==TITAN_POINTS_APEXIS) and TitanGetVar(TITAN_POINTS_ID,"ShowApexis") then
label = TITAN_POINTS_LABEL_APEXIS_SHORT;
elseif(CurrencyType==TITAN_POINTS_TIMELESS) and TitanGetVar(TITAN_POINTS_ID,"ShowTimeless") then
label = TITAN_POINTS_LABEL_TIMELESS_SHORT;
elseif(CurrencyType==TITAN_POINTS_CONQUEST) and TitanGetVar(TITAN_POINTS_ID,"ShowConquest") then
Expand All @@ -171,6 +175,8 @@ function TitanPanelPoints_GetLabel(CurrencyType)
else
if(CurrencyType==TITAN_POINTS_GARRISON) and TitanGetVar(TITAN_POINTS_ID,"ShowGarrison") then
label = TITAN_POINTS_LABEL_GARRISON;
elseif(CurrencyType==TITAN_POINTS_APEXIS) and TitanGetVar(TITAN_POINTS_ID,"ShowApexis") then
label = TITAN_POINTS_LABEL_APEXIS;
elseif(CurrencyType==TITAN_POINTS_TIMELESS) and TitanGetVar(TITAN_POINTS_ID,"ShowTimeless") then
label = TITAN_POINTS_LABEL_TIMELESS;
elseif(CurrencyType==TITAN_POINTS_CONQUEST) and TitanGetVar(TITAN_POINTS_ID,"ShowConquest") then
Expand Down Expand Up @@ -222,6 +228,12 @@ function TitanPanelPointsButton_GetButtonText(id)
buttonRichText = buttonRichText..format(TitanPanelPoints_GetLabel(TITAN_POINTS_GARRISON), TitanUtils_GetHighlightText(count));
end

-- Valor Points
if (name==TITAN_POINTS_APEXIS) and (TitanGetVar(TITAN_POINTS_ID,"ShowApexis") ~= nil) then
if(TitanGetVar(TITAN_POINTS_ID,"ShowIcons") ~= nil) then buttonRichText = buttonRichText..TitanPanelPoints_GetIcon(TITAN_POINTS_APEXIS, icon); end
buttonRichText = buttonRichText..format(TitanPanelPoints_GetLabel(TITAN_POINTS_APEXIS), TitanUtils_GetHighlightText(count));
end

-- Timeless Coins
if (name==TITAN_POINTS_TIMELESS) and (TitanGetVar(TITAN_POINTS_ID,"ShowTimeless") ~= nil) then
if(TitanGetVar(TITAN_POINTS_ID,"ShowIcons") ~= nil) then buttonRichText = buttonRichText..TitanPanelPoints_GetIcon(TITAN_POINTS_TIMELESS, icon); end
Expand Down
4 changes: 4 additions & 0 deletions localization.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,13 @@ TITAN_POINTS_MENU_LABELS = "Show Point Labels";
TITAN_POINTS_MENU_MEM = "Show Memory Usage";
TITAN_POINTS_MENU_SHORT_LABELS = "Use Short Labels";
TITAN_POINTS_MENU_TEXT = "TitanPoints";
TITAN_POINTS_MENU_APEXIS = "Apexis Crystals";
TITAN_POINTS_MENU_GARRISON = "Garrison Resources";

TITAN_POINTS_BUTTON_LABEL = "Points: ";

TITAN_POINTS_LABEL_APEXIS = "Apexis Crystals: %s ";
TITAN_POINTS_LABEL_APEXIS_SHORT = "AC: %s ";
TITAN_POINTS_LABEL_GARRISON = "Garrison Resources: %s ";
TITAN_POINTS_LABEL_GARRISON_SHORT = "GR: %s ";
TITAN_POINTS_LABEL_JUSTICE = "Justice Points: %s ";
Expand All @@ -30,6 +33,7 @@ TITAN_POINTS_LABEL_HKS = "Honor Kills: %s ";
TITAN_POINTS_LABEL_HKS_SHORT = "HKs: %s ";
TITAN_POINTS_LABEL_SPACER = " %s ";

TITAN_POINTS_APEXIS = "Apexis Crystal";
TITAN_POINTS_GARRISON = "Garrison Resources";
TITAN_POINTS_TIMELESS = "Timeless Coin";
TITAN_POINTS_CONQUEST = "Conquest Points";
Expand Down

0 comments on commit 7385109

Please sign in to comment.