Item

Item

The Item entity. This base Item refers primarily to items which are not currently owned.

Constructor

new Item()

Source:

Members

(static) config

Source:

actor :Actor|null

Source:

A convenience reference to the Actor entity which owns this item, if any

Type:

img :string

Source:

A convenience reference to the image path (data.img) used to represent this Item

Type:
  • string

isOwned

Source:

A flag for whether the item is owned by an Actor entity

limited

Source:

A boolean indicator for whether the current game user has ONLY limited visibility for this Entity.

transferredEffects :Array.<ActiveEffect>

Source:

Return an array of the Active Effect instances which originated from this Item. If the Item is owned, the returned instances are the ActiveEffect instances which exist on the owning Actor. If the Item is unowned, the returned instances are the ActiveEffect instances which exist on the Item itself.

Type:

type :string

Source:

A convenience reference to the item type (data.type) of this Item

Type:
  • string

uuid

Source:

Methods

(static) createOwned(itemData, actor)

Source:

A convenience constructor method to create an Item instance which is owned by an Actor

Parameters:
Name Type Description
itemData Object
actor Actor

(async) delete()

Source:

getRollData() → {Object}

Source:

Prepare a data object which defines the data schema used by dice roll commands against this Item

Returns:
Type
Object

hasPerm() → {boolean}

Source:

Override the standard permission test for Item entities as we need to apply a special check for owned items OwnedItems have permission that the player has for the parent Actor.

Returns:

Whether or not the user has the permission for this item

Type
boolean

prepareData()

Source:

prepareEmbeddedEntities()

Source:

(async) update()

Source: