mirror of https://github.com/MingweiSamuel/Riven
26 lines
523 B
Plaintext
26 lines
523 B
Plaintext
{{
|
|
const dotUtils = require('./dotUtils.js');
|
|
const maps = require('./.maps.json');
|
|
}}{{= dotUtils.preamble() }}
|
|
|
|
use serde::{ Serialize, Deserialize };
|
|
|
|
newtype_enum! {
|
|
/// A League of Legends map.
|
|
#[derive(Serialize, Deserialize)]
|
|
#[serde(transparent)]
|
|
pub newtype_enum Map(u8) {
|
|
{{
|
|
for (const e of maps) {
|
|
const desc = e['x-desc'] ? e['x-desc'].split('\n') : [];
|
|
}}
|
|
{{~ desc :line }}
|
|
/// {{= line }}
|
|
{{~}}
|
|
{{= e['x-name'] }} = {{= e['x-value'] }},
|
|
{{
|
|
}
|
|
}}
|
|
}
|
|
}
|