Skip to content

Commit

Permalink
Take game into account like civilized muppets
Browse files Browse the repository at this point in the history
  • Loading branch information
MrLotU committed Oct 23, 2024
1 parent a7160f3 commit 1c034bb
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,12 @@ export default {
const heroes = (ReactiveRoot("Heroes", {
"ids": ReactiveArray("ids")
})?.ids || []);
return [
return this.broadcast.event.game !== "Overwatch" ? [{ value: null, text: "No hero" }, ...heroes.filter(h => h.game === this.broadcast.event.game).map((h) => ({
text: h.name,
value: h.id
}))] : [
{ value: null, text: "No hero" },
...["DPS", "Tank", "Support", "Deadlock"].map(key => ({
...["DPS", "Tank", "Support"].map(key => ({
text: key,
options: heroes.filter(h => h.role === key).sort((a,b) => sortAlpha(a?.name, b?.name)).map(h => ({
text: h.name,
Expand Down

0 comments on commit 1c034bb

Please sign in to comment.