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 minimal documentation 125835dbbef41528e4f545642f62e519e7e8f9fc Vladyslav Bondarenko 2024-06-16 15:34:58
doc: descript aura button API 7d110e3d397a335d2dc0ffbf699acc487730d0d8 Vladyslav Bondarenko 2024-06-16 13:24:52
feat: add ldoc custom see tag handler d28dc9809939a99694d87cf1d0654eb0e2fcd314 Vladyslav Bondarenko 2024-06-16 13:23:24
feat: add optional xmlstarlet support b2db46335cb4aa461c45915d235c6d8d340a3dea Vladyslav Bondarenko 2024-06-16 09:57:27
fix: indent Chorus.xml with tabs and not spaces bf4091ab69c75aafa9256b0503b5addd316e214f Vladyslav Bondarenko 2024-06-16 09:39:28
fix: format generated XML with tabs and not spaces d0018a28b184add22ea69f86c8b334a72310004e Vladyslav Bondarenko 2024-06-16 09:26:54
doc: raid frame profile generator script 22deb6f002463583ef5fd5c1acfcfb5777329aa8 Vladyslav Bondarenko 2024-06-15 21:55:01
feat: add fallback offline label a621e23fe7dc5668f0525dcc2bc60d916c2a1c14 Vladyslav Bondarenko 2024-06-15 19:08:05
fix: add test mocks for background and backdrop 2b22abbcb266bb02bded0633301e1669ed1b040d Vladyslav Bondarenko 2024-06-15 19:07:40
fix: render raid target icon above health cb950c903e6fe0a8078ea06473ce3a01157e55cc Vladyslav Bondarenko 2024-06-15 19:06:13
fix: shift solo frames left 4ba54a74c54b3bc68411fa8882ebd08a93587a1d Vladyslav Bondarenko 2024-06-15 19:04:37
fix!: render raid frames correctly cdb44a8f8ed5a356651d7119f8fd9441dda2c058 Vladyslav Bondarenko 2024-06-15 19:01:13
fix: disable raid profiles for now 41ed89dc4f78561e90ba999d00e95e0b1dc3f2a8 Vladyslav Bondarenko 2024-06-15 05:52:14
feat!: add raid group profiles 57b4b36b800beaf6843bc3cfc954340d914b71fa Vladyslav Bondarenko 2024-06-14 22:19:47
feat!: prepare nightly release 0.8.0 e11a3bbdfad85e4c4716e4ecfd3e7f5b8f009058 Vladyslav Bondarenko 2024-06-14 15:33:18
fix: globalize string constants cc5893ba83f388c0a58b183321f63867b10248ad Vladyslav Bondarenko 2024-06-14 15:12:35
feat: always show player frame 1eb20501d74ee931691f02abc31a176569a7d299 Vladyslav Bondarenko 2024-06-14 14:34:42
feat: add header background to larger units ef000eebb9ef5a8211f6aff47e2a1c38a3badf4a Vladyslav Bondarenko 2024-06-14 13:54:04
feat: unknown unit level is rendered as red f830dfcf22bf2f8e5c087de8f42a89f6733f5269 Vladyslav Bondarenko 2024-06-14 13:51:34
fix: make unit level text bold 2a4ea6baea2107a3f1ec8ab7bca4edb169a4575b Vladyslav Bondarenko 2024-06-14 13:51:01
Commit 125835dbbef41528e4f545642f62e519e7e8f9fc - doc: add minimal documentation
Author: Vladyslav Bondarenko
Author date (UTC): 2024-06-16 15:34
Committer name: Vladyslav Bondarenko
Committer date (UTC): 2024-06-16 15:34
Parent(s): 7d110e3d397a335d2dc0ffbf699acc487730d0d8
Signer:
Signing key: EFF9624877D25D02
Signing status: E
Tree: 051110fdf696fac106d76619ff2d876c6147d2e0
File Lines added Lines deleted
etc/luacheckrc.lua 11 0
src/ChorusAuraButtonTemplate.lua 3 3
src/ChorusAuraTooltipFrameTemplate.lua 34 17
src/ChorusCastFrameTemplate.lua 8 0
src/ChorusFrame.lua 9 3
src/ChorusGroupFrame.lua 37 14
src/ChorusPartyFrame.lua 14 10
src/ChorusProgressFrameTemplate.lua 30 18
src/ChorusRaidTargetIconFrameTemplate.lua 7 3
src/ChorusRangeFrameTemplate.lua 45 14
src/ChorusTest.lua 2 4
src/ChorusUnitBackdropTemplate.lua 10 0
src/ChorusUnitBackgroundTemplate.lua 12 0
src/ChorusUnitButtonTemplate.lua 16 12
src/ChorusUnitFrameTemplate.lua 21 19
src/ChorusUnitGroupRoleFrameTemplate.lua 29 6
src/ChorusUnitLevelFrameTemplate.lua 7 3
src/ChorusUnitNameFrameTemplate.lua 15 4
src/local.lua 1 1
File etc/luacheckrc.lua changed (mode: 100644) (index 752b65a..fc88691)
... ... stds.wrath = {
17 17 read_globals = { read_globals = {
18 18 'CreateFrame', 'CreateFrame',
19 19 'GetBuildInfo', 'GetBuildInfo',
20 'GetInstanceInfo',
20 21 'GetModifiedClick', 'GetModifiedClick',
21 22 'GetNumPartyMembers', 'GetNumPartyMembers',
23 'GetNumRaidMembers',
22 24 'GetPlayerInfoByGUID', 'GetPlayerInfoByGUID',
23 25 'GetQuestDifficultyColor', 'GetQuestDifficultyColor',
24 26 'GetRaidTargetIndex', 'GetRaidTargetIndex',
 
... ... stds.wrath = {
27 29 'GetSpellTexture', 'GetSpellTexture',
28 30 'GetThreatStatusColor', 'GetThreatStatusColor',
29 31 'GetTime', 'GetTime',
32 'InCombatLockdown',
30 33 'IsSpellInRange', 'IsSpellInRange',
31 34 'UnitAffectingCombat', 'UnitAffectingCombat',
32 35 'UnitAura', 'UnitAura',
 
... ... Author still chose to use FrameXML for convenience. ]]--
90 93
91 94 stds.framexml = { stds.framexml = {
92 95 read_globals = { read_globals = {
96 'DEAD',
97 'CORPSE',
98 'PLAYER_OFFLINE',
99 'DEATH_RELEASE',
93 100 'BUFF_MAX_DISPLAY', 'BUFF_MAX_DISPLAY',
94 101 'CastingBarFrame', 'CastingBarFrame',
95 102 'ComboFrame', 'ComboFrame',
 
... ... stds.chorus = {
175 182 'ChorusTargetFrameHealthFrame', 'ChorusTargetFrameHealthFrame',
176 183 'ChorusTargetFrameUnitNameFrame', 'ChorusTargetFrameUnitNameFrame',
177 184 'ChorusUnitGroupRoleMap', 'ChorusUnitGroupRoleMap',
185 'ChorusTinyRaidFrame',
186 'ChorusSmallRaidFrame',
187 'ChorusLargeRaidFrame',
188 'ChorusHugeRaidFrame',
178 189 }, },
179 190 } }
180 191
File src/ChorusAuraButtonTemplate.lua changed (mode: 100644) (index 6527d36..0fb5a03)
... ... watch that unit, then apply relevant changes to the aura button.
365 365 @see apply @see apply
366 366 @tparam frame self the aura button @tparam frame self the aura button
367 367 @tparam string eventCategory event category designation of the given event @tparam string eventCategory event category designation of the given event
368 @param unitDesignation vararg, given `UNIT_AURA`,
368 @param unitDesignation vararg, given `UNIT_AURA`, the relevant unit
369 369 @return nothing @return nothing
370 370 ]] ]]
371 371 function Chorus.auraButtonEventProcessor(self, eventCategory, ...) function Chorus.auraButtonEventProcessor(self, eventCategory, ...)
 
... ... end
459 459 Initialize the aura button frame with callbacks and children. Initialize the aura button frame with callbacks and children.
460 460
461 461 @function auraButtonMain @function auraButtonMain
462 @tparam frame self
462 @tparam frame self
463 463 @return nothing @return nothing
464 464 ]] ]]
465 465 function Chorus.auraButtonMain(self) function Chorus.auraButtonMain(self)
 
... ... function Chorus.auraButtonMain(self)
470 470 self.label2 = _G[n .. 'Text2'] self.label2 = _G[n .. 'Text2']
471 471 self.overlay = _G[n .. 'Overlay'] self.overlay = _G[n .. 'Overlay']
472 472 end end
473 self:SetScript('OnEvent', auraButtonEventProcessor)
473 self:SetScript('OnEvent', Chorus.auraButtonEventProcessor)
474 474 self:RegisterEvent('ADDON_LOADED') self:RegisterEvent('ADDON_LOADED')
475 475 self:RegisterEvent('UNIT_AURA') self:RegisterEvent('UNIT_AURA')
476 476 auraButtonValidate(self) auraButtonValidate(self)
File src/ChorusAuraTooltipFrameTemplate.lua changed (mode: 100644) (index e8798fd..a1630c5)
1 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 2 @submodule chorus @submodule chorus
15 3 ]] ]]
16 4
 
... ... local function getButtonAssociatedTooltipFrame(self)
31 19 return tooltipFrame return tooltipFrame
32 20 end end
33 21
22 --[[--
23 Initialize the button to toggle `ChorusAuraTooltipFrame` in restricted
24 environment.
25
26 When this button is clicked, it must show a frame, that contains an exhaustive
27 list of auras that effect the corresponding unit.
28
29 @function auraTooltipToggleButtonMain
30 @tparam frame self this aura tooltip toggle button
31 ]]
34 32 local function auraTooltipToggleButtonMain(self) local function auraTooltipToggleButtonMain(self)
35 33 assert(self ~= nil) assert(self ~= nil)
36 34
37 --[[ WARNING For some bizzare reason, only programmatically created
38 secure handlers, or secure handlers that descend from secure frames,
39 define the required method of `SetFrameRef`. ]]--
35 --[[ @warning For some bizzare reason, only programmatically created
36 secure handlers, or secure handlers that descend from secure frames,
37 define the required method of `SetFrameRef`. ]]--
38
39 local nama = (self:GetName() or '') .. 'SecureClickHandlerFrame'
40
41 local secureClickHandler = _G[nama] or CreateFrame('FRAME', nama, self,
42 'SecureHandlerClickTemplate')
40 43
41 local secureClickHandler = _G[self:GetName() .. 'SecureClickHandlerFrame'] or
42 CreateFrame('FRAME', self:GetName() .. 'SecureClickHandlerFrame', self, 'SecureHandlerClickTemplate');
43 44 assert(secureClickHandler ~= nil) assert(secureClickHandler ~= nil)
44 45
45 46 local tooltipFrame = getButtonAssociatedTooltipFrame(self) local tooltipFrame = getButtonAssociatedTooltipFrame(self)
 
... ... local function auraTooltipToggleButtonMain(self)
67 68 RegisterUnitWatch(self) RegisterUnitWatch(self)
68 69 end end
69 70
71 --[[--
72 `ChorusAuraTooltipFrameTemplate` is *not* the familiar tooltip frame. Instead,
73 it is intended to conditionally show all auras on a given unit.
74
75 `ChorusAuraFrameTemplate` is intended to show only a relevant subset of auras
76 on a given unit at a time. Almost never all of the auras. When the need arises
77 for the user to read all auras on a particular unit, they click a specific
78 button, and it displays a detailed tooltip for all auras.
79 `ChorusAuraTooltipFrameTemplate` that is this module handles this tooltip.
80
81 Note that showing a frame in combat is a restricted action. This template
82 accounts for that and must work in combat as expected.
83
84 @function auraTooltipFrameMain
85 @tparam frame self this Chorus aura tooltip frame
86 ]]
70 87 local function auraTooltipFrameMain(self) local function auraTooltipFrameMain(self)
71 88 assert(self ~= nil) assert(self ~= nil)
72 89
File src/ChorusCastFrameTemplate.lua changed (mode: 100644) (index e7e307b..bacfe08)
... ... local function castFrameUpdateProcessor(self)
221 221 applyDurationRemainingSec(self, durationRemainingSec) applyDurationRemainingSec(self, durationRemainingSec)
222 222 end end
223 223
224 --[[--
225 Initialize the spell cast progress frame.
226
227 This is a minimalist naive spell cast bar, used for larger unit buttons.
228
229 @function castFrameMain
230 @tparam frame self this cast frame
231 ]]
224 232 local function castFrameMain(self) local function castFrameMain(self)
225 233 assert(self ~= nil) assert(self ~= nil)
226 234
File src/ChorusFrame.lua changed (mode: 100644) (index ab5a369..e9efd2e)
1 1 --[[-- --[[--
2 `ChorusFrame` is a concrete (not virtual tempalte) frame instance, that
3 orchestrates all over frames.
4
5 2 @submodule chorus @submodule chorus
6 3 ]] ]]
7 4
 
... ... local function applyLayout(self)
55 52
56 53 end end
57 54
55 --[[--
56 `ChorusFrame` is a concrete (not virtual tempalte) frame instance, that
57 orchestrates all over frames.
58
59 `ChorusFrame` is effectively a singleton.
60
61 @function chorusFrameMain
62 @tparam fram self
63 ]]
58 64 local function chorusFrameMain(self) local function chorusFrameMain(self)
59 65 --[[ Wait for the game to finish loading completely, only then apply --[[ Wait for the game to finish loading completely, only then apply
60 66 changes. ]]-- changes. ]]--
File src/ChorusGroupFrame.lua changed (mode: 100644) (index 81027a9..8e976d9)
1 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 2 @submodule chorus @submodule chorus
12 3 ]] ]]
13 4
14 5 local GetInstanceInfo = Chorus.test.GetInstanceInfo or GetInstanceInfo local GetInstanceInfo = Chorus.test.GetInstanceInfo or GetInstanceInfo
15 local GetNumRaidMembers = Chorus.test.GetNumRaidMembers or GetNumRaidMembers
6 local GetNumRaidMembers = Chorus.test.GetNumRaidMembers or GetNumRaidMembers
16 7 local InCombatLockdown = Chorus.test.InCombatLockdown or InCombatLockdown local InCombatLockdown = Chorus.test.InCombatLockdown or InCombatLockdown
17 8
18 9 local Chorus = Chorus local Chorus = Chorus
 
... ... local ChorusPartyFrame = ChorusPartyFrame
21 12 local ChorusSmallRaidFrame = ChorusSmallRaidFrame local ChorusSmallRaidFrame = ChorusSmallRaidFrame
22 13 local ChorusTinyRaidFrame = ChorusTinyRaidFrame local ChorusTinyRaidFrame = ChorusTinyRaidFrame
23 14
15 --[[--
16 Toggle the visibility raid group profile frame.
17
18 Evaluate a list of all possible raid frame profiles. Consider current player's
19 raid size and current zone. Then, show the most appropriate profile and hide
20 all others.
21
22 Each raid frame profile exists in memory from initialization.
23
24 This may only be run effectively in unrestricted execution environment, that is
25 out of combat.
26
27 The group frame secure handler implements the same feature. However, it uses
28 state drivers and secure frames, that may be executed in restricted environment
29 and during combat.
30
31 @function groupFrameToggleInsecure
32 @return nothing
33 ]]
24 34 function Chorus.groupFrameToggleInsecure() function Chorus.groupFrameToggleInsecure()
25 35 if InCombatLockdown() then if InCombatLockdown() then
26 36 return return
 
... ... function Chorus.groupFrameToggleInsecure()
41 51 local thef = nil local thef = nil
42 52 local _, instanceType = GetInstanceInfo() local _, instanceType = GetInstanceInfo()
43 53 if 'arena' == instanceType then if 'arena' == instanceType then
44 --[[ TODO Add real arena group frame, with enemy frames. ]]--
54 --[[ @todo Add real arena group frame, with enemy frames. ]]--
45 55 thef = ChorusPartyFrame thef = ChorusPartyFrame
46 56 elseif 'raid' == instanceType or 'none' == instanceType then elseif 'raid' == instanceType or 'none' == instanceType then
47 57 local n = GetNumRaidMembers() local n = GetNumRaidMembers()
 
... ... function Chorus.groupFrameToggleInsecure()
61 71 end end
62 72 end end
63 73
74 --[[--
75 `ChorusGroupFrame` toggles party, raid or solo frames where appropriate
76 automatically.
77
78 Toggling frames in combat is a restricted action. Workarounds are employed to
79 make it work, similarly to how it is done in `ShadowedUnitFrames`. That is,
80 with `FrameXML/SecureStateDriver.lua`. It executes a macro-like commands on
81 demand, instead of the usual event processors, that are then handled by
82 `FrameXML/SecureHandlers.lua`.
83
84 @function groupFrameMain
85 @tparam self this group frame
86 ]]
64 87 function Chorus.groupFrameMain(self) function Chorus.groupFrameMain(self)
65 88 assert(self ~= nil) assert(self ~= nil)
66 89
 
