pub struct CraftingCraftedEvent {
pub consumed: [Slot; 9],
pub produced: Slot,
}Expand description
A successful craft has been performed.
Fired at the Post stage on the game bus exactly once per crafted unit. For a normal click, fires once. For a shift-click batch, fires N times (one per loop iteration). The canonical hook for stats / achievements / logging.
Fields§
§consumed: [Slot; 9]Snapshot of the grid contents before ingredient consumption for this craft. Index 0..9 corresponds to grid slot indices.
produced: SlotThe result that was delivered to the player.
Trait Implementations§
Source§impl Clone for CraftingCraftedEvent
impl Clone for CraftingCraftedEvent
Source§fn clone(&self) -> CraftingCraftedEvent
fn clone(&self) -> CraftingCraftedEvent
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 CraftingCraftedEvent
impl Debug for CraftingCraftedEvent
Source§impl Event for CraftingCraftedEvent
impl Event for CraftingCraftedEvent
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 CraftingCraftedEvent
impl EventRouting for CraftingCraftedEvent
Auto Trait Implementations§
impl Freeze for CraftingCraftedEvent
impl RefUnwindSafe for CraftingCraftedEvent
impl Send for CraftingCraftedEvent
impl Sync for CraftingCraftedEvent
impl Unpin for CraftingCraftedEvent
impl UnsafeUnpin for CraftingCraftedEvent
impl UnwindSafe for CraftingCraftedEvent
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