Adventure.js Docs Downloads
Score: 0 Moves: 0

Class: Sink

Extends: adventurejs.Drainable

Defined in: adventure/assets/tangibles/things/containers/liquidcontainers/drainables/Sink.js, line 6

Can have parts: Faucet, GraduatedController, Drain, Plug

Public Constructor:

MyGame.createAsset({ "class":"Sink", "name":"foo", [...] })

Sink is a subclass of Drainable. A Sink can be linked with a Faucet and Handles and a Drain and Plug through the use of the parts property.

Note that parts is a special convenience property that only pertains to some Asset classes with inherent methods for linking certain other Asset classes. To learn more about which classes can be linked through the parts property, see How to Use Linked Assets.

Following is an example of a Sink with a Faucet, Handles, a Drain and Plug.

Example:

MyGame.createAsset({
  class: "Sink",
  name: "sink",
  place: { in: "Standing Room" },
  descriptions: { 
    look: function()
    {
      return "A pedestal sink with porcelain handles 
      and a stainless steel faucet. Its drain appears to 
      be $( sink drain is open or closed ). ";
    }, 
  },
  in: {
    vessel: {
      drain_id: "sink drain",
    }
  },
  parts: [
    "hot water handle",
    "cold water handle",
    "faucet",
    "drain",
    "plug"
  ],
});
MyGame.createAsset({
  class: "Drain",
  name: "sink drain",
  synonyms: "sink drain",
  is: { open: true, direct_object_of_verb: { open: true, close: true, } },
  descriptions: { 
    look: function()
    { 
      return "A dark drain. Currently 
      $( sink drain is open or closed ). " 
    }, 
  },
});
MyGame.createAsset({
  class: "Faucet",
  name: "faucet",
  descriptions: { look: "The sink faucet. ", },
  substance_id: "water",
  max_volume_of_flow_per_turn: 1000,
});
MyGame.createAsset({
  class: "Handle",
  name: "hot water handle",
  synonyms: [ "handle", "sink handle" ],
  adjectives: [ "hot water", "sink", "porcelain" ],
  descriptions: { look: "The sink's hot water handle. ", },
  set_substance_id: "hot water",
  set_substance_temperature: 70
});
MyGame.createAsset({
  class: "Handle",
  name: "cold water handle",
  descriptions: { look: "The sink's cold water handle. ", },
  set_substance_id: "cold water",
  set_substance_temperature: 20
});
MyGame.createAsset({
  class: "Collection",
  name: "sink handles",
  synonyms: [ "porcelain handles" ],
  place: { attached: "sink" },
  collection: [ "hot water handle", "cold water handle"],
  is: { listed_in_parent: false },
  descriptions: { look: "Two porcelain sink handles, hot and cold. ", },
});
MyGame.createAsset({
  class: "Plug",
  name: "sink plug",
  synonyms: "plug",
  place: { in: "sink" },
  descriptions: { look: "A sink drain plug. ", },
});

The above example uses $(string) substitutions to create a dynamic description. To learn more, see the How to Use Custom Templates.

Private Constructor:

var foo = new adventurejs.Sink(game_name, name)

Though all in-game glasses use a standard constructor method under the hood, it's unlikely that you'd need to call it directly. To create an instance of the Sink class, it must be defined in a game file as a generic object. That object will be used at runtime to construct a new game class instance, which will be validated and initialized before adding it to the Game. See above for the public constructor, or see Game#createAsset to learn more.

Parameters:

  • game_name String
    The name of the top level game object.
  • name String
    A name for the object, to be serialized and used as ID.
Inherited Overrides
IndexMethodsProperties

Index

Methods:

Properties:

Methods Collapse all  |  Expand all

$is(property, asset)

Defined in: adventure/assets/tangible/$is.js, line 6

Inherited from: adventurejs.Tangible#$is

Todos: Leaving open the possibility for other params.

Parameters:

  • property String
  • asset Object
$is() is a convenience method for authors that provides an easy way to test for various conditions.
  • assetA.$is("in", assetB)
    accepts any preposition, asking, is this asset in that aspect of that asset?
  • assetA.$is("nested in", assetB)
    nested in, specific to character classes, asking, is this asset nested in that asset?
  • assetA.$is("closed")
    asking, is this asset closed?
  • assetA.$is("locked")
    asking, is this asset locked?
  • assetA.$is("plugged")
    asking, is this asset plugged?
  • assetA.$is("sealed")
    asking, is this asset sealed?
  • assetA.$is("held", assetB)
    asking, is this asset held by that asset, as in a bannister held by player?
  • assetA.$is("holding", assetB)
    asking, is this asset holding that asset, as in player holding a rope?
  • assetA.$is("worn")
    asking, is this asset being worn?
  • assetA.$is("zipped")
    asking, is this asset zipped?
  • assetA.$is("open")
    asking, is this asset open?
  • assetA.$is("unlocked")
    asking, is this asset unlocked?
  • assetA.$is("unplugged")
    asking, is this asset unplugged?
  • assetA.$is("unsealed")
    asking, is this asset unsealed?
$moveTo(aspect, asset)

Defined in: adventure/assets/tangible/$moveTo.js, line 6

Inherited from: adventurejs.Tangible#$moveTo

Parameters:

  • aspect String
  • asset Object
$moveTo is an author shortcut that is similar to moveTo but which bypasses onMoveThatToThis, avoiding the consequences of any verb event hooks.
addAssetAt() → {Array}

Defined in: adventure/assets/tangible/addAssetAt.js, line 6

Inherited from: adventurejs.Tangible#addAssetAt

Add specified asset id to the contents of specified aspect on this asset. Returns contents if aspect exists, or null.

Returns:

Array
addWordsToLookup(allTheWords, typeOfWord)

Defined in: adventure/asset/addWordsToLookup.js, line 6

Inherited from: adventurejs.Asset#addWordsToLookup

Parameters:

  • allTheWords Array
  • typeOfWord String
addWordsToLookup() takes words associated with this asset and adds them to the global lookup table.
aliases()

Defined in: adventure/Asset.js, line 951

Inherited from: adventurejs.Asset#aliases

aliases() is a collection of method names that are meant for authors to use. Since they don't exist on all classes, we set up these aliases so that, if authors call them on classes they're not applicable to, they will politely return null instead of throwing a "not a function" error.
areAnscestorsClosed() → {Boolean}

Defined in: adventure/assets/tangible/areAnscestorsClosed.js, line 6

Inherited from: adventurejs.Tangible#areAnscestorsClosed

Checks to see if this asset's containing parent(s) is closed. Takes into account nesting doll situations and looks all the way up the chain. Useful for determining whether a player can interact with a nested object.

Returns:

Boolean
areAnscestorsKnown() → {Boolean}

Defined in: adventure/assets/tangible/areAnscestorsKnown.js, line 6

Inherited from: adventurejs.Tangible#areAnscestorsKnown

Checks to see if this asset and its containing parent(s) are known to player. Takes into account nesting doll situations and looks all the way up the chain. Useful for determining whether a player can "see" a nested object.

Returns:

Boolean
areAnscestorsOpen() → {Boolean}

Defined in: adventure/assets/tangible/areAnscestorsOpen.js, line 6

Inherited from: adventurejs.Tangible#areAnscestorsOpen

Checks to see if this asset's containing parent(s) is open. Takes into account nesting doll situations and looks all the way up the chain. Useful for determining whether a player can interact with a nested object.

Returns:

Boolean
areAnscestorsUnknown(nestlevel) → {Boolean}

Defined in: adventure/assets/tangible/areAnscestorsUnknown.js, line 6

Inherited from: adventurejs.Tangible#areAnscestorsUnknown

Parameters:

  • nestlevel int
Checks to see if this asset or its containing parent(s) are unknown to player. Takes into account nesting doll situations and looks all the way up the chain. Useful for determining whether a player can "see" a nested object.

Returns:

Boolean
canBePlacedInAspectOfAsset(aspect, asset) → {Boolean}

Defined in: adventure/assets/tangible/canBePlacedInAspectOfAsset.js, line 6

Inherited from: adventurejs.Tangible#canBePlacedInAspectOfAsset

Parameters:

  • aspect String
  • asset Object
Check whether this asset can be placed within the specified aspect of the specified asset. This takes into account the with_assets and with_classes properties.

Returns:

Boolean
canContainAnySubstance() → {Boolean}

Defined in: adventure/assets/tangible/canContainAnySubstance.js, line 6

Inherited from: adventurejs.Tangible#canContainAnySubstance

Determine whether asset can contain any substance.

Returns:

Boolean
canContainAssetAt(object) → {Boolean}

Defined in: adventure/assets/tangible/canContainAssetAt.js, line 6

Inherited from: adventurejs.Tangible#canContainAssetAt

Parameters:

  • object Object
Check whether this asset can be attached to specified other asset.

Returns:

Boolean
canPlayerNest(aspect) → {Boolean}

Defined in: adventure/assets/tangible/canPlayerNest.js, line 9

Inherited from: adventurejs.Tangible#canPlayerNest

Parameters:

  • aspect String
    A Tangible Aspect ID.
Ask if player can nest in an aspect of this asset.

Returns:

Boolean
canPlayerReachThatFromThis(object) → {Boolean}

Defined in: adventure/assets/tangible/canPlayerReachThatFromThis.js, line 6

Inherited from: adventurejs.Tangible#canPlayerReachThatFromThis

Parameters:

  • object Object
Check whether that asset can be reached by player when nested in this asset.

Returns:

Boolean
canSetVerbState(verb) → {Boolean}

Defined in: adventure/asset/canSetVerbState.js, line 6

Inherited from: adventurejs.Asset#canSetVerbState

Parameters:

  • verb String
canSetVerbState is a method to check whether the specified verb can set state on this asset. Assumes that asset.is.direct_object_of_verb[verb].enabled is true

Returns:

Boolean
destroy()

Defined in: adventure/assets/Tangible.js, line 2151

Inherited from: adventurejs.Tangible#destroy

Todos: What else needs to happen on destroy?

Remove this asset from the world before calling superclass.destroy.
didDoVerbs(verbs) → {Boolean}

Defined in: adventure/asset/didDoVerbs.js, line 6

Inherited from: adventurejs.Asset#didDoVerbs

Parameters:

  • verbs Array
didDoVerbs check whether any of the specified verbs has ever been applied to the asset as a direct object. This is a convenience method that relies on asset.DOVdidDo()

Returns:

Boolean
didIoVerbs(verbs) → {Boolean}

Defined in: adventure/asset/didIoVerbs.js, line 6

Inherited from: adventurejs.Asset#didIoVerbs

Parameters:

  • verbs Array
didIoVerbs check whether any of the specified verbs has ever been applied to the asset as an indirect object. This is a convenience method that relies on asset.IOVdidDo()

Returns:

Boolean
doesContainAnyAsset() → {Boolean}

Defined in: adventure/assets/tangible/doesContainAnyAsset.js, line 6

Inherited from: adventurejs.Tangible#doesContainAnyAsset

Check whether this asset contains any assets.

Returns:

Boolean
doesContainAnyAssetAt(aspect) → {Boolean}

Defined in: adventure/assets/tangible/doesContainAnyAssetAt.js, line 6

Inherited from: adventurejs.Tangible#doesContainAnyAssetAt

Parameters:

  • aspect String
Check whether this asset contains any assets.

Returns:

Boolean
doesContainAnySubstance() → {Boolean}

Defined in: adventure/assets/tangible/doesContainAnySubstance.js, line 6

Inherited from: adventurejs.Tangible#doesContainAnySubstance

Check whether this asset contains any substance.

Returns:

Boolean
doesContainAnySubstanceAt(aspect) → {Boolean}

Defined in: adventure/assets/tangible/doesContainAnySubstanceAt.js, line 6

Inherited from: adventurejs.Tangible#doesContainAnySubstanceAt

Parameters:

  • aspect String
Check whether this asset contains any substance at specified aspect.

Returns:

Boolean
doesContainAsset(id) → {String}

Defined in: adventure/assets/tangible/doesContainAsset.js, line 6

Inherited from: adventurejs.Tangible#doesContainAsset

Parameters:

  • id String
Check whether this asset contains the specified asset.

Returns:

String
doesContainAssetAt(id, aspect) → {Boolean}

Defined in: adventure/assets/tangible/doesContainAssetAt.js, line 6

Inherited from: adventurejs.Tangible#doesContainAssetAt

Parameters:

  • id String
  • aspect String
Check whether this asset contains the specified asset at the specified aspect.

Returns:

Boolean
doesContainSubstance(id) → {String}

Defined in: adventure/assets/tangible/doesContainSubstance.js, line 6

Inherited from: adventurejs.Tangible#doesContainSubstance

Parameters:

  • id String
Check whether this asset contains the specified substance.

Returns:

String
doesContainSubstanceAt(id, aspect) → {Boolean}

Defined in: adventure/assets/tangible/doesContainSubstanceAt.js, line 6

Inherited from: adventurejs.Tangible#doesContainSubstanceAt

Parameters:

  • id String
  • aspect String
Check whether this asset contains the specified substance.

Returns:

Boolean
DOVallowOnce(verb) → {Boolean}