... ... function Chorus.groupFrameMain(self)
90 113 --[[ NOTE: The order of switch cases in the macro is significant. The --[[ NOTE: The order of switch cases in the macro is significant. The
91 114 first match takes precedence. ]]-- first match takes precedence. ]]--
92 115
93 --[[ TODO Replace the arena conditional with actual arena frame, when implemented. ]]--
94 --[[ FIXME This does not work. ]]--
116 --[[ @todo Replace the arena conditional with actual arena frame, when implemented. ]]--
117 --[[ @fixme This does not work. ]]--
95 118 local secureCmd = [=[[@arena1,exists] ChorusPartyFrame; local secureCmd = [=[[@arena1,exists] ChorusPartyFrame;
96 119 [@raid26,exists][@raid31,exists][@raid36,exists] ChorusTinyRaidFrame; [@raid26,exists][@raid31,exists][@raid36,exists] ChorusTinyRaidFrame;
97 120 [@raid6,exists][@raid11,exists][@raid16,exists][@raid21,exists] ChorusSmallRaidFrame; [@raid6,exists][@raid11,exists][@raid16,exists][@raid21,exists] ChorusSmallRaidFrame;
 
... ... function Chorus.groupFrameMain(self)
103 126 `secureHandler` changes value, toggle all of the known raid frame `secureHandler` changes value, toggle all of the known raid frame
104 127 profiles, and only choose to show the most appropriate one. ]]-- profiles, and only choose to show the most appropriate one. ]]--
105 128
106 --[[ TODO Implement separate or additional arena unit group frame. ]]--
129 --[[ @todo Implement separate or additional arena unit group frame. ]]--
107 130 secureHandler:WrapScript(secureHandler, 'OnAttributeChanged', [[ secureHandler:WrapScript(secureHandler, 'OnAttributeChanged', [[
108 131 if name ~= 'state-group' then if name ~= 'state-group' then
109 132 return return
File src/ChorusPartyFrame.lua changed (mode: 100644) (index 97f9188..6685c3e)
1 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 2 @submodule chorus @submodule chorus
13 3 ]] ]]
14 4
 
... ... function Chorus.partyMemberFrameMain(partyMemberFrame)
93 83 partyMemberFrame:SetScript('OnAttributeChanged', partyMemberFrameInit) partyMemberFrame:SetScript('OnAttributeChanged', partyMemberFrameInit)
94 84 end end
95 85
86 --[[--
87 `ChorusPartyFrame` holds all frames necessary to show player's current party
88 members, if any.
89
90 It is intended to be disabled in raid groups.
91
92 Currently, it is also used in arenas.
93
94 Logic to toggle the frame is handled in a separate frame, that is
95 `ChorusGroupFrame`.
96
97 @function partyFrameMain
98 @tparam frame self this party frame
99 ]]
96 100 function Chorus.partyFrameMain(self) function Chorus.partyFrameMain(self)
97 101 assert(self ~= nil) assert(self ~= nil)
98 102 end end
File src/ChorusProgressFrameTemplate.lua changed (mode: 100644) (index aaf9335..0f20b9c)
1 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 2 @submodule chorus @submodule chorus
15 3 ]] ]]
16 4
 
... ... local CORPSE = CORPSE or 'CORPSE'
34 22 local DEAD = DEAD or 'DEAD' local DEAD = DEAD or 'DEAD'
35 23 local DEATH_RELEASE = DEATH_RELEASE or 'DEATH_RELEASE' local DEATH_RELEASE = DEATH_RELEASE or 'DEATH_RELEASE'
36 24 local PLAYER_OFFLINE = PLAYER_OFFLINE or 'PLAYER_OFFLINE' local PLAYER_OFFLINE = PLAYER_OFFLINE or 'PLAYER_OFFLINE'
37
25
38 26 local PowerBarColor = PowerBarColor local PowerBarColor = PowerBarColor
39 27 local RAID_CLASS_COLORS = RAID_CLASS_COLORS local RAID_CLASS_COLORS = RAID_CLASS_COLORS
40 28 local SecureButton_GetUnit = Chorus.test.SecureButton_GetUnit or SecureButton_GetUnit local SecureButton_GetUnit = Chorus.test.SecureButton_GetUnit or SecureButton_GetUnit
 
... ... local function applyOverlayHealthDeficit(self, a, b)
213 201 end end
214 202 end end
215 203
204 --[[--
205 Update this health frame with the state of the given unit.
206
207 @see FrameXML/GlobalStrings.lua:CORPSE
208
209 @function applyOverlayHealth
210 @tparam frame self this health frame
211 @tparam string unitDesignation given unit
212 ]]
216 213 local function applyOverlayHealth(self, unitDesignation) local function applyOverlayHealth(self, unitDesignation)
217 214 assert(self ~= nil) assert(self ~= nil)
218 215
 
... ... local function applyOverlayHealth(self, unitDesignation)
231 228 applyOverlay(self, a, b) applyOverlay(self, a, b)
232 229 applyOverlayHealthDeficit(self, a, b) applyOverlayHealthDeficit(self, a, b)
233 230 else else
234 --[[ TODO Separate health status bar and unit statues. ]]--
231 --[[ @todo Separate health status bar and unit statues. ]]--
235 232 local t = {self.label1, self.label2, self.label3} local t = {self.label1, self.label2, self.label3}
236 233 local i = 0 local i = 0
237 234 while (i < #t) do while (i < #t) do
 
... ... local function applyOverlayHealth(self, unitDesignation)
247 244 return return
248 245 end end
249 246
250 --[[ See `FrameXML/GlobalStrings.lua`. ]]--
251 247 local s = nil local s = nil
252 248 if UnitIsCorpse(unitDesignation) then if UnitIsCorpse(unitDesignation) then
253 249 s = '(' .. (CORPSE or 'CORPSE') .. ')' s = '(' .. (CORPSE or 'CORPSE') .. ')'
 
... ... local function applyOverlayHealth(self, unitDesignation)
256 252 elseif UnitIsDead(unitDesignation) then elseif UnitIsDead(unitDesignation) then
257 253 s = '(' .. (DEAD or 'DEAD') .. ')' s = '(' .. (DEAD or 'DEAD') .. ')'
258 254 elseif not UnitIsConnected(unitDesignation) then elseif not UnitIsConnected(unitDesignation) then
259 --[[ FIXME The 'Player offline' label is never rendered. ]]--
260 --[[ TODO Add separate offline indicator widget. ]]--
255 --[[ @fixme The 'Player offline' label is never rendered. ]]--
256 --[[ @todo Add separate offline indicator widget. ]]--
261 257 s = '(' .. (PLAYER_OFFLINE or 'PLAYER_OFFLINE') .. ')' s = '(' .. (PLAYER_OFFLINE or 'PLAYER_OFFLINE') .. ')'
262 258 end end
263 259 label1:SetText(s) label1:SetText(s)
 
... ... local function powerFrameEventProcessor(self, eventCategory, ...)
497 493 end end
498 494 end end
499 495
500 --[[ TODO Maybe make progress frame completely generic, by removing the unit field. ]]--
496 --[[--
497 `ChorusProgressFrameTemplate` is a generalization for health bars and power
498 (mana) bars.
499
500 The features are shared between both health and power bars, but there exist
501 separate corresponding templates: `ChorusHealthFrameTemplate` and
502 `ChorusPowerFrameTemplate`.
503
504 Frames that inherit from this template may define field `strategy`. This field
505 may be either `UnitIsFriend` or `UnitPowerType`. The bar will be colored by
506 either unit reaction to the player, or the power type (blue for mana, red for
507 rage, etc.).
508
509 @todo Maybe make progress frame completely generic, by removing the unit field.
510
511 @function progressFrameMain
512 ]]
501 513 function Chorus.progressFrameMain(self) function Chorus.progressFrameMain(self)
502 514 assert(self ~= nil) assert(self ~= nil)
503 515
File src/ChorusRaidTargetIconFrameTemplate.lua changed (mode: 100644) (index bd040cb..30d2496)
1 1 --[[-- --[[--
2 `ChorusRaidTargetIconFrameTemplate` shows the corresponding unit raid marker,
3 like {skull}, {diamond}, {moon}, {star}, etc.
4
5 2 @submodule chorus @submodule chorus
6 3 ]] ]]
7 4
 
... ... local function raidTargetIconFrameEventProcessor(self)
40 37 end end
41 38 end end
42 39
40 --[[--
41 `ChorusRaidTargetIconFrameTemplate` shows the corresponding unit raid marker,
42 like {skull}, {diamond}, {moon}, {star}, etc.
43
44 @function raidTargetIconFrameMain
45 @tparam frame self this raid target icon frame
46 ]]
43 47 function Chorus.raidTargetIconFrameMain(self) function Chorus.raidTargetIconFrameMain(self)
44 48 assert(self ~= nil) assert(self ~= nil)
45 49
File src/ChorusRangeFrameTemplate.lua changed (mode: 100644) (index 13286ca..50055e3)
1 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 2 @submodule chorus @submodule chorus
14 3 ]] ]]
15 4
 
... ... local MAX_SPELLS = MAX_SPELLS
20 9
21 10 local Chorus = Chorus local Chorus = Chorus
22 11
23 --[[ See ChorusRangeFrameTemplate.lua:function spellRangeMapUpdate. ]]--
24 --[[ See ChorusRangeFrameTemplate.lua:function rangeFrameUpdate. ]]--
12 --[[--
13 Map of localized spell names to their maximum reach in yards.
14
15 @table spellRangeMap
16 @see spellRangeMapUpdate
17 @see rangeFrameUpdate
18 ]]
25 19 local spellRangeMap = {} local spellRangeMap = {}
26 20
21 Chorus.spellRangeMap = spellRangeMap
22
23 --[[--
24 Read player spell book and initialize `spellRangeMap` appropriately.
25
26 @see FrameXML/SpellBookFrame.lua:MAX_SPELLS
27 @see spellRangeMap
28 @function spellRangeMapUpdate
29 ]]
27 30 local function spellRangeMapUpdate() local function spellRangeMapUpdate()
28 31 local maxSpells = MAX_SPELLS or 1024 local maxSpells = MAX_SPELLS or 1024
29 32 maxSpells = math.min(math.max(1, math.abs(math.floor(maxSpells)), 8192)) maxSpells = math.min(math.max(1, math.abs(math.floor(maxSpells)), 8192))
 
... ... local function spellRangeMapUpdate()
37 40 --[[ Get player spell book button number "i", and request it's --[[ Get player spell book button number "i", and request it's
38 41 corresponding spell name. This is NOT a unique spell corresponding spell name. This is NOT a unique spell
39 42 identifier. Every spell rank is a separate button. ]]-- identifier. Every spell rank is a separate button. ]]--
40 --[[ FIXME function GetSpellName is not available in Cata client. ]]--
43 --[[ @fixme function GetSpellName is not available in Cata client. ]]--
41 44 local spellName = GetSpellName(i, 'player') local spellName = GetSpellName(i, 'player')
42 45 if not spellName then if not spellName then
43 46 break break
 
... ... local function spellRangeMapUpdate()
90 93 spellRangeMap = buffer spellRangeMap = buffer
91 94 end end
92 95
96 --[[--
97 Update range frame to show approximate amount of yards to the given unit.
98
99 @see spellRangeMap
100
101 @function rangeFrameUpdate
102 @tparam frame self this range frame
103 ]]
93 104 local function rangeFrameUpdate(self) local function rangeFrameUpdate(self)
94 105 assert(self ~= nil) assert(self ~= nil)
95 106
 
