Making this an internally-tageed union is going to be nicer for the
JS, which then doesn't have to prat about with Object.keys(thing)[0]
etc.
And the special rendering is Die, not DieCooldown, since if dice get a
second kind of special rendering thta will have to be here too.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
#[throws(IE)]
fn special(&self) -> Option<SpecialClientRendering> {
- Some(SpecialClientRendering::DieCooldown)
+ Some(SpecialClientRendering::Die{})
}
}
const DEFKEY_FLIP: UoKey = 'f';
#[derive(Serialize,Debug)]
+#[serde(tag="kind")]
pub enum SpecialClientRendering {
- DieCooldown
+ Die { },
}
#[derive(Debug,Clone)]