use bevy::ecs::query::QueryEntityError;
#[derive(thiserror::Error, Debug)]
pub enum TilemapManagerError {
#[error("A Chunk does not exist for the given ChunkPos")]
InvalidChunkPos,
#[error("A Chunk entity does not exist for the given ChunkPos")]
ChunkEntityDoesNotExist,
#[error("An Entity does not exist for the given ChunkCell")]
TileEntityDoesNotExist,
#[error("TileData does not exist for the given ChunkCell")]
TileDataDoesNotExist,
}
impl<'w> From<QueryEntityError<'w>> for TilemapManagerError {
fn from(_: QueryEntityError<'w>) -> Self {
TilemapManagerError::ChunkEntityDoesNotExist
}
}