mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-03-21 17:25:10 -05:00
Fix /formathelp for past-gen formats
NatDex Mod refactor caught a bug. `format.gen` isn't meaningful. ...maybe it should be... Main concern would be perf impact, to load all the datamods to get their gen. Probably not worth it?
This commit is contained in:
parent
d5f4cbf053
commit
74aa072bfb
|
|
@ -1944,7 +1944,8 @@ export const commands: Chat.ChatCommands = {
|
|||
descHtml.push(...format.threads);
|
||||
} else {
|
||||
const genID = ['rb', 'gs', 'rs', 'dp', 'bw', 'xy', 'sm', 'ss', 'sv'];
|
||||
descHtml.push(`This format has no resources linked on its <a href="https://www.smogon.com/dex/${genID[format.gen - 1] || 'sv'}/formats/">Smogon Dex page</a>. ` +
|
||||
const gen = Dex.forFormat(format).gen;
|
||||
descHtml.push(`This format has no resources linked on its <a href="https://www.smogon.com/dex/${genID[gen - 1] || 'sv'}/formats/">Smogon Dex page</a>. ` +
|
||||
`Please contact a <a href="https://www.smogon.com/forums/forums/757/">C&C Leader</a> to resolve this. ` +
|
||||
`Alternatively, if this format can't have a page on the Smogon Dex, message <username>dhelmise</username>.<br />`);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user