feat(api): ✨ add world event serialization
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
This commit is contained in:
parent
5dcb5819c7
commit
8a4e407d42
1 changed files with 16 additions and 0 deletions
|
|
@ -6674,6 +6674,22 @@ fn chronicle_entry_to_dict(entry: &ChronicleEntry) -> Dictionary {
|
|||
d.set("r", position.r as i64);
|
||||
d.set("pop", *pop as i64);
|
||||
}
|
||||
ChronicleEntry::WorldEvent {
|
||||
turn,
|
||||
category,
|
||||
kind,
|
||||
col,
|
||||
row,
|
||||
severity_milli,
|
||||
} => {
|
||||
d.set("event", "world_event");
|
||||
d.set("turn", *turn as i64);
|
||||
d.set("category", category.clone());
|
||||
d.set("kind", kind.clone());
|
||||
d.set("col", *col as i64);
|
||||
d.set("row", *row as i64);
|
||||
d.set("severity_milli", *severity_milli as i64);
|
||||
}
|
||||
}
|
||||
d
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue