MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / primaryHeldSlot

Method primaryHeldSlot

source/game/StarPlayerInventory.cpp:764–770  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

762}
763
764Maybe<InventorySlot> PlayerInventory::primaryHeldSlot() const {
765 if (m_swapSlot)
766 return InventorySlot(SwapSlot());
767 if (m_selectedActionBar.is<CustomBarIndex>())
768 return customBarPrimarySlot(m_selectedActionBar.get<CustomBarIndex>());
769 return {};
770}
771
772Maybe<InventorySlot> PlayerInventory::secondaryHeldSlot() const {
773 if (m_swapSlot || itemSafeTwoHanded(primaryHeldItem()))

Callers 1

dropItemMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected