Class: ItemManager

ItemManager


new ItemManager()

Source:

Methods


buyItem(shopID, item, quantity)

Parameters:
Name Type Description
shopID string
item string
quantity number
Source:
Returns:

Promise


getAllItems()

Returns the object file for all of the items in the game

Source:
Returns:
Type
Object

getItems( [girl])

Returns an array of gameData.items indices

Parameters:
Name Type Argument Description
girl string <optional>
Source:
Returns:
Type
Array.<number>

getNumItems(itemID)

Returns the number of items with the itemID in your inventory

Parameters:
Name Type Description
itemID string
Source:
Returns:
Type
number

getUnusedItem(itemID)

Gets an unused item with the itemID

Parameters:
Name Type Description
itemID
Source:
Returns:
Type
ItemManager.itemObject

getUsedItem(girl, itemID)

Gets an item that is being used by a girl

Parameters:
Name Type Description
girl string
itemID string
Source:
Returns:
Type
ItemManager.itemObject

item(id)

Parameters:
Name Type Description
id string
Source:
Returns:
Type
ItemManager.itemObject
Example
let item = new GAME.item.item('Lollipop');

massRemoveItem(itemID, amount)

Does not remove items that are being used

Parameters:
Name Type Description
itemID string
amount number
Source:

newItem(config)

Use this to create new items

Parameters:
Name Type Description
config ItemManager.itemConfig
Source:

pushItem(itemID [, silent])

Pushes an item to the player's inventory

Parameters:
Name Type Argument Description
itemID string
silent boolean <optional>

If you don't want the game to notify the player

Source:

removeItem(girl, item)

Parameters:
Name Type Description
girl string

id of girl

item String

id of item

Source:
Returns:

Promise


sellItem(item, quantity)

Parameters:
Name Type Description
item string
quantity number
Source:
Returns:

Promise


useItem(girl, item)

Parameters:
Name Type Description
girl string

girlID

item string

itemID

Source:
Returns:
Type
Promise.<any>

Type Definitions


itemConfig

The config object used for creating new items

Type:
  • object
Properties:
Name Type Argument Description
ID string

The ID needs to be the same as the texture key

Name string

The display name of the item

Description string

The description of the item put in the dialogue boxes of item menus

Cost number <optional>

How much it costs to buy this item

Sell number <optional>

How much it costs to sell this tiem

Quest boolean

If true, the player can not use/buy/sell this item

Sellable boolean

If true, the player can sell this item

Consumable boolean <optional>

If true, the item disappears after it expires or after using it if OnlyOne is false

OnlyOne boolean <optional>

If true, the item can only be used if there are no consumables in use or if the current consumable is removed

Expiration number | 'Never' <optional>

How many days until the item expires, set to "Never" if it never expires

Stats object <optional>

The bonus attributes gained

Properties
Name Type Description
Recovery number

The amount of stamina a girl recovers in a boss battle

Stamina number

The amount of extra stamina a girl will have with this item

Hands number

The girl's hands level increased by

Feet number

The girl's feet level increased by

Throat number

The girl's throat level increased by

Tits number

The girl's tits level increased by

Pussy number

The girl's pussy level increased by

Anal number

The girl's anal level increased by

Source:

itemObject

Type:
  • object
Properties:
Name Type Description
ID string

itemID

Expiration number

How many days until this item expires. Only decrements if it is being used

Used boolean | string

The ID of the girl using this item or false

Source: