Quantcast

- TitanClassicAmmo: Debugging.

HonorGoG [08-09-19 - 05:03]
- TitanClassicAmmo: Debugging.
Filename
TitanClassicAmmo/TitanClassicAmmo.lua
diff --git a/TitanClassicAmmo/TitanClassicAmmo.lua b/TitanClassicAmmo/TitanClassicAmmo.lua
index 9f71e3a..a04d58d 100644
--- a/TitanClassicAmmo/TitanClassicAmmo.lua
+++ b/TitanClassicAmmo/TitanClassicAmmo.lua
@@ -6,10 +6,12 @@
 -- **************************************************************************

 -- ******************************** Constants *******************************
+local _G = getfenv(0);
 local TITAN_AMMO_ID = "Ammo";
 local TITAN_AMMO_THRESHOLD_TABLE = {
-     Values = { 150, 400 },
+     Values = { 500, 300, 150 },
      Colors = { RED_FONT_COLOR, NORMAL_FONT_COLOR, GREEN_FONT_COLOR },
+	 Colors = { HIGHLIGHT_FONT_COLOR, NORMAL_FONT_COLOR, ORANGE_FONT_COLOR, RED_FONT_COLOR },
 }

 -- ******************************** Variables *******************************
@@ -140,6 +142,8 @@ TitanDebug("TitanPanelAmmoButton_UNIT_INVENTORY_CHANGED")
  if arg1 == "player" then
  	TitanPanelAmmoUpdateDisplay();
  	if isAmmo then
+	TitanDebug("ammoSlotID: " .. ammoSlotID);
+	TitanDebug("GetInventoryItemLink: " .. GetInventoryItemLink("player", ammoSlotID));
   		if GetInventoryItemLink("player", ammoSlotID) then
 				count = GetInventoryItemCount("player", ammoSlotID) or count
 				AmmoName = GetItemInfo(GetInventoryItemLink("player", ammoSlotID)) or _G["UNKNOWN"]
@@ -296,7 +300,7 @@ function TitanPanelRightClickMenu_PrepareAmmoMenu()
      TitanPanelButton_UpdateButton(TITAN_AMMO_ID);
      end
      info.checked = TitanUtils_Ternary(TitanGetVar(TITAN_AMMO_ID, "ShowAmmoName"), 1, nil);
-     UIDropDownMenu_AddButton(info);
+     L_UIDropDownMenu_AddButton(info);


      TitanPanelRightClickMenu_AddSpacer();