-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCore.lua
More file actions
163 lines (157 loc) · 3.74 KB
/
Copy pathCore.lua
File metadata and controls
163 lines (157 loc) · 3.74 KB
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
local _, ns = ...
local L = ns.L
local localeMap = {
enUS = "English",
deDE = "Deutsch",
esES = "Español",
esMX = "Español",
frFR = "Français",
itIT = "Italiano",
koKR = "한국어",
ptBR = "Português",
ruRU = "Русский",
zhCN = "简体中文",
zhTW = "繁體中文",
}
local heroes = {
Announcer = "Athena",
Ana = "Ana",
Anran = "Anran",
Ashe = "Ashe",
Baptiste = "Baptiste",
Bastion = "Bastion",
Brigitte = "Brigitte",
McCree = "Cassidy",
DVa = "D.Va",
Domina = "Domina",
Doomfist = "Doomfist",
Echo = "Echo",
Emre = "Emre",
Freja = "Freja",
Genji = "Genji",
Hanzo = "Hanzo",
Hazard = "Hazard",
Illari = "Illari",
JetpackCat = "Jetpack Cat",
JunkerQueen = "Junker Queen",
Junkrat = "Junkrat",
Juno = "Juno",
Kiriko = "Kiriko",
Lifeweaver = "Lifeweaver",
Lucio = "Lúcio",
Mauga = "Mauga",
Mei = "Mei",
Mercy = "Mercy",
Mizuki = "Mizuki",
Moira = "Moira",
Orisa = "Orisa",
Pharah = "Pharah" ,
Ramattra = "Ramattra",
Reaper = "Reaper",
Reinhardt = "Reinhardt",
Roadhog = "Roadhog",
Shion = "Shion",
Sierra = "Sierra",
Sigma = "Sigma",
Sojourn = "Sojourn",
Soldier76 = "Soldier: 76",
Sombra = "Sombra",
Symmetra = "Symmetra",
Torbjorn = "Torbjörn",
Tracer = "Tracer",
Vendetta = "Vendetta",
Venture = "Venture",
Widowmaker = "Widowmaker",
Winston = "Winston",
WreckingBall = "Wrecking Ball",
Wuyang = "Wuyang",
Zarya = "Zarya",
Zenyatta = "Zenyatta",
}
-- After Sigma, all the countdowns were changed to 3..2..1 :\
local five = {
Announcer = true,
Ana = true,
Ashe = true,
Baptiste = true,
Bastion = true,
Brigitte = true,
McCree = true,
DVa = true,
Doomfist = true,
Genji = true,
Hanzo = true,
Junkrat = true,
Lucio = true,
Mei = true,
Mercy = true,
Moira = true,
Orisa = true,
Pharah = true,
Reaper = true,
Reinhardt = true,
Roadhog = true,
Sigma = true,
Soldier76 = true,
Sombra = true,
Symmetra = true,
Torbjorn = true,
Tracer = true,
Widowmaker = true,
Winston = true,
WreckingBall = true,
Zarya = true,
Zenyatta = true,
}
local function register(locale)
local lang = localeMap[locale]
local path = "Interface\\AddOns\\BigWigs_Countdown_Overwatch\\"..locale.."\\%s_%d.ogg"
local key = locale ~= "enUS" and L.key or "%s: Overwatch: %s"
for k, v in next, heroes do
local id = ("%s: Overwatch: %s"):format(lang, k)
local name = key:format(lang, locale ~= "enUS" and L[k] or v)
if k == "Bastion" then
-- Bastion beeps and boops are the same for all locales
BigWigsAPI:RegisterCountdown(id, name, {
"Interface\\AddOns\\BigWigs_Countdown_Overwatch\\enUS\\Bastion_1.ogg",
"Interface\\AddOns\\BigWigs_Countdown_Overwatch\\enUS\\Bastion_2.ogg",
"Interface\\AddOns\\BigWigs_Countdown_Overwatch\\enUS\\Bastion_3.ogg",
"Interface\\AddOns\\BigWigs_Countdown_Overwatch\\enUS\\Bastion_4.ogg",
"Interface\\AddOns\\BigWigs_Countdown_Overwatch\\enUS\\Bastion_5.ogg",
})
elseif k == "JetpackCat" then
-- Jetpack Cat meows are the same for all locales
BigWigsAPI:RegisterCountdown(id, ("%s [3]"):format(name), {
"Interface\\AddOns\\BigWigs_Countdown_Overwatch\\enUS\\JetpackCat_1.ogg",
"Interface\\AddOns\\BigWigs_Countdown_Overwatch\\enUS\\JetpackCat_2.ogg",
"Interface\\AddOns\\BigWigs_Countdown_Overwatch\\enUS\\JetpackCat_3.ogg",
false,
false,
})
elseif five[k] then
BigWigsAPI:RegisterCountdown(id, name, {
path:format(k, 1),
path:format(k, 2),
path:format(k, 3),
path:format(k, 4),
path:format(k, 5),
})
else
BigWigsAPI:RegisterCountdown(id, ("%s [3]"):format(name), {
path:format(k, 1),
path:format(k, 2),
path:format(k, 3),
false,
false,
})
end
end
end
local locale = GetLocale()
if not localeMap[locale] then
locale = "enUS"
end
register(locale)
if locale ~= "enUS" then
register("enUS")
end