diff --git a/src/entities/livestock/rabbit.rs b/src/entities/livestock/rabbit.rs index 211e4f2..29bf26e 100644 --- a/src/entities/livestock/rabbit.rs +++ b/src/entities/livestock/rabbit.rs @@ -15,6 +15,13 @@ use rand::RngExt; /// 5 seconds at normal speed — slow enough to observe, fast enough to test. pub const DIG_INTERVAL_SECS: f32 = 5.0; +/// Temporary debug component. Attached to a rabbit for N ticks after it digs. +/// Removed automatically when tick_count reaches 0. +#[derive(Component)] +pub struct RabbitFallDebug { + pub ticks_remaining: u8, +} + /// Tracks time until next dig action. Debug component — rabbits dig to demonstrate /// the TileChangedEvent + path invalidation pipeline. Remove or replace when /// real digging mechanics are implemented. @@ -110,13 +117,14 @@ pub fn spawn_rabbits( /// z-level. Also clears the corresponding ChunkData bits via TileMap::remove_floor. /// Fires TileChangedEvent so path invalidation reacts automatically. pub fn rabbit_dig_system( - mut query: Query<(&Transform, &mut RabbitDigTimer)>, + mut commands: Commands, + mut query: Query<(Entity, &Transform, &mut RabbitDigTimer)>, mut tilemap: ResMut, mut tile_changed: MessageWriter, mut occlusion: MessageWriter, time: Res