pub struct LootTree<R> { /* private fields */ }Expand description
A loot tree based on the lower partial function construct. Each loot tree node has a chance associated with it.
Example: { chance: 5, result: “item1” } { chance: 2, result: “item2” }
Internally this becomes [0,infinite[ -> item1 [5,infinite[ -> item2 maximum = 7 exclusive (that means 6)
Chances will effectively be: [0,4] (5) -> item1 [5,6] (2) -> item2
Implementations§
Auto Trait Implementations§
impl<R> Freeze for LootTree<R>
impl<R> !RefUnwindSafe for LootTree<R>
impl<R> !Send for LootTree<R>
impl<R> !Sync for LootTree<R>
impl<R> Unpin for LootTree<R>
impl<R> !UnwindSafe for LootTree<R>
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