forked from rockingdice/AutoCategory
-
Notifications
You must be signed in to change notification settings - Fork 6
/
DataDict.txt
57 lines (45 loc) · 2.67 KB
/
DataDict.txt
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
AutoCategory structures and objects
AutoCategory = {} -- includes general, accountwide, appearance, bags, rules, collapses, version, meta, acctRules, acctSaved, charSaved
-- not saved in SV - combo of all sets of rules, user and predef and plugin predef
AC.rules = {} -- [#] rule {rkey, name, tag, description, rule, pred, damaged, err}
AutoCategory.compiledRules -- [name] compiledFunction
--saved in SV
AutoCategory.saved = {
--rules = {}, -- [#] rule {rkey, name, tag, description, rule, damaged, err, pred} -- OBSOLETE
bags = {} -- [bagId#] isUngroupedHidden, rules{[#] {bagRule}}
}
-- saved in SV
AC.acctRules = {}, -- [#] rule {rkey, name, tag, description, rule, damaged, err}
AutoCategory.cache = {
rulesByName = {}, -- [name] rule# (index from AC.rules)
rulesByTag_cvt = {}, -- [tag] {choices{rule.name}, choicesTooltips{rule.desc/name}}
compiledRules = AC.compiledRules, -- [name] function
tags = {}, -- [#] tagname
bags_cvt = CVT:New(nil, nil, CVT.USE_VALUES + CVT.USE_TOOLTIPS), -- {choices{bagname}, choicesValues{bagid}, choicesTooltips{bagname}} -- for the bags themselves
entriesByBag = {}, -- [bagId] {choices{ico rule.name (pri)}, choicesValues{rule.name}, choicesTooltips{rule.desc/name or missing}} --
entriesByName = {}, -- [bagId][rulename] {priority, isHidden}
collapses = {}, -- [bagId][categoryName] true
}
AutoCategory.BagRuleEntry = {name, priority, isHidden} -- bagRule
BagRule = { name, priority, isHidden }
-- consolidation of tables relating to the master rules
AutoCategory.RulesW = {
-- tables
ruleList, -- [#] rule {rkey, name, tag, description, rule, pred, damaged, err}
ruleNames, -- [name] rule# (index from ruleList)
compiled, -- [name] function
tags, -- [#] tagname
tagGroups, -- [tag] {choices{rule.name}, choicesTooltips{rule.desc/name}}
-- methods
function addTag(tagname)
}
AutoCategory.CVT = {controlName, choices{}, choicesValues{}, choicesTooltips{}, indexValue, dirty}
AC.rulefuncs -- metatable for rules with functions to manipulate them
AC_UI members:
AddCat_SelectTag_LAM - BaseDD - { choices = cache.tags }
AddCat_SelectRule_LAM - BaseDD - {choices{rule.name}, choicesTooltips{rule.desc/name}}
BagSet_SelectBag_LAM - BaseDD - (bags_cvt) {choices{bagname}, choicesValues{bagid}, choicesTooltips{bagname}}
BagSet_SelectRule_LAM - BaseDD - {choices{ico rule.name (pri)}, choicesValues{rule.name}, choicesTooltips{rule.desc/name or missing}}
CatSet_SelectRule_LAM - BaseDD - { choices, choicesTooltips }
CatSet_SelectTag_LAM - BaseDD - { choices = cache.tags }
ImpExp_ImportBag_LAM - BaseDD - (bags_cvt) {choices{bagname}, choicesValues{bagid}, choicesTooltips{bagname}}