LiquidItemRegistry
Index
Type Aliases
Variables
Functions
Type Aliases
EmptyData
Object that contains empty liquid storage item and stored liquid data.
Type declaration
amount: number
data: number
id: number
liquid: string
optionalstorage?: number
FullData
Object that contains full item and free liquid capacity.
Type declaration
amount: number
data: number
id: number
optionalstorage?: number
Variables
constEmptyByFull
Type declaration
constFullByEmpty
Type declaration
Functions
getEmptyItem
Returns empty item and stored liquid data for item that contains liquid, null otherwise.
Parameters
id: number
item id
data: number
item data
Returns EmptyData
object that contains empty item and stored liquid.
getFullItem
Returns full item and free liquid capacity for item that can be filled with liquid, null otherwise.
Parameters
id: number
item id
data: number
item data
liquid: string
liquid type
Returns FullData
object that contains full item and free liquid capacity
getItemLiquid
Return liquid type stored in item
Parameters
id: number
item id
data: number
item data
Returns string
liquid type
registerItem
Registers liquid storage item.
Parameters
liquid: string
liquid name
emptyId: number
empty item id
fullId: number
id of item with luquid
storage: number
capacity of liquid in mB
Returns void
Registry for liquid storage items. Compatible with LiquidRegistry and extends it by adding items that can contain partial amounts of liquid.