feat(Infobox): Delta Force Infobox league#7442
Conversation
|
Export has been ticketed, so I should mark this as green ahead. |
| league.args.mode = MODES[(league.args.mode or 'default'):lower():gsub(' ', '')] | ||
| league.args.platform = PLATFORMS[(league.args.platform or 'default'):lower():gsub(' ', '')] |
There was a problem hiding this comment.
Entering an invalid platform or mode will cause a run time error here
There was a problem hiding this comment.
what should I fix here to prevent that? (I tried throw janky inputs to test it out but neither returns error on display, the input just vanished because it doesnt recognize one)
| args.mode and (args.mode .. ' Competitions') or 'Tournaments without specified mode', | ||
| args.platform and (args.platform .. ' Tournaments') or 'Tournaments on unknown platforms', |
There was a problem hiding this comment.
With the parsing in the beginining, the fallbacks can never happen right?
There was a problem hiding this comment.
With the current setup in PR if I input a platform that is not listed, it will return the fallbacks (the default text I set here), if the input is just simply unset it goes to default
what should I do here?
…bump back to default instead
There was a problem hiding this comment.
Pull request overview
Adds a Delta Force–specific Infobox/League/Custom module to tailor the generic league infobox to this wiki’s needs (mode, platform, patch, and an optional maps section).
Changes:
- Introduces mode/platform normalization and displays them as custom infobox cells.
- Adds an optional “Maps” block sourced from
|map...arguments. - Adds a “Patch” cell under the
gamesettingscustomizable section and wiki-specific categories.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| local PLATFORMS = { | ||
| pc = 'PC', | ||
| mobile = 'Mobile', | ||
| cross = 'Cross-Platform', | ||
| default = 'Unknown', | ||
| } | ||
|
|
||
| local MODES = { | ||
| wf = 'Warfare', | ||
| op = 'Operations', | ||
| default = 'Unknown', | ||
| } |
| league.args.mode = MODES[(league.args.mode or ''):lower():gsub(' ', '')] or MODES.default | ||
| league.args.platform = PLATFORMS[(league.args.platform or ''):lower():gsub(' ', '')] or PLATFORMS.default |
| elseif id == 'customcontent' then | ||
| if Logic.isEmpty(args.map1) then return end | ||
| local gameSuffix = Logic.isNotEmpty(args.game) and ('/' .. args.game) or '' | ||
| local maps = self.caller:getAllArgsForBase(args, 'map') | ||
| table.sort(maps) |
| ---@param id string | ||
| ---@param widgets Widget[] | ||
| ---@return Widget[] | ||
| function CustomInjector:parse(id, widgets) |
| function CustomLeague:getWikiCategories(args) | ||
| return { | ||
| args.mode and (args.mode .. ' Competitions'), | ||
| args.platform and (args.platform .. ' Tournaments'), | ||
| } | ||
| end |
| ---@param args table | ||
| ---@return string? | ||
| function CustomLeague:_createPatchCell(args) |
| ---@param frame Frame | ||
| ---@return Widget | ||
| function CustomLeague.run(frame) |




Summary
Update of June 2026: This is now in use for the actual wiki
DF's InfoLeague needs are: Modes Platforms and Patch
What I did in this version here is mostly patching how these three are done in other wikis together and maybe adjust it a bit. So will still need help here (maybe this is one is cleaner vs the previous)
Test
LIVE