Mercurial > wow > turok
comparison Turok/readme.txt @ 6:a9b8b0866ece
clear out log jam
author | Nenue |
---|---|
date | Sun, 21 Feb 2016 08:32:53 -0500 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
5:8a9a6637f082 | 6:a9b8b0866ece |
---|---|
1 Turok: Dinosaur HUD | |
2 | |
3 Hardcode of various WeakAura configurations. This is created as a personal learning challenge, so it may or may not be faster than the actual jumble of WeakAuras because that addon is written very well. | |
4 | |
5 Project Goals: | |
6 | |
7 - Focus bar with dynamic coloring and prediction lines based on talent effects | |
8 - Unit cast bars that are thematically linked with everything else | |
9 - Dynamically arranged tracking icons and sliders cooldown/aura information | |
10 - Quality-of-life alerts for Lone Wolf and Aspect of the Pack | |
11 | |
12 Coding Conventions: | |
13 | |
14 Although AceAddon modules are used, the addon is not truly modular. | |
15 The structure provides simple control over the internal loading sequence. | |
16 So if needed, "module" enables can be scattered over several post-load frames to make in-combat /reload less hazardous. | |
17 | |
18 SavedVars data is arranged in a non-propagating hierarchical metatable. | |
19 Accessing a deeply-nested member will traverse its parents until one of them contains data. | |
20 The only exception to this is on lazy read expressions, such as: | |
21 | |
22 > if (childtable.unsetvar) then | |
23 | |
24 This will always yield a false, whether or not a value is assigned in its parents. | |
25 To check for hierarchical flag variables, you can compare the index against nil, like so: | |
26 | |
27 > if (childtable.unsetvar ~= nil) then | |
28 | |
29 The operation will trigger __index and a value from the hierarchy will be presented. | |
30 Any positive flag state will be copied down when direct assignment is used. | |
31 To get a useful flag state, you need to run the first logical expression within a ternary idiom: | |
32 | |
33 > childflag = (childtable.unsetvar) and true or nil -- pulls the true flag value | |
34 > parentflag = childtable.unsetvar -- pulls any non-nil value | |
35 | |
36 Another thing to note is hierarchical values are not assigned downstream. | |
37 If an empty child value is indexed, it will always traverse up the tree. | |
38 As a result, values consulted frequently will be computationally taxing. | |
39 These should be copied into a local variable and read from that instead. | |
40 Then, when an event that might change the value is detected, the local variable is updated instead. | |
41 From a performance standpoint, the effects are net-positive, since assignments potentially cover dozens of keys. | |
42 The memory footprint also isn't much different, while the assignment operations are carried out in spaced intervals. |