Defined in: adventure/asset/DOVallowOnce.js, line 6

Inherited from: adventurejs.Asset#DOVallowOnce

Parameters:

  • verb String
DOVallowOnce is a method to check whether this asset is subscribed to allow the specified verb to act on it as a direct object only once.

Returns:

Boolean
DOVallowWithAnything(verb) → {Boolean}

Defined in: adventure/asset/DOVallowWithAnything.js, line 6

Inherited from: adventurejs.Asset#DOVallowWithAnything

Parameters:

  • verb String
DOVallowWithAnything is a method to check whether this asset is subscribed to act as a direct object with the specified verb without any direct object.

Returns:

Boolean
DOVallowWithAsset(verb, asset) → {Boolean}

Defined in: adventure/asset/DOVallowWithAsset.js, line 6

Inherited from: adventurejs.Asset#DOVallowWithAsset

Parameters:

  • verb String
  • asset Object
DOVallowWithAsset is a method to check whether this asset is subscribed to act as a direct object with the specified verb and indirect object.

Returns:

Boolean
DOVallowWithNothing(verb) → {Boolean}

Defined in: adventure/asset/DOVallowWithNothing.js, line 6

Inherited from: adventurejs.Asset#DOVallowWithNothing

Parameters:

  • verb String
DOVallowWithNothing is a method to check whether this asset is subscribed to act as a direct object with the specified verb without any indirect object. For example, "plug in computer" where when an outlet is implied but not defined.

Returns:

Boolean
DOVdidDo(verb) → {Boolean}

Defined in: adventure/asset/DOVdidDo.js, line 6

Inherited from: adventurejs.Asset#DOVdidDo

Parameters:

  • verb String
DOVdidDo is a method to check whether this asset was already used as a direct objecb by the specified verb.

_didDo is an alias meant for authors.

Returns:

Boolean
DOVdidDoCount(verb) → {Int}

Defined in: adventure/asset/DOVdidDoCount.js, line 6

Inherited from: adventurejs.Asset#DOVdidDoCount

Parameters:

  • verb String
DOVdidDoCount is a method to get a count of times this asset was used as a direct object by the specified verb.

_doCount is an alias meant for authors.

Returns:

Int
DOVdidTry(verb) → {Boolean}

Defined in: adventure/asset/DOVdidTry.js, line 6

Inherited from: adventurejs.Asset#DOVdidTry

Parameters:

  • verb String
DOVdidTry is a method to check whether it was attempted to use this asset as a direct object by the specified verb.

_didTry is an alias meant for authors.

Returns:

Boolean
DOVdidTryCount(verb) → {Boolean}

Defined in: adventure/asset/DOVdidTryCount.js, line 6

Inherited from: adventurejs.Asset#DOVdidTryCount

Parameters:

  • verb String
DOVdidTryCount is a method to get a count of times it was tried to use this asset as a direct object by the specified verb.

_tryCount is an alias meant for authors.

Returns:

Boolean
DOVgetConnectionCount(verb) → {Int}

Defined in: adventure/asset/DOVgetConnectionCount.js, line 6

Inherited from: adventurejs.Asset#DOVgetConnectionCount

Parameters:

  • verb String
    The name of a verb.
Return this.is.direct_object_of_verb[verb].with_params.connections.length

Returns:

Int
DOVgetConnections(verb) → {Array}

Defined in: adventure/asset/DOVgetConnections.js, line 6

Inherited from: adventurejs.Asset#DOVgetConnections

Parameters:

  • verb String
    The name of a verb.
Return this.is.direct_object_of_verb[verb].with_params.connections

Returns:

Array
DOVgetMaxConnections(verb) → {Int}

Defined in: adventure/asset/DOVgetMaxConnections.js, line 6

Inherited from: adventurejs.Asset#DOVgetMaxConnections

Parameters:

  • verb String
    The name of a verb.
Return this.is.direct_object_of_verb[verb].with_params.max_connections

Returns:

Int
DOVhasIndirectObjects(verb) → {Boolean}

Defined in: adventure/asset/DOVhasIndirectObjects.js, line 6

Inherited from: adventurejs.Asset#DOVhasIndirectObjects

Parameters:

  • verb String
DOVhasIndirectObjects is a method to check whether this asset has any particular indirect objects specified by the author for use with the specified verb.

Returns:

Boolean
DOVhasMaxConnections(verb) → {Boolean}

Defined in: adventure/asset/DOVhasMaxConnections.js, line 6

Inherited from: adventurejs.Asset#DOVhasMaxConnections

