fix(bevy): imports

This commit is contained in:
Kristofers Solo 2024-12-25 23:08:41 +02:00
parent 9740ce1a5a
commit a562333b90
5 changed files with 24 additions and 4 deletions

View File

@ -63,6 +63,18 @@ panic = "abort" # Smaller binary size
all-features = true
rustdoc-args = ["--cfg", "docsrs"]
[profile.dev.package."*"]
opt-level = 3
# Override some settings for native builds.
[profile.release-native]
# Default to release profile values.
inherits = "release"
# Optimize with performance in mind.
opt-level = 3
# Keep debug information in the binary.
strip = "none"
[lints.clippy]
pedantic = "warn"
nursery = "warn"

View File

@ -1,13 +1,15 @@
mod backtrack;
use crate::HexMaze;
use backtrack::generate_backtracking;
#[cfg(feature = "bevy")]
use bevy::prelude::*;
use hexx::Hex;
#[allow(clippy::module_name_repetitions)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "bevy_reflect", derive(bevy_reflect::Reflect))]
#[cfg_attr(feature = "bevy", derive(bevy::Component))]
#[cfg_attr(feature = "bevy", reflect(bevy::Component))]
#[cfg_attr(feature = "bevy", derive(Component))]
#[cfg_attr(feature = "bevy", reflect(Component))]
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq)]
pub enum GeneratorType {
#[default]

View File

@ -1,4 +1,6 @@
use super::{HexTile, Walls};
#[cfg(feature = "bevy")]
use bevy::prelude::*;
#[cfg(feature = "bevy_reflect")]
use bevy_utils::HashMap;
use hexx::{EdgeDirection, Hex};
@ -13,8 +15,8 @@ use std::ops::{Deref, DerefMut};
#[allow(clippy::module_name_repetitions)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "bevy_reflect", derive(bevy_reflect::Reflect))]
#[cfg_attr(feature = "bevy", derive(bevy::Component))]
#[cfg_attr(feature = "bevy", reflect(bevy::Component))]
#[cfg_attr(feature = "bevy", derive(Component))]
#[cfg_attr(feature = "bevy", reflect(Component))]
#[derive(Debug, Clone, Default, PartialEq, Eq)]
pub struct HexMaze(HashMap<Hex, HexTile>);

View File

@ -1,4 +1,6 @@
use super::Walls;
#[cfg(feature = "bevy")]
use bevy::prelude::*;
use hexx::Hex;
#[cfg(feature = "bevy_reflect")]
use hexx::HexLayout;

View File

@ -1,3 +1,5 @@
#[cfg(feature = "bevy")]
use bevy::prelude::*;
use hexx::EdgeDirection;
/// A bit-flag representation of walls in a hexagonal tile.