... ... local function rangeFrameMain(self)
169 180 self:SetScript('OnUpdate', rangeFrameUpdateProcessor) self:SetScript('OnUpdate', rangeFrameUpdateProcessor)
170 181 end end
171 182
183 --[[--
184 `ChorusRangeFrameTemplate` displays approximate distance from player character
185 to the corresponding unit, in yards.
186
187 This works by checking the reach of each spell in the player's character's
188 current spell book. This ensures that the range approximation feature works in
189 any client, regardless of localization. This also allows the feature to span
190 several different WoW API interface versions more easily.
191
192 The spell range map is updated every time the player character learns a new
193 spell or enters the world.
194
195 @fixme Currently range indicator does not work in Cataclysm client (interface
196 40300). Specifically, `function GetSpellName` is not defined for that client.
197 Additionally, the current implementation may violate some additional
198 restrictions found in interface `40300` but not in interface `30300`.
199
200 @function rangeSpellMapFrameMain
201 @tparam frame self this spell map frame
202 ]]--
172 203 local function rangeSpellMapFrameMain(self) local function rangeSpellMapFrameMain(self)
173 204 assert(self ~= nil) assert(self ~= nil)
174 205
File src/ChorusTest.lua changed (mode: 100644) (index 37ae652..55426b9)
1 1 local Chorus = Chorus local Chorus = Chorus
2 2
3 --[[ FIXME Loading this snippet results in catastrophic failure at runtime. ]]--
4
5 3 --[[ NOTE SavedVariables do not work for this since they are loaded after all --[[ NOTE SavedVariables do not work for this since they are loaded after all
6 4 of the scripts and after all of the API was shadowed. Testing module must be of the scripts and after all of the API was shadowed. Testing module must be
7 5 loaded __before__ shadowing. See each individual script for details. ]]-- loaded __before__ shadowing. See each individual script for details. ]]--
 
... ... local function UnitAura_Mock(u, i, filter)
112 110 end end
113 111
114 112 local function UnitCastingInfo_Mock() local function UnitCastingInfo_Mock()
115 --[[ TODO UnitCastingInfo mock ]]--
113 --[[ @todo UnitCastingInfo mock ]]--
116 114 return return
117 115 end end
118 116
119 117 local function UnitChannelInfo_Mock() local function UnitChannelInfo_Mock()
120 --[[ TODO UnitChannelInfo mock ]]--
118 --[[ @todo UnitChannelInfo mock ]]--
121 119 return return
122 120 end end
123 121
File src/ChorusUnitBackdropTemplate.lua changed (mode: 100644) (index 3846583..995e7af)
... ... local function applyDefaultDimensionsIfNecessary(unitBackdrop)
108 108 end end
109 109 end end
110 110
111 --[[--
112 Initialize backdrop.
113
114 Unit backdrop frame is intended to be composed with unit frames and unit
115 buttons. It is intended to handle the render of tiled background and edge
116 textures.
117
118 @function unitBackdropMain
119 @tparam frame unitBackdrop this unit backdrop frame
120 ]]
111 121 function Chorus.unitBackdropMain(unitBackdrop) function Chorus.unitBackdropMain(unitBackdrop)
112 122 assert(unitBackdrop ~= nil) assert(unitBackdrop ~= nil)
113 123
File src/ChorusUnitBackgroundTemplate.lua changed (mode: 100644) (index 3e65797..0081d28)
1 --[[--
2 @submodule chorus
3 ]]
4
1 5 local UnitExists = Chorus.test.UnitExists or UnitExists local UnitExists = Chorus.test.UnitExists or UnitExists
2 6
3 7 local SecureButton_GetUnit = Chorus.test.SecureButton_GetUnit or SecureButton_GetUnit local SecureButton_GetUnit = Chorus.test.SecureButton_GetUnit or SecureButton_GetUnit
 
... ... local function unitBackgroundEventProcessor(unitBackground)
14 18 end end
15 19 end end
16 20
21 --[[--
22 Frame with simple texture that is toggled with the corresponding unit.
23
24 This frame is composed with unit frames and unit buttons.
25
26 @function unitBackgroundMain
27 @tparam frame unitBackground this unit background
28 ]]
17 29 local function unitBackgroundMain(unitBackground) local function unitBackgroundMain(unitBackground)
18 30 assert(unitBackground ~= nil) assert(unitBackground ~= nil)
19 31
File src/ChorusUnitButtonTemplate.lua changed (mode: 100644) (index b0765bb..077a287)
1 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 2 @submodule chorus @submodule chorus
8 3 ]] ]]
9 4
 
... ... local Chorus = Chorus
12 7 local GameTooltip = GameTooltip local GameTooltip = GameTooltip
13 8 local GameTooltipTextLeft1 = GameTooltipTextLeft1 local GameTooltipTextLeft1 = GameTooltipTextLeft1
14 9
15 --[[ See `FrameXML/UnitPopup.lua:UnitPopupFrames`. ]]--
16 10 local TargetFrameDropDown = TargetFrameDropDown local TargetFrameDropDown = TargetFrameDropDown
17 11 local PlayerFrameDropDown = PlayerFrameDropDown local PlayerFrameDropDown = PlayerFrameDropDown
18 12 local FocusFrameDropDown = FocusFrameDropDown local FocusFrameDropDown = FocusFrameDropDown
 
... ... local PartyMemberFrame2DropDown = PartyMemberFrame2DropDown
21 15 local PartyMemberFrame3DropDown = PartyMemberFrame3DropDown local PartyMemberFrame3DropDown = PartyMemberFrame3DropDown
22 16 local PartyMemberFrame4DropDown = PartyMemberFrame4DropDown local PartyMemberFrame4DropDown = PartyMemberFrame4DropDown
23 17
24 --[[ See `FrameXML/UIDropDownMenu.lua:function ToggleDropDownMenu`. ]]--
25 18 local ToggleDropDownMenu = ToggleDropDownMenu local ToggleDropDownMenu = ToggleDropDownMenu
26 19
27 20 local GameTooltip_SetDefaultAnchor = GameTooltip_SetDefaultAnchor local GameTooltip_SetDefaultAnchor = GameTooltip_SetDefaultAnchor
28 21 local GameTooltip_UnitColor = GameTooltip_UnitColor local GameTooltip_UnitColor = GameTooltip_UnitColor
29 22 local SecureButton_GetUnit = Chorus.test.SecureButton_GetUnit or SecureButton_GetUnit local SecureButton_GetUnit = Chorus.test.SecureButton_GetUnit or SecureButton_GetUnit
30 23
31 --[[ TODO Add incoming healing bar. ]]--
32 --[[ TODO Add incoming resurrection indicator. ]]--
33 --[[ FIXME Unclickable areas on screen again. ]]--
34
35 24 local function unitButtonLeaveProcessor() local function unitButtonLeaveProcessor()
36 25 assert(GameTooltip ~= nil) assert(GameTooltip ~= nil)
37 26
 