Parameters:

  • verb String
    The name of a verb.
Get whether the DOV has maximum connections.

Returns:

Boolean
DOVincrementDoCount(verb)

Defined in: adventure/asset/DOVincrementDoCount.js, line 6

Inherited from: adventurejs.Asset#DOVincrementDoCount

Parameters:

  • verb String
DOVincrementDoCount is a method to increment the number of times the specified verb has acted on this asset as a direct object.
DOVincrementTryCount(verb)

Defined in: adventure/asset/DOVincrementTryCount.js, line 6

Inherited from: adventurejs.Asset#DOVincrementTryCount

Parameters:

  • verb String
DOVincrementTryCount is a method to increment the number of times the specified verb has been tried on this asset as a direct object.
DOVisConnectedToAnything(verb) → {Boolean}

Defined in: adventure/asset/DOVisConnectedToAnything.js, line 6

Inherited from: adventurejs.Asset#DOVisConnectedToAnything

Parameters:

  • verb String
    The name of a verb.
Check whether this asset is currently connected to anything directly by a verb such as plugIn or tie. For example, if this asset is a computer plugged into an outlet, this method would return true.

Returns:

Boolean
DOVisConnectedToAsset(verb, asset) → {Boolean}

Defined in: adventure/asset/DOVisConnectedToAsset.js, line 6

Inherited from: adventurejs.Asset#DOVisConnectedToAsset

Parameters:

  • verb String
    The name of the verb to test.
  • asset Object | String
    A game asset or asset id to test.
Check whether this asset is currently connected as a direct object to the specified indirect object by the specified verb. For example, in the case of a computer plugged into an outlet, the computer would be the direct object, and calling this method on it would return true.

Returns:

Boolean
DOVisConnectedToNothing(verb) → {Boolean}

Defined in: adventure/asset/DOVisConnectedToNothing.js, line 6

Inherited from: adventurejs.Asset#DOVisConnectedToNothing

Parameters:

  • verb String
    The name of a verb.
Check whether this asset is currently connected as an indirect object to nothing by the specified verb. For example, in the case of a computer that can be plugged in, an author might prefer not to create a specific outlet into which to plug the computer. For that case we allow 'plug in computer', and store a null value to asset.is.direct_object_of_verb.plugIn.with_params.connections to represent the computer's plugged in state.

Returns:

Boolean
DOVsetConnection(verb, asset)

Defined in: adventure/asset/DOVsetConnection.js, line 6

Inherited from: adventurejs.Asset#DOVsetConnection

Parameters:

  • verb String
  • asset Object
Set asset's direct verb param connection to specified indirect object.
DOVsetWithAsset(verb, asset) → {Boolean}

Defined in: adventure/asset/DOVsetWithAsset.js, line 6

Inherited from: adventurejs.Asset#DOVsetWithAsset

Parameters:

  • verb String
  • asset Object
DOVsetWithAsset is used to specify another asset that can be used as an indirect object with this asset as direct object. For example, if this asset is a locking chest, chest.DOVsetWithAsset('unlock', 'gold key') would add the gold key as an indirect object of the chest.

Returns:

Boolean
DOVsetWithClass(verb, clas) → {Boolean}

Defined in: adventure/asset/DOVsetWithClass.js, line 6

Inherited from: adventurejs.Asset#DOVsetWithClass

Parameters:

  • verb String
  • clas String
DOVsetWithClass is a method to add an indirect object class to asset.is.direct_object_of_verb[verb].with_classes.

Returns:

Boolean
DOVunsetConnection(verb, asset)

Defined in: adventure/asset/DOVunsetConnection.js, line 6

Inherited from: adventurejs.Asset#DOVunsetConnection

Parameters:

  • verb String
  • asset Object
Unset asset's direct verb param connection to specified indirect object.
event_hooks()

Defined in: adventure/assets/Tangible.js, line 1498

Inherited from: adventurejs.Tangible#event_hooks

Todos: move all this!

