forked from mirror/Riven
1
0
Fork 0
Riven/riven/srcgen/consts/map.rs.dt

26 lines
523 B
Plaintext
Raw Normal View History

2021-06-30 23:34:34 +00:00
{{
const dotUtils = require('./dotUtils.js');
const maps = require('./.maps.json');
}}{{= dotUtils.preamble() }}
use serde::{ Serialize, Deserialize };
2021-06-30 23:34:34 +00:00
newtype_enum! {
/// A League of Legends map.
#[derive(Serialize, Deserialize)]
#[serde(transparent)]
pub newtype_enum Map(u8) {
2021-06-30 23:34:34 +00:00
{{
for (const e of maps) {
const desc = e['x-desc'] ? e['x-desc'].split('\n') : [];
}}
{{~ desc :line }}
/// {{= line }}
2021-06-30 23:34:34 +00:00
{{~}}
{{= e['x-name'] }} = {{= e['x-value'] }},
2021-06-30 23:34:34 +00:00
{{
}
}}
}
2021-06-30 23:34:34 +00:00
}