... ... local function contextMenuToggle(self, unitDesignation, buttonDesignation, butto
88 77 ToggleDropDownMenu(level, value, contextMenu, anchorName, offsetX, offsetY) ToggleDropDownMenu(level, value, contextMenu, anchorName, offsetX, offsetY)
89 78 end end
90 79
80 --[[--
81 `ChorusUnitButtonTemplate` handles only the secure, clickable portion of unit
82 buttons, and *none* of the visuals.
83
84 The root template for unit buttons is `ChorusUnitFrameTemplate`.
85
86 @todo Add incoming healing bar.
87 @todo Add incoming resurrection indicator.
88
89 @see FrameXML/UnitPopup.lua:UnitPopupFrames
90 @see FrameXML/UIDropDownMenu.lua:function ToggleDropDownMenu
91
92 @function unitButtonMain
93 @tparam frame self this unit button
94 ]]
91 95 function Chorus.unitButtonMain(self) function Chorus.unitButtonMain(self)
92 96 self:RegisterForClicks('AnyUp') self:RegisterForClicks('AnyUp')
93 97
 
... ... function Chorus.unitButtonMain(self)
99 103
100 104 self.menu = contextMenuToggle self.menu = contextMenuToggle
101 105
102 --[[ FIXME Selecting "Set focus" option in the context menu for Chorus
106 --[[ @fixme Selecting "Set focus" option in the context menu for Chorus
103 107 unit button results in permission violation exception (restricted unit button results in permission violation exception (restricted
104 108 execution environment issue). ]]-- execution environment issue). ]]--
105 109
File src/ChorusUnitFrameTemplate.lua changed (mode: 100644) (index 476cc5f..9a0d100)
1 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 2 @submodule chorus @submodule chorus
20 3 ]] ]]
21 4
 
... ... local function applyTOT(self)
61 44 end end
62 45
63 46 --[[ Notify backdrop to toggle visibility when appropriate. ]]-- --[[ Notify backdrop to toggle visibility when appropriate. ]]--
64 local backdropFrame = self.backdropFrame
47 local backdropFrame = self.backdropFrame
65 48 if backdropFrame then if backdropFrame then
66 49 local callback3 = backdropFrame:GetScript('OnEvent') local callback3 = backdropFrame:GetScript('OnEvent')
67 50 --[[ Skip checks and error handing for performance. ]]-- --[[ Skip checks and error handing for performance. ]]--
 
... ... local function applyUnitInRange(self)
88 71
89 72 --[[ Only apply transparency to select subset of children or referenced --[[ Only apply transparency to select subset of children or referenced
90 73 frames. Specifically exclude ChorusAuraTooltipFrame instances. ]]-- frames. Specifically exclude ChorusAuraTooltipFrame instances. ]]--
91 --[[ FIXME Performance abyslmal, probably issue here . ]]--
92 74
93 75 local healthFrame = self.healthFrame local healthFrame = self.healthFrame
94 76 local powerFrame = self.powerFrame local powerFrame = self.powerFrame
 
... ... local function attributeProcessor(self, name, value)
217 199 end end
218 200 end end
219 201
202 --[[--
203 `ChorusUnitFrameTemplate` is the root template for all unit button variations.
204
205 All widgets are conditionally included as children to instances of this
206 template. For example health bars, power bars, aura frames, combat indicator,
207 range indicator. These widgets are separated into their own templates.
208
209 The template is further specialized into the following profiles.
210
211 * `ChorusTinyUnitFrameTemplate`;
212 * `ChorusSmallUnitFrameTemplate`;
213 * `ChorusLargeUnitFrameTemplate`;
214 * `ChorusHugeUnitFrameTemplate`;
215
216 When instancing a unit button, one of these specializations is to be used.
217
218 Group frame templates may define further specialized templates.
219
220 @function unitFrameMain
221 ]]
220 222 local function unitFrameMain(self) local function unitFrameMain(self)
221 223 assert(self ~= nil) assert(self ~= nil)
222 224
File src/ChorusUnitGroupRoleFrameTemplate.lua changed (mode: 100644) (index 5dd9745..c43d488)
1 --[[--
2 @submodule chorus
3
4 @todo Since `function UnitSetRole` is backported, implement mechanism to set it
5 automatically, inferred from talents.
6 ]]
7
1 8 local Chorus = Chorus local Chorus = Chorus
2 9
3 10 local strtrim = strtrim local strtrim = strtrim
 
... ... local fallbackRoleMap
12 19
13 20 local cache = {} local cache = {}
14 21
15 --[[ TODO Since `function UnitSetRole` is backported, implement mechanism to
16 set it automatically, inferred from talents. ]]--
17
18 22 local function updateEveryRoleWidget() local function updateEveryRoleWidget()
19 23 assert(cache ~= nil) assert(cache ~= nil)
20 24 assert('table' == type(cache)) assert('table' == type(cache))
 
... ... using this function.
39 43 It is expected from the user to call this function manually or at least It is expected from the user to call this function manually or at least
40 44 explicitly with a thin layer of graphical buttons. explicitly with a thin layer of graphical buttons.
41 45
42 @function Chorus.UnitSetRole
46 @function UnitSetRole
47 @tparam string unitDesignation unit to which assign the role
48 @tparam string unitDesignation either `DAMAGER`, `HEALER` or `TANK`
49 @treturn bool
43 50 ]] ]]
44 51 function Chorus.UnitSetRole(unitDesignation, roleDesignation) function Chorus.UnitSetRole(unitDesignation, roleDesignation)
45 52 assert(unitDesignation ~= nil) assert(unitDesignation ~= nil)
 