Allow authors to insert custom logic on a per-asset basis, when specified assets react to being manipulated by verbs. To use, create a key/value pair for each asset you wish to insert logic for, where the key is the name of the other asset and the value is an anonymous function, as in this example:
MyGame.createAsset({
  class: "Bicycle",// THIS asset to be nested to
  name: "bicycle",
  event_hooks: {
    onNestThatToThis: {
      "Mighty Hero": function(params){ // THAT asset to be nested 
        MyGame.prependToNextPrint("You wobble a bit getting on the bike. ");
        MyGame.appendToNextPrint("Success! ");
      }
    },
  },
});
This example only adds some text to the output for the turn, but overrides can be used to add any kind of logic. Here's are some of the reactions that can be overriden:
  • onMoveThatToThis - when that asset is moved to this asset
  • onRemoveThisFromThat - when this asset is removed from that asset
  • onRemoveThatFromThis - when that asset is removed from this asset
  • onMoveThisToThat - when this asset is moved to that asset
  • onNestThatToThis - when that character is nested to this asset
  • onNestThisToThat - when this character is nested to that asset
  • onUnnestThatFromThis - when that character is unnested from this asset
  • onUnnestThisFromThat - when this character is unnested from that asset
  • onSubtractSubstanceFromThis - when a substance is subtracted from this asset
  • onAddSubstanceToThis - when a substance is added to this asset
  • onDestroyThis - when this asset is removed from the game
  • onChangeMoisture - when this asset is moistened
  • onChangeTemperature - when this asset is subjected to a change in temperature
  • onChangeGravity - when this asset is subjected to a change in gravity
  • onTieThisToThat - when this asset is tied to that asset
  • onTieThatToThis - when that asset is tied to this asset
  • onUntieThisFromThat - when this asset is untied from that asset
  • onUntieThatFromThis - when that asset is untied from this asset
  • onTurnThis - when this asset is turned
  • onTurnThisWithThat - when this asset is turned with that asset
  • onTurnThatWithThis - when that asset is turned with this asset
  • onLetGoThis - when player lets go of this asset
  • onHoldThis - when player holds this asset
  • onDrinkThis - when this asset is drunk
  • onDrinkFromThis - when this asset is drunk from
  • get(property, qualifier)

    Defined in: adventure/assets/tangible/$get.js, line 6

    Inherited from: adventurejs.Tangible#get

    Parameters:

    • property String
    • qualifier String
    Utility function that provides an easy way for authors to test for various conditions.
    • all - list things anywhere in this
    • behind - list things behind this
    • in - list things in this
    • on - list things on this
    • under - list things under this
    • attached - list things attached to this
    getAllContents() → {Array}

    Defined in: adventure/assets/tangible/getAllContents.js, line 6

    Inherited from: adventurejs.Tangible#getAllContents

    Returns an array of all content in any location

    Returns:

    Array
    getAllNestedContents() → {Array}

    Defined in: adventure/assets/tangible/getAllNestedContents.js, line 6

    Inherited from: adventurejs.Tangible#getAllNestedContents

    Get list of other assets nested within this one.

    Returns:

    Array
    getAncestorId() → {String}

    Defined in: adventure/assets/tangible/getAncestorId.js, line 6

    Inherited from: adventurejs.Tangible#getAncestorId

    Get the ID of this asset's topmost parent, excluding Room.

    Returns:

    String
    getAnySubstanceThisContains() → {String}

    Defined in: adventure/assets/tangible/getAnySubstanceThisContains.js, line 6

    Inherited from: adventurejs.Tangible#getAnySubstanceThisContains

    Get the substance, if any, contained in this asset.

    Returns:

    String
    getAspectAt(aspect) → {Object|Null}

    Defined in: adventure/assets/tangible/getAspectAt.js, line 6

    Inherited from: adventurejs.Tangible#getAspectAt

    Parameters:

    • aspect string
      The aspect to get.
    Get aspect at specified preposition.

    Returns:

    Object | Null
    getAspectWithVessel() → {String}

    Defined in: adventure/assets/tangible/getAspectWithVessel.js, line 6

    Inherited from: adventurejs.Tangible#getAspectWithVessel

    Get this asset's substance location. This is somewhat ambiguous because in theory an asset can have multiple substance locations but in practice we clearly prefer 'in'.

    Returns:

    String
    getClosedAnscestors() → {Array}

    Defined in: adventure/assets/tangible/getClosedAnscestors.js, line 6

    Inherited from: adventurejs.Tangible#getClosedAnscestors

    Get a list of this asset's containing parent(s) that are closed. Takes into account nesting doll situations and looks all the way up the chain. Useful for determining whether a player can interact with a nested object.

    Returns:

    Array
    getContentsAt() → {Array}

    Defined in: adventure/assets/tangible/getContentsAt.js, line 6

    Inherited from: adventurejs.Tangible#getContentsAt

    Returns an array of all content in the specified aspect.

    Returns:

    Array
    getCountOfListableContentsAt(where) → {int}

    Defined in: adventure/assets/tangible/getCountOfListableContentsAt.js, line 6

    Inherited from: adventurejs.Tangible#getCountOfListableContentsAt

    Parameters:

    • where String
    Get a count of assets within this asset that are listable in this asset's description, for example when player examines this.

    Returns:

    int
    getDescription(description) → {String}

    Defined in: adventure/asset/getDescription.js, line 6

    Inherited from: adventurejs.Asset#getDescription

    Parameters:

    • description String
    Get a description, such as "look in book", where "in" has been defined as a key at asset.descriptions.in. "look" is always the default description.

    Returns:

    String
    getIndirectDescription(indirect_aspect, indirect_asset, direct_aspect) → {String}

    Defined in: adventure/asset/getIndirectDescription.js, line 6

    Inherited from: adventurejs.Asset#getIndirectDescription

    Parameters:

    • indirect_aspect String
    • indirect_asset Object
    • direct_aspect String
    Get indirect description, such as "look at this through magnifying glass", where "through magnifying glass" is a key at asset.descriptions["through magnifying glass"].description "look" is always the default direct object description.

    Returns:

    String
    getInheritance() → {Array}

    Defined in: adventure/Atom.js, line 238

    Inherited from: adventurejs.Atom#getInheritance

    getInheritance is a utility method to get an asset's inheritance chain. Returns a list of class names from high to low.

    Returns:

    Array
    getListableContents() → {Array}

    Defined in: adventure/assets/tangible/getListableContents.js, line 6

    Inherited from: adventurejs.Tangible#getListableContents

    Get an array of assets within this asset that are listable in this asset's description, for example when player examines this.

    Returns:

    Array
    getNestedInstancesOfClass(instanceClass) → {Array}

    Defined in: adventure/assets/tangible/getNestedInstancesOfClass.js, line 6

    Inherited from: adventurejs.Tangible#getNestedInstancesOfClass

    Parameters:

    • instanceClass String
    Find instances of specified class within this asset, for example find all coins within a purse. Returns an array of asset IDs.

    Returns:

    Array
    getOpenOrClosed() → {Array}

    Defined in: adventure/assets/tangible/getOpenOrClosed.js, line 6

    Inherited from: adventurejs.Tangible#getOpenOrClosed

    Print a string representing open / closed state of this asset.

    Returns:

    Array
    getPlaceAspect() → {Object|null}

    Defined in: adventure/assets/tangible/getPlaceAspect.js, line 6

    Inherited from: adventurejs.Tangible#getPlaceAspect

    Returns the aspect object of this asset's parent asset or null.

    Returns:

    Object | null
    getPlaceAspectId() → {String}

    Defined in: adventure/assets/tangible/getPlacePreposition.js, line 6

    Inherited from: adventurejs.Tangible#getPlaceAspectId

    Returns the aspect id of this asset's parent asset, or a blank string.

    Returns:

    String
    getPlaceAsset() → {Object|Boolean}

    Defined in: adventure/assets/tangible/getPlaceAsset.js, line 6

    Inherited from: adventurejs.Tangible#getPlaceAsset

    Get the object of this asset's parent asset.

    Returns:

    Object | Boolean
    getPlaceAssetId() → {String}

    Defined in: adventure/assets/tangible/getPlaceAssetId.js, line 6

    Inherited from: adventurejs.Tangible#getPlaceAssetId

    Returns the ID of asset's parent or a blank string.

    Returns:

    String
    getPrintableListOfContents(params) → {String}

    Defined in: adventure/assets/tangible/getPrintableListOfContents.js, line 6

    Inherited from: adventurejs.Tangible#getPrintableListOfContents

    Parameters:

    • params Object
    Get a printable list of assets within all Aspects of this asset, for example to append to asset description when player inputs "examine this". Returns a string.

    Returns:

    String
    getProperty(prop) → {Boolean}

    Defined in: adventure/Atom.js, line 184

    Inherited from: adventurejs.Atom#getProperty

    Parameters:

    • prop String
      Name of the property to test for. Can include dot notation.
    A method to get a deep property without throwing an error. Allows for getting deep properties, ie "foo.bar.baz". Returns false if property doesn't exist, so beware of if(false === foo.bar.baz) comparisons.

    Returns:

    Boolean
    getRoomAsset() → {String}

    Defined in: adventure/assets/tangible/getRoomAsset.js, line 6

    Inherited from: adventurejs.Tangible#getRoomAsset

    Get the asset of the room this asset is in.

    Returns:

    String
    getRoomId() → {String}

    Defined in: adventure/assets/tangible/getRoomId.js, line 6

    Inherited from: adventurejs.Tangible#getRoomId

    Get the ID of the room this asset is in.

    Returns:

    String
    getRopesThatBlockTravel() → {Array}

    Defined in: adventure/assets/tangible/getRopesThatBlockTravel.js, line 6

    Inherited from: adventurejs.Tangible#getRopesThatBlockTravel

    Check if player is holding a rope, or tied by a rope, that is tied at the other end, preventing player from leaving room. Return a list of assets that meet this qualification.

    Returns:

    Array
    getSubstanceAt() → {String}

    Defined in: adventure/assets/tangible/getSubstanceAt.js, line 6

    Inherited from: adventurejs.Tangible#getSubstanceAt

    Get the substance, if any, contained in this asset.

    Returns:

    String
    getThingThisIsTiedToPlayerBy() → {Object}

    Defined in: adventure/assets/tangible/getThingThisIsTiedToPlayerBy.js, line 6

    Inherited from: adventurejs.Tangible#getThingThisIsTiedToPlayerBy

    Assuming this asset is tied to the player asset by means of a third thing, get that third thing. Returns an asset object.

    Returns:

    Object
    getTiedThingsThatDragOnTravel() → {Array}

    Defined in: adventure/assets/tangible/getTiedThingsThatDragOnTravel.js, line 6

    Inherited from: adventurejs.Tangible#getTiedThingsThatDragOnTravel

    Check if player is holding a rope, or tied by a rope, that is tied at the other end to an asset that can travel with player. Return a list of assets that meet this qualification.

    Returns:

    Array
    getVesselAt(aspect) → {Object|Null}

    Defined in: adventure/assets/tangible/getVesselAt.js, line 6

    Inherited from: adventurejs.Tangible#getVesselAt

    Parameters:

    • aspect string
      The aspect to check.
    Get substance container at specified preposition.

    Returns:

    Object | Null
    getYBottom() → {Float}

    Defined in: adventure/assets/tangible/getYBottom.js, line 6

    Inherited from: adventurejs.Tangible#getYBottom

    Get this asset's global bottom y based on its y and height, which may be negative.

    Returns:

    Float
    getYRange() → {Object}

    Defined in: adventure/assets/tangible/getYRange.js, line 6

    Inherited from: adventurejs.Tangible#getYRange

    Get this asset's bottom y and top y based on its y and height, which may be negative.

    Returns:

    Object
    getYTop() → {Float}

    Defined in: adventure/assets/tangible/getYTop.js, line 6

    Inherited from: adventurejs.Tangible#getYTop

    Get this asset's global top y based on its y and height.

    Returns:

    Float
    has()

    Defined in: adventure/asset/_has.js, line 7

    Inherited from: adventurejs.Asset#has

    has is an alias to asset.isIn() that reverses the direct and indirect objects, to test whether that asset is in this asset.
    if( MyGame.$('crown').$has('jewel') ){ // do stuff }
    
    hasAspectAt(aspect) → {Boolean}

    Defined in: adventure/assets/tangible/hasAspectAt.js, line 6

    Inherited from: adventurejs.Tangible#hasAspectAt

    Parameters:

    • aspect String
    Determine whether asset has an aspect at specified preposition.

    Returns:

    Boolean
    hasClass(prop) → {Boolean}

    Defined in: adventure/Atom.js, line 216

    Inherited from: adventurejs.Atom#hasClass

    Parameters:

    • prop String
      Name of the classe to test for.
    A method to test whether the Atom is an instance of a given class.

    Returns:

    Boolean
    hasContentsAtAspect(aspect) → {Boolean}

    Defined in: adventure/assets/tangible/hasContentsAtAspect.js, line 6

    Inherited from: adventurejs.Tangible#hasContentsAtAspect

    Parameters:

    • aspect String
    Determine whether asset has contents at the specified aspect.

    Returns:

    Boolean
    hasDescription(description) → {String|Boolean}

    Defined in: adventure/asset/hasDescription.js, line 6

    Inherited from: adventurejs.Asset#hasDescription

    Parameters:

    • description String
    See if asset has a description for an aspect, such as "look in book", where "in" has been defined as a key at asset.descriptions.in. "look" is always the default description.

    Returns:

    String | Boolean
    hasEventHook(hook, asset_name) → {Boolean}

    Defined in: adventure/asset/hasEventHook.js, line 6

    Inherited from: adventurejs.Asset#hasEventHook