pub struct BagPosition(/* private fields */);
Expand description
The game keeps track between 5 slot bag and the extended inventory.
Implementations§
Source§impl BagPosition
impl BagPosition
Sourcepub fn backpack_pos(&self) -> usize
pub fn backpack_pos(&self) -> usize
The 0 based index into the backpack vec, where the item is parsed into
Sourcepub fn inventory_pos(&self) -> (InventoryType, usize)
pub fn inventory_pos(&self) -> (InventoryType, usize)
The inventory type and position within it, where the item is stored according to previous inventory management logic. This is what you use for commands
Trait Implementations§
Source§impl Clone for BagPosition
impl Clone for BagPosition
Source§fn clone(&self) -> BagPosition
fn clone(&self) -> BagPosition
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 BagPosition
impl Debug for BagPosition
Source§impl Default for BagPosition
impl Default for BagPosition
Source§fn default() -> BagPosition
fn default() -> BagPosition
Returns the “default value” for a type. Read more
Source§impl From<BagPosition> for ItemPosition
impl From<BagPosition> for ItemPosition
Source§fn from(value: BagPosition) -> Self
fn from(value: BagPosition) -> Self
Converts to this type from the input type.
Source§impl From<BagPosition> for PlayerItemPosition
impl From<BagPosition> for PlayerItemPosition
Source§fn from(value: BagPosition) -> Self
fn from(value: BagPosition) -> Self
Converts to this type from the input type.
Source§impl PartialEq for BagPosition
impl PartialEq for BagPosition
impl Copy for BagPosition
impl Eq for BagPosition
impl StructuralPartialEq for BagPosition
Auto Trait Implementations§
impl Freeze for BagPosition
impl RefUnwindSafe for BagPosition
impl Send for BagPosition
impl Sync for BagPosition
impl Unpin for BagPosition
impl UnwindSafe for BagPosition
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.