... ... do
82 89 end end
83 90 end end
84 91
92 --[[--
93 Query the role designation of the given unit.
94
95 This function is intended to work for both Cataclysm and Wrath clients equally.
96
97 First, this function will query the game with native API. Second, if there is a
98 override explicitly set by the user, the function will evaluate the override.
99
100 @function getUnitGroupRoleDesignation
101 @tparam string unitDesignation unit to query the role of
102 @treturn string either `TANK`, `HEALER` or `DAMAGER`.
103 ]]
85 104 local function getUnitGroupRoleDesignation(unitDesignation) local function getUnitGroupRoleDesignation(unitDesignation)
86 105 assert(unitDesignation ~= nil) assert(unitDesignation ~= nil)
87 106 assert('string' == type(unitDesignation)) assert('string' == type(unitDesignation))
 
... ... local function roleMapFrameMain(self)
203 222 end) end)
204 223 end end
205 224
206 local function main(self)
225 --[[--
226 @function unitGroupRoleFrameMain
227 @tparam frame self this unit group role frame
228 ]]
229 local function unitGroupRoleFrameMain(self)
207 230 assert(self ~= nil) assert(self ~= nil)
208 231
209 232 local artwork = _G[self:GetName() .. 'Artwork'] local artwork = _G[self:GetName() .. 'Artwork']
 
... ... Chorus.unitGroupRoleMapFrameMain = function(...)
224 247 return roleMapFrameMain(...) return roleMapFrameMain(...)
225 248 end end
226 249 Chorus.unitGroupRoleFrameMain = function(...) Chorus.unitGroupRoleFrameMain = function(...)
227 return main(...)
250 return unitGroupRoleFrameMain(...)
228 251 end end
File src/ChorusUnitLevelFrameTemplate.lua changed (mode: 100644) (index d22d8b7..58d580e)
1 1 --[[-- --[[--
2 `ChorusUnitLevelFrameTemplate` shows the number of corresponding unit's level,
3 conditionally decorated for elite and rare enemies.
4
5 2 @submodule chorus @submodule chorus
6 3 ]] ]]
7 4
 
... ... local function unitLevelFrameEventProcessor(self, eventCategory, ...)
114 111 applyUnitLevel(self, u) applyUnitLevel(self, u)
115 112 end end
116 113
114 --[[--
115 `ChorusUnitLevelFrameTemplate` shows the number of corresponding unit's level,
116 conditionally decorated for elite and rare enemies.
117
118 @function unitLevelFrameMain
119 @tparam frame self this unit level frame
120 ]]
117 121 local function unitLevelFrameMain(self) local function unitLevelFrameMain(self)
118 122 assert(self ~= nil) assert(self ~= nil)
119 123
File src/ChorusUnitNameFrameTemplate.lua changed (mode: 100644) (index cdd27c9..3cab8c4)
1 1 --[[-- --[[--
2 `ChorusUnitNameFrameTemplate` shows corresponding unit's human readable
3 localized name, conditionally color coded.
4
5 2 @submodule chorus @submodule chorus
6 3 ]] ]]
7 4
 
... ... local UnitName = Chorus.test.UnitName or UnitName
16 13 local RAID_CLASS_COLORS = RAID_CLASS_COLORS local RAID_CLASS_COLORS = RAID_CLASS_COLORS
17 14 local SecureButton_GetUnit = Chorus.test.SecureButton_GetUnit or SecureButton_GetUnit local SecureButton_GetUnit = Chorus.test.SecureButton_GetUnit or SecureButton_GetUnit
18 15
16 --[[--
17 Update this unit name frame.
18
19 @see FrameXML/Constants.lua:RAID_CLASS_COLORS
20 @function unitNameEventProcessor
21 @tparam frame self this unit name frame
22 ]]
19 23 local function unitNameEventProcessor(self) local function unitNameEventProcessor(self)
20 24 assert(self ~= nil) assert(self ~= nil)
21 25
 
... ... local function unitNameEventProcessor(self)
69 73 label:SetTextColor(r, g, b) label:SetTextColor(r, g, b)
70 74 end end
71 75
76 --[[--
77 `ChorusUnitNameFrameTemplate` shows corresponding unit's human readable
78 localized name, conditionally color coded.
79
80 @function unitNameFrameMain
81 @tparam frame self this unit name frame
82 ]]
72 83 function Chorus.unitNameFrameMain(self) function Chorus.unitNameFrameMain(self)
73 84 assert(self ~= nil) assert(self ~= nil)
74 85
 
... ... function Chorus.unitNameFrameMain(self)
76 87 assert(label ~= nil) assert(label ~= nil)
77 88 self.label = label self.label = label
78 89
79 --[[ FIXME Sometimes some unit buttons in raid frames cannot be clicked. ]]--
90 --[[ @fixme Sometimes some unit buttons in raid frames cannot be clicked. ]]--
80 91 self:SetScript('OnEvent', unitNameEventProcessor) self:SetScript('OnEvent', unitNameEventProcessor)
81 92
82 93 self:RegisterEvent('PARTY_CONVERTED_TO_RAID') self:RegisterEvent('PARTY_CONVERTED_TO_RAID')
File src/local.lua changed (mode: 100644) (index 09903a4..8063a14)
... ... frames.
14 14 Every key is a localized aura name, that `function UnitAura` will accept. Every key is a localized aura name, that `function UnitAura` will accept.
15 15
16 16 Every value is a positive integer in [1,9], that is the weight. The larger the 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.
17 weight, the higher the priority the given aura will be shown before others.
18 18
19 19 This map should be overriden for every game client localization. Only localized This map should be overriden for every game client localization. Only localized
20 20 aura names are accepted by the game API. It is much more convenient to list aura names are accepted by the game API. It is much more convenient to list
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