Skip to content

Commit

Permalink
Add serialization and reflection to storage
Browse files Browse the repository at this point in the history
  • Loading branch information
Joakker committed May 3, 2024
1 parent b858433 commit 46dcb7b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/storage/hexagonal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ use std::{
/// If your use case doesn't match all of the above, use a [`HashMap`] instead
///
/// [`HashMap`]: std::collections::HashMap
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "bevy_reflect", derive(bevy_reflect::Reflect))]
pub struct HexagonalMap<T> {
inner: Vec<Vec<T>>,
bounds: HexBounds,
Expand Down
2 changes: 2 additions & 0 deletions src/storage/rombus.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ use crate::Hex;
/// If your use case doesn't match all of the above, use a [`HashMap`] instead
///
/// [`HashMap`]: std::collections::HashMap
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "bevy_reflect", derive(bevy_reflect::Reflect))]
pub struct RombusMap<T> {
inner: Vec<T>,
origin: Hex,
Expand Down

0 comments on commit 46dcb7b

Please sign in to comment.