-
Notifications
You must be signed in to change notification settings - Fork 4
/
settings.lua
229 lines (199 loc) · 6.77 KB
/
settings.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
-- user config
local _, addonData = ...
local L = LibStub("AceLocale-3.0"):GetLocale("SteaSummon")
-- defaults
local summonWords = {}
summonWords[1] = "123"
summonWords[2] = "123 please"
summonWords[3] = "123 plz"
summonWords[4] = "summon"
summonWords[5] = "summon please"
summonWords[6] = "summon plz"
summonWords[7] = "summon me"
summonWords[8] = "summon me please"
summonWords[9] = "summon me plz"
summonWords[10] ="are summons available?"
summonWords[11] ="are summons available"
summonWords[12] ="are summons avail?"
summonWords[13] ="are summons avail"
summonWords[14] ="are summons ready?"
summonWords[15] ="are summons ready"
summonWords[16] ="summons available?"
summonWords[17] ="summons available"
summonWords[18] ="summons avail?"
summonWords[19] ="summons avail"
summonWords[20] ="summons ready?"
summonWords[21] ="summons ready"
summonWords[22] ="123 summons"
summonWords[23] ="123 summon"
settings = {
init = function(self)
addonData.debug:registerCategory("settings")
if SteaSummonSave == nil or SteaSummonSave.prioplayers == nil then
self:reset()
end
-- init settings that have been added since release
if SteaSummonSave.shitlist == nil then
SteaSummonSave.shitlist = {}
end
if SteaSummonSave.windowSize == nil then
SteaSummonSave.windowSize = 1
end
if SteaSummonSave.listSize == nil then
SteaSummonSave.listSize = 1.5
end
if SteaSummonSave.waiting == nil then
db("wait list empty on load")
SteaSummonSave.waiting = {}
SteaSummonSave.timeStamp = 0
SteaSummonSave.waitingKeepTime = 5
end
if SteaSummonSave.buffs == nil then
SteaSummonSave.buffs = true
end
if SteaSummonSave.windowPos == nil or (type(SteaSummonSave.windowPos[2]) == "table" or not SteaSummonSave.windowPos["height"]) then
SteaSummonSave.windowPos = {"CENTER", nil, "CENTER", 0, 0, ["height"] = 300, ["width"] = 250}
end
if SteaSummonSave.maxLocks == nil then
SteaSummonSave.maxLocks = 2
end
if SteaSummonSave.raidinfo == nil then
SteaSummonSave.raidinfo = L["raidinfo"]
SteaSummonSave.clickersnag = L["clickersnag"]
SteaSummonSave.clicknag = L["clicknag"]
SteaSummonSave.clickersnagtimer = 5
SteaSummonSave.raidinfotimer = 5
SteaSummonSave.clicknagtimer = 10
end
if SteaSummonSave.altbuffed == nil then
SteaSummonSave.altbuffed = false
SteaSummonSave.qspot = 2
SteaSummonSave.initialQspot = 6
SteaSummonSave.alttoons = {}
SteaSummonSave.qboost = 2
SteaSummonSave.altWhisper = L["You are in the summon queue. Whisper me an alt name if you don't want to wait online."]
SteaSummonSave.altGetOnlineWhisper = L["You are near the top of the summon queue. Get online now."]
end
if SteaSummonSave.warlocksAssist == nil then
SteaSummonSave.warlocksAssist = true
SteaSummonSave.finalLeadership = true
SteaSummonSave.assistPlayers = {"Stea", "Stec"}
SteaSummonSave.raidLeaders = {"Stea", "Stec"}
SteaSummonSave.masterLoot = {"Stea", "Ninja"}
SteaSummonSave.autoInviteTriggers = {"inv", "invite"}
SteaSummonSave.autoInvite = 1
SteaSummonSave.autoAccept = 1
SteaSummonSave.delayLeadership = true
SteaSummonSave.convertToRaid = false
end
end,
reset = function()
SteaSummonSave = {}
SteaSummonSave.summonWords = summonWords
if addonData.util:playerIsWarlock() then
SteaSummonSave.show = 2
else
SteaSummonSave.show = 3
end
SteaSummonSave.updates = true
SteaSummonSave.prioplayers = {[1]="Stea"}
SteaSummonSave.shitlist = {}
SteaSummonSave.warlocks = true
SteaSummonSave.raidchat = L["Summoning %p"]
SteaSummonSave.whisperchat = L["Summoning you to %l in %z"]
SteaSummonSave.saychat = L["Summoning %p, please click the portal"]
SteaSummonSave.experimental = false
SteaSummonSave.windowSize = 1
SteaSummonSave.listSize = 1.5
SteaSummonSave.waiting = {}
SteaSummonSave.timeStamp = 0
SteaSummonSave.waitingKeepTime = 5
SteaSummonSave.buffs = true
SteaSummonSave.windowPos = {"CENTER", nil, "CENTER", 0, 0, ["height"] = 300, ["width"] = 250}
SteaSummonSave.maxLocks = 2
SteaSummonSave.raidinfo = L["raidinfo"]
SteaSummonSave.clickersnag = L["clickersnag"]
SteaSummonSave.clicknag = L["clicknag"]
SteaSummonSave.clickersnagtimer = 1
SteaSummonSave.raidinfotimer = 2
SteaSummonSave.clicknagtimer = 10
SteaSummonSave.altbuffed = false
SteaSummonSave.qspot = 2
SteaSummonSave.initialQspot = 6
SteaSummonSave.alttoons = {}
SteaSummonSave.qboost = 4
SteaSummonSave.altWhisper = L["You are in the summon queue. Whisper me an alt name if you don't want to wait online."]
SteaSummonSave.altGetOnlineWhisper = L["You are near the top of the summon queue. Get online now."]
SteaSummonSave.warlocksAssist = true
SteaSummonSave.finalLeadership = true
SteaSummonSave.assistPlayers = {"Stea", "Stec"}
SteaSummonSave.raidLeaders = {"Stea", "Stec"}
SteaSummonSave.masterLoot = {"Stea", "Ninja"}
SteaSummonSave.autoInviteTriggers = {"inv", "invite"}
SteaSummonSave.autoInvite = 1
SteaSummonSave.autoAccept = 1
SteaSummonSave.delayLeadership = true
SteaSummonSave.convertToRaid = false
end,
saveOnLogout = function(self, event, ...)
--- timestamp and the list
addonData.gossip:retire() -- while we can recover on /reload, if we don't retire as leader events might be missed
SteaSummonSave.timeStamp = GetTime()
SteaSummonSave.waiting = addonData.summon.waiting -- can get displaced if list is unmarshalled
end,
findSummonWord = function(_, phrase)
for k,v in pairs(SteaSummonSave.summonWords) do
if v == phrase then
return k
end
end
return nil
end,
findPrioPlayer = function(_, player)
for k,v in pairs(SteaSummonSave.prioplayers) do
if v == player then
return k
end
end
return nil
end,
findShitlistPlayer = function(_, player)
for k,v in pairs(SteaSummonSave.shitlist) do
if v == player then
return k
end
end
return nil
end,
debug = function(bug)
if bug ~= nil then
SteaSummonSave.debug = bug
end
return SteaSummonSave.debug
end,
showWindow = function()
return SteaSummonSave.show == 1
end,
showActive = function()
return SteaSummonSave.show == 2
end,
showJustMe = function()
return SteaSummonSave.show == 3
end,
showNever = function()
return SteaSummonSave.show == 4
end,
useUpdates = function()
return SteaSummonSave.updates
end,
getSettings = function()
return SteaSummonSave
end,
getWindowPos = function()
return SteaSummonSave.windowPos
end,
setWindowPos = function(_, pos)
SteaSummonSave.windowPos = pos
end,
}
addonData.settings = settings