changeset 31:c11461d5095c Prospect Me 2

Basic File and config prep for Prospect Me 2
author Vynn <mischivin@gmail.com>
date Tue, 08 Nov 2016 02:32:41 -0500
parents 7202674c6f51
children fc13da07d8e4
files ProspectMe.lua
diffstat 1 files changed, 29 insertions(+), 23 deletions(-) [+]
line wrap: on
line diff
--- a/ProspectMe.lua	Tue Nov 08 02:31:41 2016 -0500
+++ b/ProspectMe.lua	Tue Nov 08 02:32:41 2016 -0500
@@ -1,3 +1,32 @@
+--Check for Saved Variables, if they don't exist, set defaults.
+if not ProspectMe then
+	ProspectMe = {
+		Config = {
+				ShowQualities = {
+					junk = false
+					common = false,
+					uncommon = true,
+					rare = true,
+					epic = true,
+				}
+				PerSession = false
+				ShowPercent = true
+				ShowNumber = true
+		}
+	
+	}
+end
+
+function ProspectMe:Debug(object) {
+	Dump(self)
+	if object then
+		Dump(object)
+	end
+}
+
+
+
+
 local PROSPECT_ID = 31252
 local MILLING_ID = 51005
 local MASS_PROSPECT_FELSLATE_ID = 225902
@@ -29,29 +58,6 @@
 	PM_ItemTable[id].price = PM_GetItemValue(id)
 end
 
-function PM_GemCleanup()
-	local cleanupIDs = { "129099", "130200", "130201", "130202", "130203", "130204" }
-	if not PM_ItemTable["129100"] then
-		CreateTableEntry("129100")
-	end
-	for i, r in pairs(PM_ResultsTable) do
-		for k, v in pairs(cleanupIDs) do 
-			if PM_ResultsTable[i][v] then 
-				if not PM_ResultsTable[i]["129100"] then
-					PM_ResultsTable[i]["129100"] = 0
-				end
-				PM_ResultsTable[i]["129100"] = PM_ResultsTable[i]["129100"] + PM_ResultsTable[i][v]
-				PM_ResultsTable[i][v] = nil
-			end
-		end
-	end
-	for k, v in pairs(cleanupIDs) do
-		if PM_ItemTable[v] then
-			PM_ItemTable[v] = nil
-		end
-	end
-end
-
 local function PM_Init()
 	if not PM_ResultsTable then
 		PM_ResultsTable = {}