Skip to content

Commit

Permalink
Merge pull request #542 from ChristopherBiscardi/takeover/tmapid-derives
Browse files Browse the repository at this point in the history
Derive `Eq` and `Deref` for `TilemapId`
  • Loading branch information
ChristopherBiscardi authored Jul 18, 2024
2 parents a95494a + 3b59f7f commit 5334a1a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use bevy::prelude::{ReflectComponent, Res, ResMut};
use bevy::render::render_resource::TextureUsages;
use bevy::{
math::{UVec2, Vec2},
prelude::{Component, Entity, Handle, Image, Reflect},
prelude::{Component, Deref, DerefMut, Entity, Handle, Image, Reflect},
};

/// The default chunk_size (in tiles) used per mesh.
Expand Down Expand Up @@ -42,7 +42,7 @@ impl Default for TilemapRenderSettings {
}

/// A component which stores a reference to the tilemap entity.
#[derive(Component, Reflect, Clone, Copy, Debug, Hash)]
#[derive(Component, Reflect, Clone, Copy, Debug, Hash, Deref, DerefMut, PartialEq, Eq)]
#[reflect(Component, MapEntities)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct TilemapId(pub Entity);
Expand Down

0 comments on commit 5334a1a

Please sign in to comment.