FrameworkZ 4.4.2
Provides a framework for Project Zomboid with various systems.
Loading...
Searching...
No Matches
FrameworkZ::Inventories Class Reference

The Inventories module for FrameworkZ. Defines and interacts with INVENTORY object. More...

Public Member Functions

void GetInventoryByID (id)
 
void GetItemByID (inventoryID, uniqueID)
 
void GetItemCountByID (inventoryID, uniqueID)
 
integer Initialize (id, object)
 Initialize an inventory.
 
table New (username, type, id)
 Create a new inventory object.
 
table Rebuild (isoPlayer, inventory, items)
 Recursively traverses the inventory table for missing data while referencing the item definitions to rebuild the inventory.
 

Data Fields

FrameworkZ Inventories __index
 
 Character
 
 Container
 
FrameworkZ Inventories
 
FrameworkZ Inventories List
 
FrameworkZ Inventories Types
 
 Vehicle
 

Detailed Description

The Inventories module for FrameworkZ. Defines and interacts with INVENTORY object.

Definition at line 50 of file Inventories.lua.

Member Function Documentation

◆ GetInventoryByID()

void GetInventoryByID ( id )

◆ GetItemByID()

void GetItemByID ( inventoryID ,
uniqueID  )

◆ GetItemCountByID()

void GetItemCountByID ( inventoryID ,
uniqueID  )

◆ Initialize()

integer Initialize ( id ,
object  )

Initialize an inventory.

Parameters
idtable The inventory's id.
objecttable The inventory's object.
Returns
integer The inventory's ID.

◆ New()

table New ( username ,
type ,
id  )

Create a new inventory object.

Parameters
usernamestring The owner's username. Can be nil for no owner.
typestring The type of inventory. Can be nil, but creates a character inventory type by default. Refer to FrameworkZ.Inventories.Types table for available types.
idstring The inventory's ID. Can be nil for an auto generated ID (recommended).
Returns
table The new inventory object.

◆ Rebuild()

table Rebuild ( isoPlayer ,
inventory ,
items  )

Recursively traverses the inventory table for missing data while referencing the item definitions to rebuild the inventory.

Parameters
inventorytable The inventory to rebuild.
Returns
table The rebuilt inventory.

Field Documentation

◆ __index

Definition at line 52 of file Inventories.lua.

◆ Character

FrameworkZ::Inventories::Character

Definition at line 58 of file Inventories.lua.

◆ Container

FrameworkZ::Inventories::Container

Definition at line 60 of file Inventories.lua.

◆ Inventories

Definition at line 64 of file Inventories.lua.

◆ List

Definition at line 54 of file Inventories.lua.

◆ Types

Definition at line 56 of file Inventories.lua.

◆ Vehicle

FrameworkZ::Inventories::Vehicle

Definition at line 62 of file Inventories.lua.


The documentation for this class was generated from the following file: