API surface for interacting with player inventory and item management.
More...
|
| bool | Add (BBPItemId id) |
| | Attempts to add an item of the specified id to the player's inventory.
|
| void | Clear () |
| | Clears all items from the player's inventory.
|
| void | Disable (bool disabled) |
| | Enables or disables the item manager.
|
| string | GetItemName (object? item) |
| | Returns a human-readable name for the provided item object.
|
| object? | GetItemObject (BBPItemId id) |
| | Finds an item object from the game's item database corresponding to the enum id.
|
| object? | GetItemObjectByDatabaseIndex (int index) |
| | Retrieves an item object by its index in the game's item database.
|
| object? | GetSlot (int slot) |
| | Gets the item object from the player's inventory slot.
|
| string | GetSlotName (int slot) |
| | Gets the display name for the item contained in the given slot.
|
| bool | Has (BBPItemId id) |
| | Returns whether the player has at least one instance of the specified item.
|
| bool | HasAnyUsableItem () |
| | Returns true if the player has any usable item available.
|
| bool | InventoryFull () |
| | Returns whether the player's inventory is currently full.
|
| void | LockSlot (int slot, bool locked) |
| | Locks or unlocks the specified inventory slot.
|
| void | ReduceTargetInventorySize () |
| | Reduces the target inventory size by one.
|
| void | Remove (BBPItemId id) |
| | Removes the first instance of the specified item id from the inventory.
|
| void | RemoveRandom () |
| | Removes a random item from the player's inventory.
|
| void | RemoveSlot (int slot) |
| | Removes the item from the specified inventory slot.
|
| void | ResetMaxItem () |
| | Resets the maximum item slot to the default value.
|
| bool | SetSlot (int slot, BBPItemId id) |
| | Sets a specific inventory slot to contain the item with the given id.
|
| void | UpdateItems () |
| | Triggers the internal item update logic.
|
| void | UpdateSelect () |
| | Updates selection visuals and internal state after SelectedSlot changes.
|
| void | UpdateTargetInventorySize () |
| | Applies the configured target inventory size to the manager.
|
| void | UseSelected () |
| | Uses the currently selected item.
|
|
| int | DefaultInventorySize [get, set] |
| | Default configured inventory size for the player.
|
| object? | Manager [get] |
| | Underlying item manager object from the game.
|
| int | MaxSlot [get] |
| | Maximum slot index available.
|
| int | MaxSlotWithItem [get] |
| | Highest slot index that currently contains an item.
|
| object? | Nothing [get] |
| | Represents the 'nothing' placeholder object used by the item manager.
|
| IList? | RawItems [get] |
| | The raw underlying list of inventory item objects.
|
| int | SelectedSlot [get, set] |
| | Currently selected inventory slot index.
|
| int | SlotCount [get] |
| | Total number of inventory slots (MaxSlot + 1).
|
| int | TotalItems [get] |
| | Total number of items currently in the player's inventory.
|
API surface for interacting with player inventory and item management.
◆ Add()
| bool BBPGlue.API.BBPItems.Add |
( |
BBPItemId | id | ) |
|
Attempts to add an item of the specified id to the player's inventory.
- Parameters
-
- Returns
- True if the item was added; otherwise false.
◆ Clear()
| void BBPGlue.API.BBPItems.Clear |
( |
| ) |
|
Clears all items from the player's inventory.
◆ Disable()
| void BBPGlue.API.BBPItems.Disable |
( |
bool | disabled | ) |
|
Enables or disables the item manager.
- Parameters
-
| disabled | True to disable; false to enable. |
◆ GetItemName()
| string BBPGlue.API.BBPItems.GetItemName |
( |
object? | item | ) |
|
Returns a human-readable name for the provided item object.
- Parameters
-
| item | The item object to inspect; may be null. |
- Returns
- A display name string for the item.
◆ GetItemObject()
| object? BBPGlue.API.BBPItems.GetItemObject |
( |
BBPItemId | id | ) |
|
Finds an item object from the game's item database corresponding to the enum id.
- Parameters
-
| id | The item enum id to look up. |
- Returns
- The matching item object or null.
◆ GetItemObjectByDatabaseIndex()
| object? BBPGlue.API.BBPItems.GetItemObjectByDatabaseIndex |
( |
int | index | ) |
|
Retrieves an item object by its index in the game's item database.
- Parameters
-
| index | Database index to retrieve. |
- Returns
- The item object or null if index is invalid.
◆ GetSlot()
| object? BBPGlue.API.BBPItems.GetSlot |
( |
int | slot | ) |
|
Gets the item object from the player's inventory slot.
- Parameters
-
| slot | Zero-based inventory slot index. |
- Returns
- The item object or null if the slot is empty or invalid.
◆ GetSlotName()
| string BBPGlue.API.BBPItems.GetSlotName |
( |
int | slot | ) |
|
Gets the display name for the item contained in the given slot.
- Parameters
-
| slot | Inventory slot index. |
- Returns
- The item name or "NULL" if empty.
◆ Has()
| bool BBPGlue.API.BBPItems.Has |
( |
BBPItemId | id | ) |
|
Returns whether the player has at least one instance of the specified item.
- Parameters
-
- Returns
- True if the player has the item; otherwise false.
◆ HasAnyUsableItem()
| bool BBPGlue.API.BBPItems.HasAnyUsableItem |
( |
| ) |
|
Returns true if the player has any usable item available.
◆ InventoryFull()
| bool BBPGlue.API.BBPItems.InventoryFull |
( |
| ) |
|
Returns whether the player's inventory is currently full.
◆ LockSlot()
| void BBPGlue.API.BBPItems.LockSlot |
( |
int | slot, |
|
|
bool | locked ) |
Locks or unlocks the specified inventory slot.
- Parameters
-
| slot | Slot index to lock/unlock. |
| locked | True to lock; false to unlock. |
◆ ReduceTargetInventorySize()
| void BBPGlue.API.BBPItems.ReduceTargetInventorySize |
( |
| ) |
|
Reduces the target inventory size by one.
◆ Remove()
| void BBPGlue.API.BBPItems.Remove |
( |
BBPItemId | id | ) |
|
Removes the first instance of the specified item id from the inventory.
- Parameters
-
◆ RemoveRandom()
| void BBPGlue.API.BBPItems.RemoveRandom |
( |
| ) |
|
Removes a random item from the player's inventory.
◆ RemoveSlot()
| void BBPGlue.API.BBPItems.RemoveSlot |
( |
int | slot | ) |
|
Removes the item from the specified inventory slot.
- Parameters
-
◆ ResetMaxItem()
| void BBPGlue.API.BBPItems.ResetMaxItem |
( |
| ) |
|
Resets the maximum item slot to the default value.
◆ SetSlot()
| bool BBPGlue.API.BBPItems.SetSlot |
( |
int | slot, |
|
|
BBPItemId | id ) |
Sets a specific inventory slot to contain the item with the given id.
- Parameters
-
| slot | Slot index to modify. |
| id | Item id to place into the slot. |
- Returns
- True if successful; otherwise false.
◆ UpdateItems()
| void BBPGlue.API.BBPItems.UpdateItems |
( |
| ) |
|
Triggers the internal item update logic.
◆ UpdateSelect()
| void BBPGlue.API.BBPItems.UpdateSelect |
( |
| ) |
|
Updates selection visuals and internal state after SelectedSlot changes.
◆ UpdateTargetInventorySize()
| void BBPGlue.API.BBPItems.UpdateTargetInventorySize |
( |
| ) |
|
Applies the configured target inventory size to the manager.
◆ UseSelected()
| void BBPGlue.API.BBPItems.UseSelected |
( |
| ) |
|
Uses the currently selected item.
◆ DefaultInventorySize
| int BBPGlue.API.BBPItems.DefaultInventorySize |
|
getset |
Default configured inventory size for the player.
◆ Manager
| object? BBPGlue.API.BBPItems.Manager |
|
get |
Underlying item manager object from the game.
◆ MaxSlot
| int BBPGlue.API.BBPItems.MaxSlot |
|
get |
Maximum slot index available.
◆ MaxSlotWithItem
| int BBPGlue.API.BBPItems.MaxSlotWithItem |
|
get |
Highest slot index that currently contains an item.
◆ Nothing
| object? BBPGlue.API.BBPItems.Nothing |
|
get |
Represents the 'nothing' placeholder object used by the item manager.
◆ RawItems
| IList? BBPGlue.API.BBPItems.RawItems |
|
get |
The raw underlying list of inventory item objects.
◆ SelectedSlot
| int BBPGlue.API.BBPItems.SelectedSlot |
|
getset |
Currently selected inventory slot index.
◆ SlotCount
| int BBPGlue.API.BBPItems.SlotCount |
|
get |
Total number of inventory slots (MaxSlot + 1).
◆ TotalItems
| int BBPGlue.API.BBPItems.TotalItems |
|
get |
Total number of items currently in the player's inventory.
The documentation for this class was generated from the following file: