feat(infobox): show platform on valorant
Summary
Adds platform param to use for Console tournaments (by default set to PC)
There has been discussion in the Valorant channel about whether or not they should cover Console tournaments since they don't have a way to differentiate. Convo: https://discord.com/channels/93055209017729024/684060921898860569/1270099131913867284
I will open this pr then ask the Valorant channel if they want any other aliases added (imo it is best just to use 1)
How did you test this change?
dev
imo
- parse it in
customParseArguments(kick the lookup function altogether)
Which function should I use to set the default platform?
- use self.data.platform from there
- build the cell directly in parse instead of an extra function
Cell{name = 'Platform', content = {PageLink.makeInternalLink( caller.data.platform, caller.data.platform and (':Category:' .. caller.data.platform) or nil) }},
caller is supposed to be set to self, right?
- why not store it in lpdb (extradata)?
Not sure I did this right
- the category building you do doesn't make much sense, rather use
function CustomLeague:getWikiCategories(args) return Array.append({self.data.platform .. ' Tournaments'}, Logic.readBool(args.female) and 'Female Tournaments' or nil, ) end
Tests aren't working so I know I messed something up
Got it to function but not as intended. I didn't really do the display right, it doesn't pick up on PLATFORMS i.e. console = console instead of console = Console (with caps)
Test still failing at Line 71: attempt to index field 'data' (a nil value)
All tests pass, thanks Hjp
I will open this pr then ask the Valorant channel if they want any other aliases added (imo it is best just to use 1)
No aliases is preferred, it just creates headaches later on
I'll wait to merge this until there are console tournaments live on the wiki
Closing as stale, feel free to reopen is that changes