Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add deadlock heroes to POTM selector #277

Merged
merged 3 commits into from
Oct 23, 2024
Merged

Conversation

MrLotU
Copy link
Contributor

@MrLotU MrLotU commented Oct 23, 2024

No description provided.

@slmnio
Copy link
Owner

slmnio commented Oct 23, 2024

See

heroes() {
return (ReactiveRoot("Heroes", {
"ids": ReactiveArray("ids")
})?.ids || []).filter(hero => this.game ? hero.game === this.game : true);
},
heroOptions() {
return [
{ value: null, text: "No hero" },
...(
this.game !== "Overwatch" ?
(this.heroes || []).sort((a,b) => sortAlpha(a?.name, b?.name)).map(h => ({
text: h.name,
value: dirtyID(h.id)
}))
:
["DPS", "Tank", "Support"].map(key => ({
text: key,
options: (this.heroes || []).filter(h => h.role === key).sort((a,b) => sortAlpha(a?.name, b?.name)).map(h => ({
text: h.name,
value: dirtyID(h.id)
}))
}))
)
];
}
for non-Overwatch implementation. Both that and this selector should probably have an extra case to show all heroes grouped by game if there's none that match (either game not specified or no heroes for specified game)

Copy link
Owner

@slmnio slmnio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good enough to me

@slmnio slmnio merged commit ebf73c9 into slmnio:master Oct 23, 2024
2 checks passed
@MrLotU MrLotU deleted the deadlock_potm branch October 23, 2024 03:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants