Echo Hollow

Because Pr0n is the Highest Form of Art.

User Tools

Site Tools


libecho:classes:inventory

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
libecho:classes:inventory [2022/05/22 12:20] – [canShowOnLeft] leelibecho:classes:inventory [2022/05/22 18:29] lee
Line 24: Line 24:
   * item: the thing to be added to the Inventory.   * item: the thing to be added to the Inventory.
   * actor: the (optional, can be null) Person that is doing the adding.   * actor: the (optional, can be null) Person that is doing the adding.
-  * force: if true, the item will be added regardless of the result of the pre- functions.+  * force: if true, the pre- and post- functions will not be called, and item will be added regardless.
  
   * Returns: true if the item was added or was already in the inventory, or false if the item could not be added to the inventory.   * Returns: true if the item was added or was already in the inventory, or false if the item could not be added to the inventory.
Line 34: Line 34:
   * item: the thing to be removed from the Inventory.   * item: the thing to be removed from the Inventory.
   * actor: the (optional, can be null) Person that is doing the removal.   * actor: the (optional, can be null) Person that is doing the removal.
-  * force: if true, the item will be removed regardless of the result of the pre- functions.+  * force: if true, the pre- and post- functions will not be called, and item will be removed regardless.
  
   * Returns: true if the item was removed or was not in the inventory to begin with, or false if the item could not be removed from the inventory.   * Returns: true if the item was removed or was not in the inventory to begin with, or false if the item could not be removed from the inventory.
Line 181: Line 181:
   * Optional   * Optional
  
-=== canShowOnRight ===+=== canShowOnRight( item, config ) ===
 Called to check if the object will be displayed in right inventory at all. Called to check if the object will be displayed in right inventory at all.
-  * Type: Boolean+  * Type: Function 
 +  * Returns: Boolean 
 +  * //item//: The item which we are checking whether or not we should show. 
 +  * //config//: The config object that was passed to InventoryIU.render().
   * Default: true   * Default: true
   * Optional   * Optional
  
-=== canMoveFromLeft ===+=== canMoveFromLeft( item, config ) ===
 The item will be shown in the left inventory, but will we show the control to move it to the right inventory? The item will be shown in the left inventory, but will we show the control to move it to the right inventory?
-  * Type: Boolean+  * Type: Function 
 +  * Returns: Boolean 
 +  * //item//: The item which we are checking whether or not we should show. 
 +  * //config//: The config object that was passed to InventoryIU.render().
   * Default: true   * Default: true
   * Optional   * Optional
  
-=== canMoveFromRight ===+=== canMoveFromRight( item, config ) ===
 The item will be shown in the right inventory, but will we show the control to move it to the right inventory? The item will be shown in the right inventory, but will we show the control to move it to the right inventory?
-  * Type: Boolean+  * Type: Function 
 +  * Returns: Boolean 
 +  * //item//: The item which we are checking whether or not we should show. 
 +  * //config//: The config object that was passed to InventoryIU.render().
   * Default: true   * Default: true
   * Optional   * Optional
  
-=== getSortCategory ===+=== getSortCategory( item, inventory, config ) ===
 Return object category for the sort selector. Return object category for the sort selector.
-  * Type: String+  * Type: Function 
 +  * Returns: String 
 +  * //item//: The item which we are checking whether or not we should show. 
 +  * //inventory//: The item which we are checking whether or not we should show. 
 +  * //config//: The config object that was passed to InventoryIU.render().
   * Default: item.inventoryCategory | "Other"   * Default: item.inventoryCategory | "Other"
   * Optional   * Optional
Line 207: Line 220:
 === canShowLeftSelector === === canShowLeftSelector ===
 Will the left selector be shown? Will the left selector be shown?
-  * Type: Boolean+  * Type: Boolean | or Function(config) returning Boolean
   * Default: true   * Default: true
   * Optional   * Optional
Line 213: Line 226:
 === canShowRightSelector === === canShowRightSelector ===
 Will the right selector be shown? Will the right selector be shown?
-  * Type: Boolean+  * Type: Boolean | or Function(config) returning Boolean
   * Default: true   * Default: true
   * Optional   * Optional
  
-=== moveFromLeft ===+=== moveFromLeft( item, config ) ===
 Function to call to move item from left to right inventory. If undefined, the built-in implementation will be used. Function to call to move item from left to right inventory. If undefined, the built-in implementation will be used.
-  * Type: Function (returning void+  * Type: Function 
-  * Default: undefined+  * Returns: Void 
 +  * //item//: The item which we are checking whether or not we should show. 
 +  * //config//: The config object that was passed to InventoryIU.render(). 
 +  * Default: the builtin implementation is used if none is defined in the config object
   * Optional   * Optional
  
-=== moveFromRight ===+=== moveFromRight( item, config ) ===
 Function to call to move item from right to left inventory. If undefined, the built-in implementation will be used. Function to call to move item from right to left inventory. If undefined, the built-in implementation will be used.
-  * Type: Function (returning void+  * Type: Function 
-  * Default: undefined+  * Returns: Void 
 +  * //item//: The item which we are checking whether or not we should show. 
 +  * //config//: The config object that was passed to InventoryIU.render(). 
 +  * Default: the builtin implementation is used if none is defined in the config object 
 +  * Optional 
 + 
 +=== leftTitle === 
 +Override the left title. 
 +  * Type: String | Function(config) returning String 
 +  * Default: if the left inventory is a Person then "Soandso (Inventory)", otherwise leftInventory.AName. 
 +  * Optional 
 + 
 +=== rightTitle === 
 +Override the right title. 
 +  * Type: String | Function(config) returning String 
 +  * Default: if the right inventory is a Person then "Soandso (Inventory)", otherwise rightInventory.AName. 
 +  * Optional 
 + 
 +=== leftName( item, config ) === 
 +Override the left label for item. 
 +  * Type: Function 
 +  * Returns: String 
 +  * //item//: The item which we are checking whether or not we should show. 
 +  * //config//: The config object that was passed to InventoryIU.render(). 
 +  * Default: the item's AName 
 +  * Optional 
 + 
 +=== rightName( item, config ) === 
 +Override the right label for item. 
 +  * Type: Function 
 +  * Returns: String 
 +  * //item//: The item which we are checking whether or not we should show. 
 +  * //config//: The config object that was passed to InventoryIU.render(). 
 +  * Default: the item's AName
   * Optional   * Optional
  
 === outerTpl === === outerTpl ===
 Override the builtin outer HTML template. Override the builtin outer HTML template.
-  * Type: String+  * Type: String | Function(config) returning String
   * Default: undefined   * Default: undefined
   * Optional   * Optional
Line 237: Line 286:
 === listitemTplLeft === === listitemTplLeft ===
 Override the builtin left list item HTML template. Override the builtin left list item HTML template.
-  * Type: String+  * Type: String | Function(config) returning String
   * Default: undefined   * Default: undefined
   * Optional   * Optional
Line 243: Line 292:
 === listitemTplRight === === listitemTplRight ===
 Override the builtin right list item HTML template. Override the builtin right list item HTML template.
-  * Type: String+  * Type: String | Function(config) returning String
   * Default: undefined   * Default: undefined
   * Optional   * Optional
  
-=== leftTitle === +=== detailsTpl === 
-Override the left title+Override the builtin item details HTML template
-  * Type: String +  * Type: String | Function(config) returning String
-  * Default: undefined +
-  * Optional +
- +
-=== rightTitle === +
-Override the right title. +
-  * Type: String+
   * Default: undefined   * Default: undefined
   * Optional   * Optional