# HG changeset patch # User Vynn # Date 1478590361 18000 # Node ID c11461d5095c6f78a476674bd3c779a022bbfca0 # Parent 7202674c6f51dd8d3025cc1c719a3659ab180df2 Basic File and config prep for Prospect Me 2 diff -r 7202674c6f51 -r c11461d5095c ProspectMe.lua --- 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 = {}