/
otherworlds.go
239 lines (235 loc) · 4.59 KB
/
otherworlds.go
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
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
package comic
import "strings"
// universeDefinition is a definition for main and alternate universes.
type universeDefinition string
var (
// dcAltUniverses defines the alternate universes for DC.
// Unfortunately have to define all possible alternate universes versus just Earth-0, etc.,
// since there's no indicator for main sources.
dcAltUniverses = []universeDefinition{
"Animated",
"New Frontier",
"Kingdom Come",
"(2%)",
"Beyond",
"Bombshells",
"Earth -44",
"Earth -32",
"Earth -13",
"Earth-16", // The Just
"The Just",
"Earth-14", // Assassins
"Assassins",
"Earth-15", // Legacy Earth
"Legacy Earth",
"Earth-17", // Dystopia
"Dystopia",
"Earth-18",
"Justice Riders",
"Earth-19", // Gotham By Gaslight
"Gaslight",
"Earth One",
"Earth-1",
"Earth 1", // All Earth*1xx
"Earth-2",
"Earth 2", // All Earth*2xx
"Earth 3", // All Earth*3xx
"Earth-3",
"All-Star",
"Thrillkiller",
"All-Star",
"Earth-4",
"Liberty Files",
"Metal Men",
"Earth-5",
"Earth 5",
"Utopia",
"Earth 9",
"Earth-9",
"Tangent",
"Earth-A",
"Earth-S",
"Earth-X",
"Lawless League",
"Reverse Gender",
"Lawless League",
"Injustice",
"JL%3000",
"Just Imagine",
"Li'l Gotham",
"New Order",
"One Million",
"Pax",
"Polyester Age",
"Smallville",
"Titans",
"non-continuity",
"Batman '66",
"Arkhamverse",
"Digital Justice",
"First Wave",
"Gotham City Garage",
"White Knight",
"Century",
"Beware",
"Amalgam",
"Ame-Comi",
"Arrowverse",
"Arrow/Flash",
"(Arrow)",
"cartoon",
"Legion - 5 Years",
"DKR",
"Future's End",
"Generation Lost",
"Matrix",
"Pocket",
"Golden Age",
"'77",
"Superman Red",
"Superman Blue",
"Superboy",
"Secret Identity",
}
// marvelAltUniverses defines the alternate universes of the MU.
// Unfortunately have to define all possible alternate universes versus just 616
// since there's no indicator for 616 sources.
marvelAltUniverses = []universeDefinition{
"earth-",
"2020",
"2099",
"26th Century",
"Agent of Hydra",
"100th Anniversary",
"A-Babies",
"(Marvel)(Adventures)",
"Animated",
"Cancerverse",
"Earth X",
"Bullet Points",
"Undead",
"Knowhere",
"Mangaverse",
"Mini Marvels",
"Movies",
"Noir",
"Last Gun on Earth",
"Super Hero Squad",
"Next Avengers",
"Timeslip",
"Ultimate",
"MC2",
"Mutant X",
"20xx",
"(Marvel)(Spider-Gwen)",
"Battle of the Atom",
"E is for Extincti",
"Exiles",
"Egyptia",
"(Marvel)(Forward)",
"Old Man Logan",
"Old Woman Laura",
"X-Campus",
"(Secret War)(Limbo)",
"Age Of Apocalypse",
"Age of Ultron",
"Apes",
"Age of X",
"venomverse",
"India",
"Mitey 'vengers",
"2211",
"X-Men The End",
"1872",
"1602",
"Inferno",
"Mutopia",
"2055",
"Babies",
"Mojoverse",
"Killville",
"What If",
"Spider-Verse",
"Shadow-X",
"Days Of",
"Omega World",
"Killiseum",
"a-force",
"1,000,000 B.C.",
"Guardians 3000",
"Armor Wars",
"Secret Wars",
"Future Imperfect",
"Dystopia",
"Children's Crusade Future",
"X-Tinction Agenda",
"Renew Your Vow",
"Hex-men",
"scorched earth",
"(Thors)",
"(Heroes Reborn)",
"Years of Future",
"newuniversal",
"spider-island",
"Contest of Champions",
"(Deadpool ",
"5 Ronin",
"Ghost Racers",
"Spirit of Vengeance",
"x-men forever",
"(Red Skull)",
"(Robot)",
"cartoon",
"(Spider-Woman)",
"Attilan Rising",
"PS4",
"Hail Hydra",
"Spider-Island",
"Zombies",
"Howard the Human",
"Battleworld",
"Mesozic",
"(Earth",
"Age of X-Man",
"Spider-Man Unlimited",
"No More",
"Life Story",
"18th Century",
"Renew",
}
// marvelDisabledUniverses defines the universes that should be disabled for character sources.
marvelDisabledUniverses = []universeDefinition{
"A.I.vengers",
"imposter",
"impostor",
"Kree Avengers",
"mutate",
"clone",
}
// dcDisabledUniverses defines the sources that should be disabled for DC characters.
dcDisabledUniverses = []universeDefinition{
"clone",
"fake",
"robot",
"villain",
"vampire",
}
// actual clones/robots/vampires that shouldn't have their sources disabled lol.
ignoreIDsForDisabled = map[uint]bool{
561: true, // Madelyne Pryor
}
)
// pgSearchString returns a string suitable for a postgres array.
func pgSearchString(ud []universeDefinition) string {
str := ""
for idx := range ud {
// escape single `'` to `''` so it works with postgres.
str += "'%" + strings.Replace(string(ud[idx]), "'", "''", -1) + "%'"
// if not last one or it doesn't have only one item
if len(ud)-1 != idx {
// append a comma
str += ","
}
}
return str
}