comparison Turok/Modules/Timer/Presets.lua @ 9:9400a0ff8540

Ugh Timer: - container update directionality - talent update iterates over a non-volatile table to carry out updates - index management steps organized - talentRow status implemented, returns the spell associated with the talent chosen from that row CombatLog: - sort out font controls and unbork arguments
author Nenue
date Sun, 21 Feb 2016 13:08:30 -0500
parents a9b8b0866ece
children 0b1a2f3dbfc4
comparison
equal deleted inserted replaced
8:7790dff0fe13 9:9400a0ff8540
1 local ADDON, Tk = ... 1 local ADDON, Tk = ...
2 local T = Tk.Addon 2 local T = Tk.Addon
3 local mod, tinsert, ipairs, pairs = T.modules.TimerControl, tinsert, ipairs, pairs 3 local mod, tinsert, ipairs, pairs = T.modules.TimerControl, tinsert, ipairs, pairs
4 local print = function(...) print('TimerPresets', ...) end 4 local print = function(...)
5 5 if not DEBUG then return end
6 if _G.Devian and _G.DevianDB.workspace ~= 1 then
7 _G.print('TimerPresets', ...)
8 end
9 end
6 10
7 11
8 --- Timer config presets 12 --- Timer config presets
9 mod.AddTimer = function(batch, container) 13 mod.AddTimer = function(batch, container)
10 if container then 14 if container then
40 childAnchor = 'TOPLEFT', 44 childAnchor = 'TOPLEFT',
41 childAnchorTo = 'TOPLEFT', 45 childAnchorTo = 'TOPLEFT',
42 }, 46 },
43 ["DoTs"] = { 47 ["DoTs"] = {
44 anchor ='BOTTOM', anchorTo='TOP', 48 anchor ='BOTTOM', anchorTo='TOP',
45 parent='TekplayerCastBar', 49 parent='TkPowerBar',
46 display = 'icon', 50 display = 'icon',
47 size = 48, 51 size = 48,
48 height = 48, width = 48, 52 height = 48, width = 48,
49 x = 0, y = 16, 53 x = 0, y = 16,
50 padding = 0, 54 padding = 0,
199 203
200 sound_active = [[Interface\Addons\Turok\Media\sound\FLASH.mp3]], 204 sound_active = [[Interface\Addons\Turok\Media\sound\FLASH.mp3]],
201 205
202 absolute = true, x = 0, y = -10, width = 300, height = 10, 206 absolute = true, x = 0, y = -10, width = 300, height = 10,
203 anchor = 'BOTTOMLEFT', anchorTo = 'BOTTOMLEFT', 207 anchor = 'BOTTOMLEFT', anchorTo = 'BOTTOMLEFT',
204 parent = 'TekplayerCastBar', padding = 0, spacing = 0, 208 parent = 'TkPowerBar', padding = 0, spacing = 0,
205 209
206 foreground_inset = 0, foreground_color = {1,1,1,1}, foreground_blend = 'ADD', 210 foreground_inset = 0, foreground_color = {1,1,1,1}, foreground_blend = 'ADD',
207 background_color = {0,0,0,0}, 211 background_color = {0,0,0,0},
208 icon = false, 212 icon = false,
209 }, 213 },
222 mod.AddTimer({ 226 mod.AddTimer({
223 ---- Icon templates 227 ---- Icon templates
224 { virtual = true, name = "Hunter", 228 { virtual = true, name = "Hunter",
225 playerClass = 'HUNTER', unit = 'player', container = 'default', display= 'icon', }, 229 playerClass = 'HUNTER', unit = 'player', container = 'default', display= 'icon', },
226 { virtual = true, name = "HunterSticky", inherits = "Hunter", 230 { virtual = true, name = "HunterSticky", inherits = "Hunter",
227 showAura = true, persist = true, }, 231 overrideAura = true, persist = true, },
228 { virtual = true, name = "HunterBar", 232 { virtual = true, name = "HunterBar",
229 playerClass = 'HUNTER', unit = 'player', }, 233 playerClass = 'HUNTER', unit = 'player', },
230 ---- Talents 234 ---- Talents
231 { 235 {
232 inherits= "HunterSticky", 236 inherits= "HunterSticky",
235 trace = true}, 239 trace = true},
236 { 240 {
237 inherits= "HunterSticky", 241 inherits= "HunterSticky",
238 name = "Animal Power", type = 'cooldown', 242 name = "Animal Power", type = 'cooldown',
239 talentRow = 5, 243 talentRow = 5,
240 trace = true}, 244 trace = true,
245 args = {
246 talentRow = {
247 default = {overrideDuration = nil},
248 [1] = {overrideDuration = 15},
249 [3] = {overrideDuration = 40},
250 },
251 },
252 },
241 --- Spells 253 --- Spells
242 { 254 {
243 inherits = 'Hunter', name = "Camouflage", 255 inherits = 'Hunter', name = "Camouflage",
244 type = 'cooldown', display = 'icon', 256 type = 'cooldown', display = 'icon',
245 spellID = 51753, }, 257 spellID = 51753, },
277 spellID = 53209, specPage = 2, persist = true, 289 spellID = 53209, specPage = 2, persist = true,
278 290
279 hideIcon = true, 291 hideIcon = true,
280 leftText = "", rightText = "%p", 292 leftText = "", rightText = "%p",
281 width = 300, height = 8,padding = 0, spacing = 0, 293 width = 300, height = 8,padding = 0, spacing = 0,
282 absolute = true, x = 0, y = 0, anchor = 'TOPLEFT', anchorTo = 'TOPLEFT', parent = 'TekplayerCastBar', strata='MEDIUM', 294 absolute = true, x = 0, y = 0, anchor = 'TOPLEFT', anchorTo = 'TOPLEFT', parent = 'TkPowerBar', strata='MEDIUM',
283 foreground_color = {1,.125,0.43,1}, foreground_blend = 'ADD', foreground_inset = 0, 295 foreground_color = {1,.125,0.43,1}, foreground_blend = 'ADD', foreground_inset = 0,
284 background_color = {.5,.5,.5,0}, background_blend = 'BLEND', 296 background_color = {.5,.5,.5,0}, background_blend = 'BLEND',
285 }, 297 },
286 { 298 {
287 inherits = 'HunterBar', name = "Sniper Training (duration)", 299 inherits = 'HunterBar', name = "Sniper Training (duration)",
289 spellID = 168811, specPage = 2, 301 spellID = 168811, specPage = 2,
290 302
291 hideIcon = true, 303 hideIcon = true,
292 leftText = "", rightText= "", 304 leftText = "", rightText= "",
293 width= 330, height = 12, padding = 0, 305 width= 330, height = 12, padding = 0,
294 absolute = true, x = 0, y = 0, anchor = 'BOTTOMLEFT', anchorTo = 'BOTTOMLEFT', parent = 'TekplayerCastBar', level = 1, 306 absolute = true, x = 0, y = 0, anchor = 'BOTTOMLEFT', anchorTo = 'BOTTOMLEFT', parent = 'TkPowerBar', level = 1,
295 foreground_color = {1,0,0,1}, foreground_blend = 'BLEND', 307 foreground_color = {1,0,0,1}, foreground_blend = 'BLEND',
296 sound_active = '', sound_hidden = '', sound_passive = '', 308 sound_active = '', sound_hidden = '', sound_passive = '',
297 }, 309 },
298 { 310 {
299 inherits = 'HunterBar', name = "Sniper Training: Recently Moved", 311 inherits = 'HunterBar', name = "Sniper Training: Recently Moved",
301 spellID = 168809, specPage = 2, 313 spellID = 168809, specPage = 2,
302 314
303 hideIcon = true, 315 hideIcon = true,
304 leftText = "", rightText= "", 316 leftText = "", rightText= "",
305 height = 12, width= 160, padding = 0, 317 height = 12, width= 160, padding = 0,
306 absolute = true, x = 0, y = 0, anchor = 'BOTTOMLEFT', anchorTo = 'BOTTOMLEFT', parent = 'TekplayerCastBar', level = 2, 318 absolute = true, x = 0, y = 0, anchor = 'BOTTOMLEFT', anchorTo = 'BOTTOMLEFT', parent = 'TkPowerBar', level = 2,
307 foreground_color = {1,1,0,1}, foreground_blend = 'BLEND', 319 foreground_color = {1,1,0,1}, foreground_blend = 'BLEND',
308 sound_active = '', sound_hidden = '', sound_passive = '', 320 sound_active = '', sound_hidden = '', sound_passive = '',
309 }, 321 },
310 322
311 --- Static Warnings 323 --- Static Warnings
363 name = "Mental Fatigue", 375 name = "Mental Fatigue",
364 type = 'aura', display = 'icon', 376 type = 'aura', display = 'icon',
365 unit = 'target', filters = 'PLAYER|HARMFUL', 377 unit = 'target', filters = 'PLAYER|HARMFUL',
366 spellID = 184915, playerClass = 'PRIEST', specPage = 3, 378 spellID = 184915, playerClass = 'PRIEST', specPage = 3,
367 379
368 parent = 'TekplayerCastBar', 380 parent = 'TkPowerBar',
369 container = 'DoTs', 381 container = 'DoTs',
370 order = 1, 382 order = 1,
371 sound_active = '', 383 sound_active = '',
372 }, 384 },
373 { 385 {