2021-06-30 16:34:34 -07:00
|
|
|
{{
|
|
|
|
const dotUtils = require('./dotUtils.js');
|
|
|
|
const gameModes = require('./.gameModes.json');
|
|
|
|
}}{{= dotUtils.preamble() }}
|
|
|
|
|
2022-06-20 20:43:15 -07:00
|
|
|
use strum_macros::{ EnumString, EnumVariantNames, IntoStaticStr };
|
2021-06-30 16:34:34 -07:00
|
|
|
|
|
|
|
/// League of Legends game mode, such as Classic,
|
|
|
|
/// ARAM, URF, One For All, Ascension, etc.
|
|
|
|
#[non_exhaustive]
|
2021-06-30 19:35:08 -07:00
|
|
|
#[derive(Debug, Clone)]
|
2021-06-30 16:34:34 -07:00
|
|
|
#[derive(Eq, PartialEq, Hash)]
|
2022-06-20 20:43:15 -07:00
|
|
|
#[derive(EnumString, EnumVariantNames, IntoStaticStr)]
|
2021-06-30 16:34:34 -07:00
|
|
|
#[repr(u8)]
|
|
|
|
pub enum GameMode {
|
2022-02-08 17:17:47 -08:00
|
|
|
/// Catch-all variant for new, unknown game modes.
|
2021-06-30 19:35:08 -07:00
|
|
|
#[strum(default)]
|
|
|
|
UNKNOWN(String),
|
|
|
|
|
2021-06-30 16:34:34 -07:00
|
|
|
{{
|
|
|
|
for (const e of gameModes) {
|
|
|
|
const desc = e['x-desc'] ? e['x-desc'].split('\n') : [];
|
|
|
|
}}
|
|
|
|
{{~ desc :line }}
|
|
|
|
/// {{= line }}
|
|
|
|
{{~}}
|
|
|
|
{{= e['x-name'] }},
|
|
|
|
{{
|
|
|
|
}
|
|
|
|
}}
|
|
|
|
}
|
|
|
|
|
2022-06-20 10:04:02 -07:00
|
|
|
serde_strum_unknown!(GameMode);
|