Skip to content

Commit

Permalink
Fix types only being available per prelude
Browse files Browse the repository at this point in the history
  • Loading branch information
janhohenheim committed Aug 19, 2024
1 parent 6f95d8c commit 2f8b123
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
1 change: 0 additions & 1 deletion src/interaction/hold/update.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ use bevy::prelude::*;
use super::{GrabParams, ShadowParams};
use crate::{
prelude::*,
prop::ClampPickupPitch,
verb::{Holding, SetVerb, Verb},
};

Expand Down
8 changes: 4 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
use avian3d::prelude::*;
use bevy::prelude::*;

mod actor;
pub mod actor;
mod cooldown;
mod input;
pub mod input;
mod interaction;
mod math;
mod prop;
pub mod prop;
mod verb;

/// Everything you need to get started with Avian Pickup.
Expand All @@ -21,7 +21,7 @@ pub mod prelude {
pub use crate::{
actor::prelude::*,
input::prelude::*,
prop::{PickupMass, PreferredPickupDistance, PreferredPickupRotation},
prop::prelude::*,
AvianPickupPlugin,
AvianPickupSystem,
};
Expand Down
6 changes: 6 additions & 0 deletions src/prop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ pub(super) fn plugin(app: &mut App) {
app.register_type::<(PreferredPickupRotation, PickupMass)>();
}

pub(super) mod prelude {
pub use super::{ClampPickupPitch, PreferredPickupDistance, PreferredPickupRotation, PickupMass};
}

/// Insert this on an object to set its rotation when picked up.
/// Useful for e.g. making sure that a telephone you pick up is always held
/// facing the player.
Expand Down Expand Up @@ -94,5 +98,7 @@ impl Default for PickupMass {
}
}

/// The cached mass that an object had before it was picked up
/// that will be restored when it is dropped.
#[derive(Debug, Clone, Copy, PartialEq, Component)]
pub(crate) struct NonPickupMass(pub Scalar);

0 comments on commit 2f8b123

Please sign in to comment.