Riven/riven/srcgen/consts/val_queue.rs.dt

33 lines
746 B
Plaintext
Raw Normal View History

2024-04-22 03:13:26 +00:00
{{
const dotUtils = require('./dotUtils.js');
const valQueues = require('./.valQueues.json');
}}{{= dotUtils.preamble() }}
use strum_macros::{ EnumString, EnumVariantNames, IntoStaticStr };
/// Valorant queue string IDs.
#[non_exhaustive]
#[derive(Debug, Clone)]
#[derive(Eq, PartialEq, Hash)]
#[derive(EnumString, EnumVariantNames, IntoStaticStr)]
#[repr(u8)]
pub enum ValQueue {
/// Catch-all variant for new, unknown queue IDs.
#[strum(default)]
UNKNOWN(String),
{{
for (const e of valQueues) {
const desc = e['x-desc'] ? e['x-desc'].split('\n') : [];
}}
{{~ desc :line }}
/// {{= line }}
{{~}}
{{= e['x-name'] }} = {{= JSON.stringify(e['x-value']) }},
{{
}
}}
}
serde_strum_unknown!(ValQueue);