diff core.lua @ 8:5a0fa30712da

RecipeProfit options added to GatherMate interface
author Aaron Bregger
date Thu, 12 Aug 2010 15:39:27 -0500
parents 6d25e5522e0f
children 20e2aefac1b0
line wrap: on
line diff
--- a/core.lua	Thu Aug 12 11:58:58 2010 -0500
+++ b/core.lua	Thu Aug 12 15:39:27 2010 -0500
@@ -60,6 +60,7 @@
         end
     end
 end
+
 local defaultProfile = {
     ["show"] = {
         ["RecipeProfit"] = "always",
@@ -69,7 +70,7 @@
         ["Mining"] = "never",
         ["Treasure"] = "never",
     },
-    ["trackShow"] = "never",
+    ["trackShow"] = "active",
 }
 
 local options = {
@@ -159,7 +160,7 @@
     
     GatherMate:GetModule("Config"):RegisterModule("RecipeProfit", options)
     GatherMate:RegisterDBType("RecipeProfit", db.storage)
-    GatherMate.db.profile.show["RecipeProfit"] = "always"
+    GatherMate.db.profile.show["RecipeProfit"] = GatherMate.db.profile.show["RecipeProfit"] or "always"
     GatherMate.nodeIDs["RecipeProfit"] = {}
     GatherMate.nodeTextures["RecipeProfit"] = {}
     GatherMate.nodeMinHarvest["RecipeProfit"] = {}
@@ -178,8 +179,29 @@
     end
     
     GatherMate.reverseNodeIDs["RecipeProfit"] = GatherMate:CreateReversedTable(nodes)
+    
+    GatherMate:GetModule("Config").options.args.display.args.general.args.showGroup.args["showRecipeProfit"] = {
+        order = 6,
+        name = "Show RecipeProfit nodes.",
+        desc = "Toggle showing nodes added by RecipeProfit.",
+        type = "select",
+        values = {
+            ["always"] = "Always show",
+            ["never"]  = "Never show",
+        },
+        arg = "RecipeProfit",
+    }
+    
+    GatherMate:GetModule("Config").options.args.display.args.general.args.iconGroup.args.tracking.args["showRecipeProfit"] = {
+        order = 6.5,
+        name = "RecipeProfit",
+        desc = "Color of the tracking circle.",
+        type = "color",
+        hasAlpha = true,
+        arg = "RecipeProfit",		
+    }
+    
     GatherMate:GetModule("Config"):UpdateConfig()
-    
     GatherMate:GetModule("Config"):SendMessage("GatherMateConfigChanged")
 end