vrtc / chorus (public) (License: CC0) (since 2023-08-12) (hash sha1)
World of Warcraft add-on stub. The overall goal is to create a specialized raid frame.
List of commits:
Subject Hash Author Date (UTC)
doc: add `ldoc` annotations 0f7e2cbf74fe354c1c34fc9cd63b8b53237f8682 Vladyslav Bondarenko 2024-01-28 21:58:55
fix!: load the add-on correctly b857b8764be59195f65137f2bd577289d7c76cc9 Vladyslav Bondarenko 2024-01-28 04:46:25
release: prepare release 0.7.0 ba97f4d7e7eb9ff984d88d75a740e24c0e90bb05 Vladyslav Bondarenko 2024-01-27 15:10:27
doc: add recipe to produce documentation de290d89eee64d11752024b3b7dd5eeea062414e Vladyslav Bondarenko 2024-01-27 15:03:45
build: move test files to separate directory 629a79fd7ea24f487655001cee2364ea3398628b Vladyslav Bondarenko 2024-01-26 00:59:22
build: minor patch to appease static analysis 7c3af6a2309236acd2d2de3eccfe550d296aba39 Vladyslav Bondarenko 2024-01-26 00:45:50
fix: hide cast bar when unit is absent 1d439ef7752b03dad32f5bff1a40e60db1e7d2b2 Vladyslav Bondarenko 2024-01-25 14:40:53
fix!: toggle group frames correctly when in combat d206255d8aa9c6fd1fa6cbbc591192269a2ffd47 Vladyslav Bondarenko 2024-01-24 22:36:19
feat: add unit frame borders that are color coded fb8e310e827c1cbdafa6ff2bc7760ef8fc617a16 Vladyslav Bondarenko 2024-01-24 20:23:43
fix: typo in src/ChorusUnitFrameTemplate.lua 62ccfd2a62ce4ec8d9be7658663d06c9d39f743a Vladyslav Bondarenko 2024-01-24 18:57:02
fix: single frame toggles every group frame 44d20820afb80aa381c2cfb1272123ba9a8e6156 Vladyslav Bondarenko 2024-01-24 18:47:12
build: migrate to make and adoc 1e410bff214b6a32cd13343d3b7e521afa0cf93f Vladyslav Bondarenko 2024-01-23 14:42:21
doc: note the need to backport GetSpellName 8dac49bb037de94b2980a45b91152691d9c5b98b Vladyslav Bondarenko 2024-01-23 14:24:44
feat: show remaining aura charges beedf659895a3ecdd0df97e14e63d87f534d0bbc Vladyslav Bondarenko 2024-01-23 14:24:01
fix: remove aura button overlay and artwork gap d0785edceabe16095e6e56aa42d88fb25bca3eb7 Vladyslav Bondarenko 2024-01-21 22:35:02
Release 0.6 d76ca463e13d1a47b68541f33faa9c44ec745347 Vladyslav Bondarenko 2023-09-12 02:02:46
fix!: Show arena as party 1c7d9c4c80948486eacd0c0eaa8f785a1efaa5ae Vladyslav Bondarenko 2023-09-11 23:51:47
fix: Filter out aura events 193d8864ae6ca3a2f6bf3e6ed2260e06722e47fc Vladyslav Bondarenko 2023-09-11 21:14:26
feat: Arrange all solo frames in one column 5d1f55b456efee534b970ed3ec80c5aeb334baa8 Vladyslav Bondarenko 2023-09-11 19:31:46
fix!: Show arena as party 6b1ac51958c213e1e06ef4c43b2e01a7ef0d1e01 Vladyslav Bondarenko 2023-09-11 17:06:51
Commit 0f7e2cbf74fe354c1c34fc9cd63b8b53237f8682 - doc: add `ldoc` annotations
Author: Vladyslav Bondarenko
Author date (UTC): 2024-01-28 21:58
Committer name: Vladyslav Bondarenko
Committer date (UTC): 2024-01-28 21:58
Parent(s): a2e6f462a30fb5d0ba0d146e5b851b35ff44ceff
Signer:
Signing key: EFF9624877D25D02
Signing status: E
Tree: ce4d5484650970e7a09a2c11e9eed5279e09911c
File Lines added Lines deleted
Makefile 20 7
README.adoc 23 20
etc/luacheckrc.lua 2 0
src/Chorus.lua 19 0
src/Chorus.xml 2 0
src/ChorusAuraButtonTemplate.lua 18 0
src/ChorusAuraFrameTemplate.lua 53 54
src/ChorusAuraTooltipFrameTemplate.lua 16 0
src/ChorusCastFrameTemplate.lua 5 0
src/ChorusFrame.lua 7 0
src/ChorusGroupFrame.lua 13 0
src/ChorusPartyFrame.lua 14 0
src/ChorusProgressFrameTemplate.lua 16 0
src/ChorusRaidFrame.lua 6 0
src/ChorusRaidTargetIconFrameTemplate.lua 7 0
src/ChorusRangeFrameTemplate.lua 15 0
src/ChorusTest.lua 0 0
src/ChorusThreatFrameTemplate.lua 7 0
src/ChorusUnitAffectingCombatFrameTemplate.lua 7 0
src/ChorusUnitBackdropTemplate.lua 7 0
src/ChorusUnitButtonTemplate.lua 9 0
src/ChorusUnitFrameTemplate.lua 21 0
src/ChorusUnitLevelFrameTemplate.lua 6 0
src/ChorusUnitNameFrameTemplate.lua 7 0
src/Makefile 63 0
src/local.lua 80 0
test/ChorusTest.xml 0 5
File Makefile changed (mode: 100644) (index 4380afe..1949d95)
... ... XMLLINTFLAGS=--nonet --schema ${srcdir}share/FrameXML/UI.xsd
25 25
26 26 INSTALL=unzip -d ${DESTDIR}Interface/AddOns INSTALL=unzip -d ${DESTDIR}Interface/AddOns
27 27
28 LUAFILES=${srcdir}src/*.lua ${srcdir}test/*.lua
29 XMLFILES=${srcdir}src/*.xml ${srcdir}test/*.xml
28 LUAFILES=
29 XMLFILES=
30 30
31 31 # Use the source directory name as project name, if not yet set. # Use the source directory name as project name, if not yet set.
32 NAME?=${shell basename ${realpath ${srcdir}}}
32 NAME ?= ${shell basename ${realpath ${srcdir}}}
33
33 34 # Use `git` to infer the project's current version, if not yet set. # Use `git` to infer the project's current version, if not yet set.
34 VERSION?=${shell ${GIT} ${GITFLAGS} describe}
35 VERSION ?= ${shell ${GIT} ${GITFLAGS} describe}
35 36
36 sinclude ${srcdir}local/Makefile
37 # Load the exact list of source snippets from a separate Makefile.
38 # The order in which files are passed to the command line is important.
39 # File `src/Chorus.lua` must be loaded first by the tools.
40 include ${srcdir}src/Makefile
37 41
38 42 all: | check all: | check
39 43
 
... ... ${NAME}-${VERSION}.zip: doc/html/index.html doc/html/ldoc.css
48 52
49 53 html: doc/html/index.html html: doc/html/index.html
50 54
55 # WARNING: `ldoc` will only merge files correctly when they are under the same
56 # parent directory. There is a way to make it work, but the configuration file
57 # and working directory must be carefully set-up.
58
51 59 doc/html/index.html: ${LUAFILES} doc/html/index.html: ${LUAFILES}
52 60 test -d doc/ || mkdir doc/ test -d doc/ || mkdir doc/
53 61 test -d doc/html/ || mkdir doc/html/ test -d doc/html/ || mkdir doc/html/
54 62 ${LDOC} ${LDOCFLAGS} --dir=doc/html/ --all \ ${LDOC} ${LDOCFLAGS} --dir=doc/html/ --all \
63 --merge -X \
55 64 --project=${NAME} \ --project=${NAME} \
56 --format=markdown \
65 --title='${NAME}-${VERSION}' \
57 66 --date=`${GIT} ${GITFLAGS} log --format=%as -n 1` \ --date=`${GIT} ${GITFLAGS} log --format=%as -n 1` \
58 $^
67 ${srcdir}src/ $^
59 68
60 69 install: ${NAME}-${VERSION}.zip install: ${NAME}-${VERSION}.zip
61 70 ${INSTALL} $^ ${INSTALL} $^
 
... ... check-lua: ${LUAFILES}
67 76 ${LUACHECK} ${LUACHECKFLAGS} $^ ${LUACHECK} ${LUACHECKFLAGS} $^
68 77
69 78 check: | check-lua check-xml check: | check-lua check-xml
79
80 clean:
81 rm -f doc/html/index.html
82 rm -f doc/html/ldoc.css
File README.adoc changed (mode: 100644) (index 02fb2df..25f911d)
1 1 = Chorus = Chorus
2 2 Vladyslav Bondarenko <vladyslavbond@protonmail.com> Vladyslav Bondarenko <vladyslavbond@protonmail.com>
3 0.7.1 (unstable), 2024-01-27
3 0.7.1 (unstable), 2024-01-28
4 4
5 5 Chorus is a graphical user interface extension for a popular video game World Chorus is a graphical user interface extension for a popular video game World
6 6 of Warcraft. It adds a custom raid frame. This is a work in progress. of Warcraft. It adds a custom raid frame. This is a work in progress.
7 7
8 8 Features: Features:
9 9
10 - approximate distance to every raid member in yards;
11 - sort debuffs by relevance;
12 - generalize raid and party frames;
10 * approximate distance to every raid member in yards;
11 * sort debuffs by relevance;
12 * generalize raid and party frames;
13 13
14 14 Supported game version is legacy 3.3.5a (or interface 30300). Supported game version is legacy 3.3.5a (or interface 30300).
15 15
 
... ... game. Unpack the archive that contains the project's sources into
29 29 game installation directory. In the end it must look something like this. game installation directory. In the end it must look something like this.
30 30
31 31 ---- ----
32 Interface/Addons/chorus/
33 Interface/Addons/chorus/bin/
34 Interface/Addons/chorus/etc/
35 Interface/Addons/chorus/share/
36 Interface/Addons/chorus/src/
37 Interface/Addons/chorus/README.adoc
38 Interface/Addons/chorus/chorus.toc
32 ${DESTDIR}/Interface/AddOns/chorus/chorus.toc
33 ${DESTDIR}/Interface/AddOns/chorus/doc/
34 ${DESTDIR}/Interface/AddOns/chorus/etc/
35 ${DESTDIR}/Interface/AddOns/chorus/Makefile
36 ${DESTDIR}/Interface/AddOns/chorus/README.adoc
37 ${DESTDIR}/Interface/AddOns/chorus/share/
38 ${DESTDIR}/Interface/AddOns/chorus/src/
39 ${DESTDIR}/Interface/AddOns/chorus/target/
40 ${DESTDIR}/Interface/AddOns/chorus/test/
39 41 ---- ----
40 42
41 43 Experienced users may install the add-on with `git`. Experienced users may install the add-on with `git`.
42 44
43 45 ---- ----
44 git clone --branch master https://rocketgit.com/user/vrtc/chorus "${gamedir}/Interface/AddOns/chorus"
46 git clone --branch master -o upstream https://rocketgit.com/user/vrtc/chorus "${DESTDIR}/Interface/AddOns/chorus/"
45 47 ---- ----
46 48
47 49 == Development == Development
 
... ... tools that may still be applicable.
54 56
55 57 Build dependencies: Build dependencies:
56 58
57 - luacheck (static analysis for Lua);
58 - xmllint (XML validator);
59 - luarocks (packaging and project management for Lua);
60 - ldoc (generate technical documentation from Lua sources);
59 * `make` (build instrumentation);
60 * `git` (versioning, packaging, distribution);
61 * `luacheck` (static analysis for Lua);
62 * `xmllint` (XML validator);
63 * `ldoc` (generate technical documentation from Lua sources);
61 64
62 65 ==== Build dependencies for Debian 12 ==== Build dependencies for Debian 12
63 66
 
... ... the repository was cloned to, or where the add-on was already installed to.
83 86 The build is done with `make` utility. All example commands assume it's The build is done with `make` utility. All example commands assume it's
84 87 installed. installed.
85 88
89 Minimal effort was made to make the `Makefile` adhere to `GNUmakefile`
90 conventions.
91
86 92 Validate Lua snippets for sanity. Requires `luacheck`. The configuration is Validate Lua snippets for sanity. Requires `luacheck`. The configuration is
87 93 loaded from `etc/luacheckrc.lua`. loaded from `etc/luacheckrc.lua`.
88 94
 
... ... make check-lua
91 97 ---- ----
92 98
93 99 Validate Blizzard UI XML snippets for sanity. Requires `xmllint`. The schema is Validate Blizzard UI XML snippets for sanity. Requires `xmllint`. The schema is
94 loaded from `etc/xml/FrameXML/UI.xsd`. The schema descriptor was exported from
100 loaded from `etc/FrameXML/UI.xsd`. The schema descriptor was exported from
95 101 the game client, version 3.3.5a. the game client, version 3.3.5a.
96 102
97 103 ---- ----
 
... ... not work if the project's was obtained from a distribution archive.
111 117 ---- ----
112 118 make dist make dist
113 119 ---- ----
114
115 Minimal effort was made to make the `Makefile` adhere to `GNUmakefile`
116 conventions.
File etc/luacheckrc.lua changed (mode: 100644) (index 2564b9a..752b65a)
... ... stds.wrath = {
64 64 'format', 'format',
65 65 'math', 'math',
66 66 'pairs', 'pairs',
67 'print',
67 68 'select', 'select',
68 69 'string', 'string',
69 70 'strtrim', 'strtrim',
 
... ... stds.chorus = {
165 166 --and saves the variables to a file, to make this name set --and saves the variables to a file, to make this name set
166 167 --exact. ]]-- --exact. ]]--
167 168 'Chorus', 'Chorus',
169 'ChorusAuraWeightMap',
168 170 'ChorusFocusFrameHealthFrame', 'ChorusFocusFrameHealthFrame',
169 171 'ChorusFocusFrameUnitNameFrame', 'ChorusFocusFrameUnitNameFrame',
170 172 'ChorusLuacheckrcDump', 'ChorusLuacheckrcDump',
File src/Chorus.lua changed (mode: 100644) (index 143e40f..ac8e35a)
1 --[[--
2 This module contains all functions that are accessible from global scope
3 defined by this project.
4
5 All relevant frames or globals that belong to this project, but for convenience
6 or necessity are not contained in this module, are allocated with names that
7 are prefixed with the module's name that is `Chorus`.
8
9 @module chorus
10 ]]--
11
1 12 Chorus = {} Chorus = {}
2 13
3 14 Chorus.test = {} Chorus.test = {}
4 15
16 --[[--
17 Utility function for developers that lists and caches, using SavedVariables
18 mechanism, all function names that were defined by this project.
19
20 The output is used as a definitive list of all dynamically allocated frames.
21
22 @function Chorus.luacheckrcDump
23 ]]
5 24 function Chorus.luacheckrcDump() function Chorus.luacheckrcDump()
6 25 if not ChorusLuacheckrcDump then if not ChorusLuacheckrcDump then
7 26 ChorusLuacheckrcDump = {} ChorusLuacheckrcDump = {}
File src/Chorus.xml changed (mode: 100644) (index 99a8ed2..0d1dada)
1 1 <?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
2 2 <Ui xmlns="http://www.blizzard.com/wow/ui/"> <Ui xmlns="http://www.blizzard.com/wow/ui/">
3 3 <Script file="Chorus.lua"/> <Script file="Chorus.lua"/>
4 <Script file="ChorusTest.lua"/>
5 <Script file="local.lua"/>
4 6 <Include file="ChorusFont.xml"/> <Include file="ChorusFont.xml"/>
5 7 <!-- Templates (abstract classes). --> <!-- Templates (abstract classes). -->
6 8 <Include file="ChorusAuraButtonTemplate.xml"/> <Include file="ChorusAuraButtonTemplate.xml"/>
File src/ChorusAuraButtonTemplate.lua changed (mode: 100644) (index f8a7e8e..d9753b4)
1 --[[--
2 @submodule chorus
3 ]]
4
5 --[[--
6 `ChorusAuraButtonTemplate` handles individual aura pictograms.
7
8 Features:
9 * show formatted remaining aura duration;
10 * highlight auras that were applied by the player character;
11 * show remaining charge quantity when applicable;
12 * show aura artwork;
13 * show aura category (Magic, Poison, Disease, Curse);
14 * display tooltip on mouseover;
15
16 @section ChorusAuraButtonTemplate
17 ]]
18
1 19 local Chorus = Chorus local Chorus = Chorus
2 20
3 21 local GetTime = GetTime local GetTime = GetTime
File src/ChorusAuraFrameTemplate.lua changed (mode: 100644) (index dcd8121..2084e66)
1 --[[--
2 `ChorusAuraFrameTemplate` handles subsets of unit auras, individual aura
3 buttons are handled by `ChorusAuraButtonTemplate`.
4 @submodule chorus
5 ]]
6
1 7 local Chorus = Chorus local Chorus = Chorus
2 8
3 9 local auraButtonEventProcessor = Chorus.auraButtonEventProcessor local auraButtonEventProcessor = Chorus.auraButtonEventProcessor
 
... ... local BUFF_MAX_DISPLAY = BUFF_MAX_DISPLAY or 36
13 19 --[[ See `FrameXML/BuffFrame.lua:DEBUFF_MAX_DISPLAY`. ]]-- --[[ See `FrameXML/BuffFrame.lua:DEBUFF_MAX_DISPLAY`. ]]--
14 20 local DEBUFF_MAX_DISPLAY = DEBUFF_MAX_DISPLAY or 36 local DEBUFF_MAX_DISPLAY = DEBUFF_MAX_DISPLAY or 36
15 21
16 --[[ TODO Globalize special spells. ]]--
17 local auraWeightMap = {
18 ['Aimed Shot'] = 1,
19 ['Anti-Magic Shell'] = 2,
20 ['Avenging Wrath'] = 3,
21 ['Bladestorm'] = 3,
22 ['Blind'] = 3,
23 ['Chains of Ice'] = 1,
24 ['Cheap Shot'] = 1,
25 ['Concussion Blow'] = 1,
26 ['Cyclone'] = 3,
27 ['Deterrence'] = 3,
28 ['Disarm'] = 2,
29 ['Disarmed'] = 2,
30 ['Divine Plea'] = 1,
31 ['Divine Shield'] = 3,
32 ['Entangling Roots'] = 1,
33 ['Evasion'] = 2,
34 ['Evocation'] = 2,
35 ['Fear'] = 2,
36 ['Freezing Trap'] = 2,
37 ['Gnaw'] = 2,
38 ['Gouge'] = 2,
39 ['Grounding Totem Effect'] = 2,
40 ['Grounding Totem'] = 2,
41 ['Hammer of Justice'] = 1,
42 ['Hamstring'] = 1,
43 ['Hand of Freedom'] = 1,
44 ['Hand of Protection'] = 2,
45 ['Hand of Sacrifice'] = 1,
46 ['Hand of Salvation'] = 1,
47 ['Hex'] = 2,
48 ['Hibernation'] = 2,
49 ['Ice Block'] = 3,
50 ['Icebound Fortitude'] = 3,
51 ['Kidney Shot'] = 1,
52 ['Last Stand'] = 3,
53 ['Mind Control'] = 3,
54 ['Mortal Strike'] = 1,
55 ['Polymorph'] = 2,
56 ['Psychic Scream'] = 2,
57 ['Recklessness'] = 3,
58 ['Sacrifice'] = 2,
59 ['Sap'] = 3,
60 ['Seduction'] = 2,
61 ['Shield Block'] = 2,
62 ['Shield Wall'] = 3,
63 ['Sleep'] = 2,
64 ['Spell Reflection'] = 2,
65 ['Unstable Affliction'] = 2,
66 ['Wounding Poison'] = 1,
67 }
68
69 Chorus.auraWeightMap = auraWeightMap
22 local auraWeightMap = ChorusAuraWeightMap
23
24 --[[--
25 Query the game for a given aura, then compute the weight for it, that is used
26 in when aura frame is sorted.
70 27
28 The weight is computed using remaining duration, owner of the aura (player
29 auras take priority), and special exceptions.
30
31 @function getAuraWeight
32 @see ChorusAuraWeightMap
33 @string unitDesignation unit as in `function UnitAura`
34 @int auraIndex sequential number starting from 1 as in `function UnitAura`
35 @string filter aura filter descriptor, usually either `HELPFUL` or `HARMFUL`, as in `function UnitAura`
36 @treturn int aura weight in [0,90000], the larger the number the more likely the aura is to be shown first
37 ]]
71 38 local function getAuraWeight(unitDesignation, auraIndex, filter) local function getAuraWeight(unitDesignation, auraIndex, filter)
72 39 local name, _, _, _, _, durationSec, owner = UnitAura(unitDesignation, auraIndex, filter) local name, _, _, _, _, durationSec, owner = UnitAura(unitDesignation, auraIndex, filter)
73 40 if not name then if not name then
 
... ... local function createEveryAuraButton(auraFrame)
210 177 end end
211 178 end end
212 179
180 local function validateAuraWeightMap(t)
181 assert(t ~= nil)
182 assert('table' == type(t))
183 assert(#t >= 1)
184 for spellName, weightNumber in pairs(t) do
185 assert(spellName ~= nil)
186 assert('string' == type(spellName))
187 spellName = strtrim(spellName)
188 assert(string.len(spellName) >= 1)
189 assert(string.len(spellName) <= 256)
190
191 assert(weightNumber ~= nil)
192 assert('number' == type(weightNumber))
193 assert(weightNumber >= 1)
194 assert(weightNumber <= 9)
195 end
196 end
197
213 198 function Chorus.auraFrameMain(self) function Chorus.auraFrameMain(self)
214 199 assert(self ~= nil) assert(self ~= nil)
215 200
 
... ... function Chorus.auraFrameMain(self)
247 232
248 233 self:SetScript('OnEvent', auraFrameEventProcessor) self:SetScript('OnEvent', auraFrameEventProcessor)
249 234 self:SetScript('OnShow', auraFrameEventProcessor) self:SetScript('OnShow', auraFrameEventProcessor)
235
236 if auraWeightMap then
237 validateAuraWeightMap(auraWeightMap)
238 else
239 print('ChorusAuraFrameTemplate.lua: warning: aura weight map empty or missing')
240 end
241 end
242
243 function Chorus.getAuraWeight(...)
244 return getAuraWeight(...)
245 end
246
247 function Chorus.getAuraPriorityList(...)
248 return getAuraPriorityList(...)
250 249 end end
File src/ChorusAuraTooltipFrameTemplate.lua changed (mode: 100644) (index 73e9b6e..e8798fd)
1 --[[--
2 `ChorusAuraTooltipFrameTemplate` is *not* the familiar tooltip frame. Instead,
3 it is intended to conditionally show all auras on a given unit.
4
5 `ChorusAuraFrameTemplate` is intended to show only a relevant subset of auras
6 on a given unit at a time. Almost never all of the auras. When the need arises
7 for the user to read all auras on a particular unit, they click a specific
8 button, and it displays a detailed tooltip for all auras.
9 `ChorusAuraTooltipFrameTemplate` that is this module handles this tooltip.
10
11 Note that showing a frame in combat is a restricted action. This template
12 accounts for that and must work in combat as expected.
13
14 @submodule chorus
15 ]]
16
1 17 local Chorus = Chorus local Chorus = Chorus
2 18
3 19 local strtrim = strtrim local strtrim = strtrim
File src/ChorusCastFrameTemplate.lua changed (mode: 100644) (index 37fbfc6..e7e307b)
1 --[[--
2 `ChorusCastFrameTemplate` is a primitive unit cast bar.
3 @submodule chorus
4 ]]
5
1 6 local Chorus = Chorus local Chorus = Chorus
2 7
3 8 local GetTime = GetTime local GetTime = GetTime
File src/ChorusFrame.lua changed (mode: 100644) (index 41613fb..ab5a369)
1 --[[--
2 `ChorusFrame` is a concrete (not virtual tempalte) frame instance, that
3 orchestrates all over frames.
4
5 @submodule chorus
6 ]]
7
1 8 local UIParent = UIParent local UIParent = UIParent
2 9
3 10 local Chorus = Chorus local Chorus = Chorus
File src/ChorusGroupFrame.lua changed (mode: 100644) (index df0621a..dbbbc93)
1 --[[--
2 `ChorusGroupFrame` toggles party, raid or solo frames where appropriate
3 automatically.
4
5 Toggling frames in combat is a restricted action. Workarounds are employed to
6 make it work, similarly to how it is done in `ShadowedUnitFrames`. That is,
7 with `FrameXML/SecureStateDriver.lua`. It executes a macro-like commands on
8 demand, instead of the usual event processors, that are then handled by
9 `FrameXML/SecureHandlers.lua`.
10
11 @submodule chorus
12 ]]
13
1 14 local Chorus = Chorus local Chorus = Chorus
2 15 local ChorusPartyFrame = ChorusPartyFrame local ChorusPartyFrame = ChorusPartyFrame
3 16 local ChorusRaidFrame = ChorusRaidFrame local ChorusRaidFrame = ChorusRaidFrame
File src/ChorusPartyFrame.lua changed (mode: 100644) (index 5f0bd9a..97f9188)
1 --[[--
2 `ChorusPartyFrame` holds all frames necessary to show player's current party
3 members, if any.
4
5 It is intended to be disabled in raid groups.
6
7 Currently, it is also used in arenas.
8
9 Logic to toggle the frame is handled in a separate frame, that is
10 `ChorusGroupFrame`.
11
12 @submodule chorus
13 ]]
14
1 15 local SecureButton_GetUnit = SecureButton_GetUnit local SecureButton_GetUnit = SecureButton_GetUnit
2 16
3 17 local Chorus = Chorus local Chorus = Chorus
File src/ChorusProgressFrameTemplate.lua changed (mode: 100644) (index 3af285f..53a781a)
1 --[[--
2 `ChorusProgressFrameTemplate` is a generalization for health bars and power
3 (mana) bars.
4
5 The features are shared between both health and power bars, but there exist
6 separate corresponding templates: `ChorusHealthFrameTemplate` and
7 `ChorusPowerFrameTemplate`.
8
9 Frames that inherit from this template may define field `strategy`. This field
10 may be either `UnitIsFriend` or `UnitPowerType`. The bar will be colored by
11 either unit reaction to the player, or the power type (blue for mana, red for
12 rage, etc.).
13
14 @submodule chorus
15 ]]
16
1 17 local Chorus = Chorus local Chorus = Chorus
2 18
3 19 local UnitClass = Chorus.test.UnitClass or UnitClass local UnitClass = Chorus.test.UnitClass or UnitClass
File src/ChorusRaidFrame.lua changed (mode: 100644) (index 8cd7b81..03dbee5)
1 --[[--
2 `ChorusRaidFrame` is a primitive raid group frame.
3
4 @submodule chorus
5 ]]
6
1 7 local function raidFrameMain(self) local function raidFrameMain(self)
2 8 assert(self ~= nil) assert(self ~= nil)
3 9 end end
File src/ChorusRaidTargetIconFrameTemplate.lua changed (mode: 100644) (index e52b616..bd040cb)
1 --[[--
2 `ChorusRaidTargetIconFrameTemplate` shows the corresponding unit raid marker,
3 like {skull}, {diamond}, {moon}, {star}, etc.
4
5 @submodule chorus
6 ]]
7
1 8 local Chorus = Chorus local Chorus = Chorus
2 9
3 10 local UnitExists = Chorus.test.UnitExists or UnitExists local UnitExists = Chorus.test.UnitExists or UnitExists
File src/ChorusRangeFrameTemplate.lua changed (mode: 100644) (index b465317..13286ca)
1 --[[--
2 `ChorusRangeFrameTemplate` displays approximate distance from player character
3 to the corresponding unit, in yards.
4
5 This works by checking the reach of each spell in the player's character's
6 current spell book.
7
8 FIXME Currently range indicator does not work in Cataclysm client (interface
9 40300). Specifically, `function GetSpellName` is not defined for that client.
10 Additionally, the current implementation may violate some additional
11 restrictions found in interface `40300` but not in interface `30300`.
12
13 @submodule chorus
14 ]]
15
1 16 local GetSpellName = GetSpellName local GetSpellName = GetSpellName
2 17 local IsSpellInRange = IsSpellInRange local IsSpellInRange = IsSpellInRange
3 18
File src/ChorusTest.lua renamed from test/ChorusTest.lua (similarity 100%)
File src/ChorusThreatFrameTemplate.lua changed (mode: 100644) (index 5a5fec7..7d34800)
1 --[[--
2 `ChorusThreatFrameTemplate` displays a color coded pictogram for general threat
3 situation for the corresponding unit and the player character.
4
5 @submodule chorus
6 ]]
7
1 8 local Chorus = Chorus local Chorus = Chorus
2 9
3 10 local GetThreatStatusColor = GetThreatStatusColor local GetThreatStatusColor = GetThreatStatusColor
File src/ChorusUnitAffectingCombatFrameTemplate.lua changed (mode: 100644) (index c9a2801..267d668)
1 --[[--
2 `ChorusUnitAffectingCombatFrameTemplate` shows a pictogram when the
3 corresponding unit is engaged in combat.
4
5 @submodule chorus
6 ]]
7
1 8 local Chorus = Chorus local Chorus = Chorus
2 9
3 10 local strtrim = strtrim local strtrim = strtrim
File src/ChorusUnitBackdropTemplate.lua changed (mode: 100644) (index 23773dc..7738bbc)
1 --[[--
2 `ChorusUnitBackdropTemplate` handles the visuals and dynamic changes to unit
3 frame borders.
4
5 @submodule chorus
6 ]]
7
1 8 local SecureButton_GetUnit = SecureButton_GetUnit local SecureButton_GetUnit = SecureButton_GetUnit
2 9
3 10 local function unitBackdropEventProcessor(unitBackdrop) local function unitBackdropEventProcessor(unitBackdrop)
File src/ChorusUnitButtonTemplate.lua changed (mode: 100644) (index 786b1e6..b0765bb)
1 --[[--
2 `ChorusUnitButtonTemplate` handles only the secure, clickable portion of unit
3 buttons, and *none* of the visuals.
4
5 The root template for unit buttons is `ChorusUnitFrameTemplate`.
6
7 @submodule chorus
8 ]]
9
1 10 local Chorus = Chorus local Chorus = Chorus
2 11
3 12 local GameTooltip = GameTooltip local GameTooltip = GameTooltip
File src/ChorusUnitFrameTemplate.lua changed (mode: 100644) (index 1887282..59b3514)
1 --[[--
2 `ChorusUnitFrameTemplate` is the root template for all unit button variations.
3
4 All widgets are conditionally included as children to instances of this
5 template. For example health bars, power bars, aura frames, combat indicator,
6 range indicator. These widgets are separated into their own templates.
7
8 The template is further specialized into the following profiles.
9
10 * `ChorusTinyUnitFrameTemplate`;
11 * `ChorusSmallUnitFrameTemplate`;
12 * `ChorusLargeUnitFrameTemplate`;
13 * `ChorusHugeUnitFrameTemplate`;
14
15 When instancing a unit button, one of these specializations is to be used.
16
17 Group frame templates may define further specialized templates.
18
19 @submodule chorus
20 ]]
21
1 22 local Chorus = Chorus local Chorus = Chorus
2 23
3 24 local UnitExists = Chorus.test.UnitExists or UnitExists local UnitExists = Chorus.test.UnitExists or UnitExists
File src/ChorusUnitLevelFrameTemplate.lua changed (mode: 100644) (index aaefe3d..40ca7ee)
1 --[[--
2 `ChorusUnitLevelFrameTemplate` shows the number of corresponding unit's level, conditionally decorated for elite and rare enemies.
3
4 @submodule chorus
5 ]]
6
1 7 local GetQuestDifficultyColor = GetQuestDifficultyColor local GetQuestDifficultyColor = GetQuestDifficultyColor
2 8 local UnitCanAttack = UnitCanAttack local UnitCanAttack = UnitCanAttack
3 9 local UnitExists = UnitExists local UnitExists = UnitExists
File src/ChorusUnitNameFrameTemplate.lua changed (mode: 100644) (index 8e73dde..cdd27c9)
1 --[[--
2 `ChorusUnitNameFrameTemplate` shows corresponding unit's human readable
3 localized name, conditionally color coded.
4
5 @submodule chorus
6 ]]
7
1 8 local Chorus = Chorus local Chorus = Chorus
2 9
3 10 local UnitClass = Chorus.test.UnitClass or UnitClass local UnitClass = Chorus.test.UnitClass or UnitClass
File src/Makefile added (mode: 100644) (index 0000000..cfa3b5d)
1 # The order in which Lua snippets are processed is sometimes relevant.
2 # Specifically, `ldoc` requires `Chorus.lua` file to be first, since it
3 # contains the master module definition. Hence this list of source files.
4
5 # It is possible to accomplish the same task using `vpath` or `addprefix`. This
6 # blunt approch is more portable and more easily understood by developers not
7 # familiar with the `make` tool.
8
9 LUAFILES += \
10 ${srcdir}src/Chorus.lua \
11 ${srcdir}src/ChorusTest.lua \
12 ${srcdir}src/local.lua \
13 ${srcdir}src/ChorusAuraButtonTemplate.lua \
14 ${srcdir}src/ChorusAuraFrameTemplate.lua \
15 ${srcdir}src/ChorusAuraTooltipFrameTemplate.lua \
16 ${srcdir}src/ChorusCastFrameTemplate.lua \
17 ${srcdir}src/ChorusProgressFrameTemplate.lua \
18 ${srcdir}src/ChorusRaidTargetIconFrameTemplate.lua \
19 ${srcdir}src/ChorusRangeFrameTemplate.lua \
20 ${srcdir}src/ChorusThreatFrameTemplate.lua \
21 ${srcdir}src/ChorusUnitAffectingCombatFrameTemplate.lua \
22 ${srcdir}src/ChorusUnitBackdropTemplate.lua \
23 ${srcdir}src/ChorusUnitButtonTemplate.lua \
24 ${srcdir}src/ChorusUnitFrameTemplate.lua \
25 ${srcdir}src/ChorusUnitGroupRoleFrameTemplate.lua \
26 ${srcdir}src/ChorusUnitLevelFrameTemplate.lua \
27 ${srcdir}src/ChorusUnitNameFrameTemplate.lua \
28 ${srcdir}src/ChorusRaidFrame.lua \
29 ${srcdir}src/ChorusPartyFrame.lua \
30 ${srcdir}src/ChorusGroupFrame.lua \
31 ${srcdir}src/ChorusFrame.lua
32
33 XMLFILES += \
34 ${srcdir}src/Chorus.xml \
35 ${srcdir}src/ChorusFont.xml \
36 ${srcdir}src/ChorusAuraButtonTemplate.xml \
37 ${srcdir}src/ChorusAuraFrameTemplate.xml \
38 ${srcdir}src/ChorusAuraTooltipFrameTemplate.xml \
39 ${srcdir}src/ChorusCastFrameTemplate.xml \
40 ${srcdir}src/ChorusHealthFrameTemplate.xml \
41 ${srcdir}src/ChorusHugeUnitFrameTemplate.xml \
42 ${srcdir}src/ChorusLargeUnitFrameTemplate.xml \
43 ${srcdir}src/ChorusPowerFrameTemplate.xml \
44 ${srcdir}src/ChorusProgressFrameTemplate.xml \
45 ${srcdir}src/ChorusRaidTargetIconFrameTemplate.xml \
46 ${srcdir}src/ChorusRangeFrameTemplate.xml \
47 ${srcdir}src/ChorusSmallUnitFrameTemplate.xml \
48 ${srcdir}src/ChorusThreatFrameTemplate.xml \
49 ${srcdir}src/ChorusTinyUnitFrameTemplate.xml \
50 ${srcdir}src/ChorusUnitAffectingCombatFrameTemplate.xml \
51 ${srcdir}src/ChorusUnitBackdropTemplate.xml \
52 ${srcdir}src/ChorusUnitButtonTemplate.xml \
53 ${srcdir}src/ChorusUnitFrameTemplate.xml \
54 ${srcdir}src/ChorusUnitGroupRoleFrameTemplate.xml \
55 ${srcdir}src/ChorusUnitLevelFrameTemplate.xml \
56 ${srcdir}src/ChorusUnitNameFrameTemplate.xml \
57 ${srcdir}src/ChorusFocusFrame.xml \
58 ${srcdir}src/ChorusPlayerFrame.xml \
59 ${srcdir}src/ChorusTargetFrame.xml \
60 ${srcdir}src/ChorusPartyFrame.xml \
61 ${srcdir}src/ChorusRaidFrame.xml \
62 ${srcdir}src/ChorusGroupFrame.xml \
63 ${srcdir}src/ChorusFrame.xml
File src/local.lua added (mode: 100644) (index 0000000..09903a4)
1 --[[--
2 @submodule chorus
3 ]]
4
5 --[[--
6 Local preferences for Chorus.
7 @section local
8 ]]
9
10 --[[--
11 This map contains auras that are prioritized to be shown first in the aura
12 frames.
13
14 Every key is a localized aura name, that `function UnitAura` will accept.
15
16 Every value is a positive integer in [1,9], that is the weight. The larger the
17 weight, the higher the priority the given aura will be shown before others.
18
19 This map should be overriden for every game client localization. Only localized
20 aura names are accepted by the game API. It is much more convenient to list
21 human-readable aura names, than every integer identifier for every aura rank.
22
23 Additionally, users may override this map in accordance with their personal
24 preference. The default values aim to give reasonable preset for all abilities
25 usable by player characters in the English version of the game.
26
27 @table ChorusAuraWeightMap
28 @see getAuraWeight
29 ]]
30 ChorusAuraWeightMap = {
31 ['Aimed Shot'] = 1,
32 ['Anti-Magic Shell'] = 2,
33 ['Avenging Wrath'] = 3,
34 ['Bladestorm'] = 3,
35 ['Blind'] = 3,
36 ['Chains of Ice'] = 1,
37 ['Cheap Shot'] = 1,
38 ['Concussion Blow'] = 1,
39 ['Cyclone'] = 3,
40 ['Deterrence'] = 3,
41 ['Disarm'] = 2,
42 ['Disarmed'] = 2,
43 ['Divine Plea'] = 1,
44 ['Divine Shield'] = 3,
45 ['Entangling Roots'] = 1,
46 ['Evasion'] = 2,
47 ['Evocation'] = 2,
48 ['Fear'] = 2,
49 ['Freezing Trap'] = 2,
50 ['Gnaw'] = 2,
51 ['Gouge'] = 2,
52 ['Grounding Totem Effect'] = 2,
53 ['Grounding Totem'] = 2,
54 ['Hammer of Justice'] = 1,
55 ['Hamstring'] = 1,
56 ['Hand of Freedom'] = 1,
57 ['Hand of Protection'] = 2,
58 ['Hand of Sacrifice'] = 1,
59 ['Hand of Salvation'] = 1,
60 ['Hex'] = 2,
61 ['Hibernation'] = 2,
62 ['Ice Block'] = 3,
63 ['Icebound Fortitude'] = 3,
64 ['Kidney Shot'] = 1,
65 ['Last Stand'] = 3,
66 ['Mind Control'] = 3,
67 ['Mortal Strike'] = 1,
68 ['Polymorph'] = 2,
69 ['Psychic Scream'] = 2,
70 ['Recklessness'] = 3,
71 ['Sacrifice'] = 2,
72 ['Sap'] = 3,
73 ['Seduction'] = 2,
74 ['Shield Block'] = 2,
75 ['Shield Wall'] = 3,
76 ['Sleep'] = 2,
77 ['Spell Reflection'] = 2,
78 ['Unstable Affliction'] = 2,
79 ['Wounding Poison'] = 1,
80 }
File test/ChorusTest.xml deleted (index 7532405..0000000)
1 <?xml version="1.0" encoding="UTF-8"?>
2 <Ui xmlns="http://www.blizzard.com/wow/ui/">
3 <!-- The script is executed conditionally. -->
4 <Script file="ChorusTest.lua"/>
5 </Ui>
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/vrtc/chorus

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/vrtc/chorus

Clone this repository using git:
git clone git://git.rocketgit.com/user/vrtc/chorus

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main