From 14c4a6d6d7925d49860aec10deff71e5ac5a926b Mon Sep 17 00:00:00 2001 From: Road-block Date: Wed, 8 Nov 2017 18:26:56 +0200 Subject: [PATCH] Cleanup: Remove some unintended globals. Add saved variables and module names to exclusions from globals detection script. --- bids.lua | 5 ++++- logs.lua | 5 ++++- loot.lua | 5 ++++- migrations.lua | 5 ++++- prices.lua | 7 +++++-- reserves.lua | 5 ++++- shootyepgp.lua | 7 +++++-- shootyepgp.toc | 2 +- standings.lua | 2 ++ 9 files changed, 33 insertions(+), 10 deletions(-) diff --git a/bids.lua b/bids.lua index 47561d6..484ff88 100644 --- a/bids.lua +++ b/bids.lua @@ -204,4 +204,7 @@ function sepgp_bids:OnTooltipUpdate() "func", "announceWinnerOS", "arg1", self, "arg2", name, "arg3", pr ) end -end \ No newline at end of file +end + +-- GLOBALS: sepgp_saychannel,sepgp_groupbyclass,sepgp_raidonly,sepgp_decay,sepgp_reservechannel,sepgp_main,sepgp_progress,sepgp_discount,sepgp_log,sepgp_dbver,sepgp_looted +-- GLOBALS: sepgp,sepgp_prices,sepgp_standings,sepgp_bids,sepgp_loot,sepgp_reserves,sepgp_logs \ No newline at end of file diff --git a/logs.lua b/logs.lua index fe77856..b109ddc 100644 --- a/logs.lua +++ b/logs.lua @@ -107,4 +107,7 @@ function sepgp_logs:OnTooltipUpdate() "text2", line ) end -end \ No newline at end of file +end + +-- GLOBALS: sepgp_saychannel,sepgp_groupbyclass,sepgp_raidonly,sepgp_decay,sepgp_reservechannel,sepgp_main,sepgp_progress,sepgp_discount,sepgp_log,sepgp_dbver,sepgp_looted +-- GLOBALS: sepgp,sepgp_prices,sepgp_standings,sepgp_bids,sepgp_loot,sepgp_reserves,sepgp_logs \ No newline at end of file diff --git a/loot.lua b/loot.lua index ddc84d1..5715a12 100644 --- a/loot.lua +++ b/loot.lua @@ -107,4 +107,7 @@ function sepgp_loot:OnTooltipUpdate() -- "func", "OnClickItem", "arg1", self, "arg2", t[i] ) end -end \ No newline at end of file +end + +-- GLOBALS: sepgp_saychannel,sepgp_groupbyclass,sepgp_raidonly,sepgp_decay,sepgp_reservechannel,sepgp_main,sepgp_progress,sepgp_discount,sepgp_log,sepgp_dbver,sepgp_looted +-- GLOBALS: sepgp,sepgp_prices,sepgp_standings,sepgp_bids,sepgp_loot,sepgp_reserves,sepgp_logs \ No newline at end of file diff --git a/migrations.lua b/migrations.lua index ba0beb0..c44ed70 100644 --- a/migrations.lua +++ b/migrations.lua @@ -16,4 +16,7 @@ function sepgp:v2tov3() end self:defaultPrint(string.format("Updated %d members to v3 storage.",count)) sepgp_dbver = 3 -end \ No newline at end of file +end + +-- GLOBALS: sepgp_saychannel,sepgp_groupbyclass,sepgp_raidonly,sepgp_decay,sepgp_reservechannel,sepgp_main,sepgp_progress,sepgp_discount,sepgp_log,sepgp_dbver,sepgp_looted +-- GLOBALS: sepgp,sepgp_prices,sepgp_standings,sepgp_bids,sepgp_loot,sepgp_reserves,sepgp_logs \ No newline at end of file diff --git a/prices.lua b/prices.lua index ff197f6..7584ea3 100644 --- a/prices.lua +++ b/prices.lua @@ -784,7 +784,7 @@ sepgp_prices = sepgp:NewModule("sepgp_prices", "AceDB-2.0") function sepgp_prices:GetPrice(item,progress) if not progress then progress = "T3" end - local itemID,found,_,itemString,data,tier + local itemID,found,_,itemString,data,tier,is,il local price if (type(item)=="number") then itemID = tonumber(item) @@ -810,4 +810,7 @@ function sepgp_prices:GetPrice(item,progress) end end return price -end \ No newline at end of file +end + +-- GLOBALS: sepgp_saychannel,sepgp_groupbyclass,sepgp_raidonly,sepgp_decay,sepgp_reservechannel,sepgp_main,sepgp_progress,sepgp_discount,sepgp_log,sepgp_dbver,sepgp_looted +-- GLOBALS: sepgp,sepgp_prices,sepgp_standings,sepgp_bids,sepgp_loot,sepgp_reserves,sepgp_logs \ No newline at end of file diff --git a/reserves.lua b/reserves.lua index 8ebb2a9..0253340 100644 --- a/reserves.lua +++ b/reserves.lua @@ -106,4 +106,7 @@ function sepgp_reserves:OnTooltipUpdate() "func", "OnClickItem", "arg1", self, "arg2", alt or name ) end -end \ No newline at end of file +end + +-- GLOBALS: sepgp_saychannel,sepgp_groupbyclass,sepgp_raidonly,sepgp_decay,sepgp_reservechannel,sepgp_main,sepgp_progress,sepgp_discount,sepgp_log,sepgp_dbver,sepgp_looted +-- GLOBALS: sepgp,sepgp_prices,sepgp_standings,sepgp_bids,sepgp_loot,sepgp_reserves,sepgp_logs \ No newline at end of file diff --git a/shootyepgp.lua b/shootyepgp.lua index c02f00e..29ac7d2 100644 --- a/shootyepgp.lua +++ b/shootyepgp.lua @@ -28,7 +28,7 @@ local shooty_reservecall = string.format("{shootyepgp}Type \"+\" if on main, or local shooty_reserveanswer = "^(%+)(%a*)$" local out = "|cff9664c8shootyepgp:|r %s" local lastUpdate = 0 -local needInit = true +local needInit,needRefresh = true local admin,sanitizeNote local shooty_debugchat local running_check,running_bid @@ -1864,10 +1864,13 @@ function sepgp:EasyMenu(menuList, menuFrame, anchor, x, y, displayMode) end function sepgp:EasyMenu_Initialize(level, menuList) for index = 1, table.getn( menuList ) do - value = menuList[index] + local value = menuList[index] if (value.text) then value.index = index; UIDropDownMenu_AddButton( value, level ); end end end + +-- GLOBALS: sepgp_saychannel,sepgp_groupbyclass,sepgp_raidonly,sepgp_decay,sepgp_reservechannel,sepgp_main,sepgp_progress,sepgp_discount,sepgp_log,sepgp_dbver,sepgp_looted +-- GLOBALS: sepgp,sepgp_prices,sepgp_standings,sepgp_bids,sepgp_loot,sepgp_reserves,sepgp_logs \ No newline at end of file diff --git a/shootyepgp.toc b/shootyepgp.toc index 41c4b05..1946f72 100644 --- a/shootyepgp.toc +++ b/shootyepgp.toc @@ -5,7 +5,7 @@ ## X-Website: https://github.com/Road-block/shootyepgp/releases/latest ## X-Category: Guild ## X-Credits: shooty -## Version: 3.21 +## Version: 3.21.1 ## OptionalDeps: Ace2 ## SavedVariables: sepgp_saychannel,sepgp_groupbyclass,sepgp_raidonly,sepgp_decay,sepgp_reservechannel,sepgp_main,sepgp_progress,sepgp_discount ## SavedVariablesPerCharacter: sepgp_log, sepgp_dbver, sepgp_looted diff --git a/standings.lua b/standings.lua index c35d4b3..3608d72 100644 --- a/standings.lua +++ b/standings.lua @@ -221,3 +221,5 @@ function sepgp_standings:OnTooltipUpdate() end end +-- GLOBALS: sepgp_saychannel,sepgp_groupbyclass,sepgp_raidonly,sepgp_decay,sepgp_reservechannel,sepgp_main,sepgp_progress,sepgp_discount,sepgp_log,sepgp_dbver,sepgp_looted +-- GLOBALS: sepgp,sepgp_prices,sepgp_standings,sepgp_bids,sepgp_loot,sepgp_reserves,sepgp_logs \ No newline at end of file