pub struct RecipeUnlockedEvent {
pub recipe_id: RecipeId,
pub reason: UnlockReason,
}Expand description
A recipe has been unlocked for the current player.
Fired at the Post stage on the game bus after the player’s
KnownRecipes component records the recipe and the
Recipe Book Add packet has been queued. The crafting player is
available via ctx.player().
Fields§
§recipe_id: RecipeIdStable identifier of the unlocked recipe.
reason: UnlockReasonWhy the unlock happened — auto-discovery, manual grant, or initial-join starter set.
Trait Implementations§
Source§impl Clone for RecipeUnlockedEvent
impl Clone for RecipeUnlockedEvent
Source§fn clone(&self) -> RecipeUnlockedEvent
fn clone(&self) -> RecipeUnlockedEvent
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RecipeUnlockedEvent
impl Debug for RecipeUnlockedEvent
Source§impl Event for RecipeUnlockedEvent
impl Event for RecipeUnlockedEvent
Source§fn is_cancelled(&self) -> bool
fn is_cancelled(&self) -> bool
Whether this event has been cancelled by a Validate handler.
Source§fn as_any_mut(&mut self) -> &mut dyn Any
fn as_any_mut(&mut self) -> &mut dyn Any
Upcasts to
&mut dyn Any for mutable type-erased dispatch.Source§impl EventRouting for RecipeUnlockedEvent
impl EventRouting for RecipeUnlockedEvent
Auto Trait Implementations§
impl Freeze for RecipeUnlockedEvent
impl RefUnwindSafe for RecipeUnlockedEvent
impl Send for RecipeUnlockedEvent
impl Sync for RecipeUnlockedEvent
impl Unpin for RecipeUnlockedEvent
impl UnsafeUnpin for RecipeUnlockedEvent
impl UnwindSafe for RecipeUnlockedEvent
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more