Fix quality serialization
This commit is contained in:
parent
06b01c2fe4
commit
65e2c03824
3 changed files with 15 additions and 3 deletions
|
|
@ -83,6 +83,17 @@ impl Serialize for SerializeEntityWrapper<'_> {
|
|||
|
||||
entity_map.serialize_entry("position", &SerializePosition(self.1.position))?;
|
||||
|
||||
let quality = match self.1.quality {
|
||||
super::Quality::Normal => None,
|
||||
super::Quality::Uncommon => Some("uncommon"),
|
||||
super::Quality::Rare => Some("rare"),
|
||||
super::Quality::Epic => Some("epic"),
|
||||
super::Quality::Legendary => Some("legendary"),
|
||||
};
|
||||
if let Some(quality) = quality {
|
||||
entity_map.serialize_entry("quality", quality)?;
|
||||
}
|
||||
|
||||
if self.1.direction.get_index() != 0 {
|
||||
entity_map.serialize_entry("direction", &self.1.direction.get_index())?;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue