Pre-release
Adventure.js Docs Downloads
Score: 0 Moves: 0

Scenery: global_mountains

Instance of: adventurejs.Scenery

Defined in: adventure/assets/tangibles/scenery/GlobalMountains.js, line 6

More info: NextSteps_GlobalScenery

Runtime node: game.world.global_mountains

global_mountains is an instance of Scenery. Global scenery provides a way to return a message when a player examines distant scenery that has not specifically been coded but which a player might expect would be present, such as sun, sky, moon, stars, the air, etc. Messages can be customized and scenery enabled/disabled by Room, by Zone, or for the entire Game. GlobalScenery objects are disabled by default. To learn how to enable and customize them, see Global Scenery.

Example:

Here's an example of how to set GlobalScenery descriptions per Room. Though global Assets are, in fact, global, the descriptions you set for them in a Room are local to that Room, so that each Room can set different descriptions. Room settings take precedence over Zone settings or global settings.

MyGame.createAsset({
  class: "Room",
  name: "The Moors",
  room_scenery: 
  {
    global_moon: { 
      enabled: true, 
      description: "It's just a slightly brighter patch among the misty darkness. ", 
    },
    global_stars: { 
      enabled: true, 
      description: "They're impossible to see through the thick mists. ",
    },
    global_sun: { enabled: false, }, // parser would return generic not found message
  }
});

Here's an example of how to set GlobalScenery descriptions per Zone. Zones can be shared by multiple Rooms. Room settings take precedence over Zone settings, and Zone settings take precedence over global settings.

MyGame.createAsset({
  class: "Zone", 
  name: "Frigid Wastes",
  zone_scenery: 
  {
    global_wind: { 
      enabled: true, 
      description: "The freezing wind tears your body heat to tatters. ",
    },
    global_sun: { 
      enabled: true, 
      description: "It's simultaneously washed out yet blindingly bright. ",
    },
  },
});
MyGame.createAsset({
  class: "Room",
  name: "Icy Flow",
  zone: "Frigid Wastes",
  description: "Stripped bare by icy winds. You begin to think you may die here. ",
});

Here's an example of how to set GlobalScenery descriptions for anywhere in the game. These will be presented in every Room, unless overridden by Zone or Room settings.

MyGame.setGlobalDescriptions({
  global_sun: { 
    enabled: true, 
    description: "Sun and moon are visible together in the strange sky. ",
  },
  global_moon: { 
    enabled: true, 
    description: "Moon and sun revolve together in the strange twilit sky. ",
  },
});

To learn more, see Global Scenery.

Private Constructor:

MyGame.createGlobalScenery({ "name": "global_mountains", [...] });

global_mountains is a predefined instance of Scenery that gets constructed automatically at runtime. It is defined in the library as a generic object, and then passed to Game#createGlobalScenery for construction, validation, and initialization. Because this is predefined, authors should not need to create new instances. For information on modifying predefined Scenery, see Global Scenery.

GlobalScenery are instances of adventurejs.Scenery (and not a unique global class). Global assets can be referenced from anywhere in the game world and exist primarily to catch player inputs that refer to things that might be present, but aren't. For example, if a player enters "examine east exit" in a room which hasn't got one.

Authors can modify global_mountains via their game files through the use of adventurejs.Game#setGlobalDescriptions.

Inherited Overrides

Index

Methods:

Properties:

Methods Collapse all  |  Expand all

$can()

Defined in: adventure/asset/$can.js, line 7

Inherited from: adventurejs.Asset#$can

$can() is a general method for getting at asset properties stored in asset.can.
$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("body")
    asking, is this asset a body of substance such as a lake or sandy desert?
  • assetA.$is("closed")
    asking, is this asset closed?
  • 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("in", assetB)
    accepts any preposition, asking, is this asset in that aspect of that asset?
  • assetA.$is("locked")
    asking, is this asset locked?
  • assetA.$is("nested in", assetB)
    nested in, specific to character classes, asking, is this asset nested in that asset?
  • assetA.$is("open")
    asking, is this asset open?
  • assetA.$is("plugged")
    asking, is this asset plugged?
  • assetA.$is("sealed")
    asking, is this asset sealed?
  • assetA.$is("takeable")
    asking, can this asset be taken?
  • assetA.$is("unlocked")
    asking, is this asset unlocked?
  • assetA.$is("unplugged")
    asking, is this asset unplugged?
  • assetA.$is("unsealed")
    asking, is this asset unsealed?
  • assetA.$is("worn")
    asking, is this asset being worn?
  • assetA.$is("zipped")
    asking, is this asset zipped?
$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 actions.
$must()

Defined in: adventure/asset/$must.js, line 7

Inherited from: adventurejs.Asset#$must

$must() is a general method for getting at asset properties stored in asset.must.
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(words, type)

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

Inherited from: adventurejs.Asset#addWordsToLookup

Parameters:

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

Defined in: adventure/Asset.js, line 662

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
callAction(hook, asset_name, params) → {Boolean}

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

Inherited from: adventurejs.Asset#callAction

Parameters:

  • hook string
  • asset_name string
    We use asset.name here instead of asset.id in support of authors, because we're never asking them to deal in IDs, only names. Hooks will only be defined by authors, so we let them use asset.name as their identifier. We do however make an effort to see if an id has been passed instead of a name, because Ivan.
  • params object
    Arbitrary parameter object.
Check if this asset has a general verb action or reaction for the specified event, or if the asset has an action for the specific asset. If either form is found, pass it to getStringOrArrayOrFunction and return the results. If the result returns false or null it will terminate the calling verb's default behavior.

Returns:

Boolean
canBePut(aspect, asset) → {Boolean}

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

Inherited from: adventurejs.Tangible#canBePut

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.dov[verb].enabled is true

Returns:

Boolean
destroy()

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

Inherited from: adventurejs.Tangible#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.dov[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.dov[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.dov[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.dov.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.dov[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.
findClassInThis(instanceClass) → {Array}

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

Inherited from: adventurejs.Tangible#findClassInThis

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
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 151

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
getNestOrPlacePreposition() → {Boolean}

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

Inherited from: adventurejs.Tangible#getNestOrPlacePreposition

Get preposition of character's parent aspect. If character is nested, returns nest asset preposition, otherwise returns room asset preposition.

Returns:

Boolean
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
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
getPlacePreposition() → {String}

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

Inherited from: adventurejs.Tangible#getPlacePreposition

Returns the aspect id of this asset's parent asset, 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
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
getY() → {Float}

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

Inherited from: adventurejs.Tangible#getY

Get this asset's global y.

Returns:

Float
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 }
hasAction(hook_name, asset1_name, asset2_name) → {Boolean}

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

Inherited from: adventurejs.Asset#hasAction

Parameters:

  • hook_name string
  • asset1_name string
    We use asset.name here instead of asset.id to make life slightly easier for authors. Asset IDs are formed from asset names, but generally we don't expect authors to be aware of IDs. Hooks will only be defined by authors, so let them use asset.name as their identifier. We do however make an effort to see if an id has been passed instead of a name.
  • asset2_name string
Check if this asset has a general verb action or reaction for the specified event, or if the asset has an action for the specific asset.

Returns:

Boolean
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 131

Inherited from: adventurejs.Atom#hasClass

Parameters:

  • prop String
    Name of the class 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
hasIndirectDescription(indirect_aspect, indirect_asset, direct_aspect) → {String|Boolean}

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

Inherited from: adventurejs.Asset#hasIndirectDescription

Parameters:

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

Returns:

String | Boolean
hasListableContents() → {Boolean}

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

Inherited from: adventurejs.Tangible#hasListableContents

Todos: transparent containers

Check whether this asset has any listable contents.

Returns:

Boolean
hasPlace() → {Boolean}

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

Inherited from: adventurejs.Tangible#hasPlace

Determine whether asset has a place.

Returns:

Boolean
hasPropertyOnAspectAt() → {Boolean}

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

Inherited from: adventurejs.Tangible#hasPropertyOnAspectAt

Deprecated
  • this will likely go away
Determine whether asset has specified property on specified aspect. Useful for testing whether properties exist before trying to assign to them.

Returns:

Boolean
hasRopesThatBlockTravel() → {Boolean}

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

Inherited from: adventurejs.Tangible#hasRopesThatBlockTravel

Determine if player is holding or tied by any ropes that block travel to other rooms.

Returns:

Boolean
hasTiedThingsThatDragOnTravel() → {Boolean}

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

Inherited from: adventurejs.Tangible#hasTiedThingsThatDragOnTravel

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. Returns a boolean indicating whether any asset meets this qualification.

Returns:

Boolean
hasVessel() → {Boolean}

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

Inherited from: adventurejs.Tangible#hasVessel

Determine whether asset has any aspect with a vessel.

Returns:

Boolean
hasVesselAtAspect(aspect) → {Boolean}

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

Inherited from: adventurejs.Tangible#hasVesselAtAspect

Parameters:

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

Returns:

Boolean
incrementDoVerbCount(verb, index)

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

Inherited from: adventurejs.Asset#incrementDoVerbCount

Parameters:

  • verb String
  • index Int
incrementDoVerbCount takes a verb and an index and updates this asset's count of the number of times the verb has acted upon it.
incrementTryVerbCount(verb, index)

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

Inherited from: adventurejs.Asset#incrementTryVerbCount

Parameters:

  • verb String
  • index Int
incrementTryVerbCount takes a verb and an index and updates this asset's count of the number of times the verb has attempted upon it.
initialize(game) → {Boolean}

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

Inherited from: adventurejs.Tangible#initialize

Parameters:

  • game Object
Inherited from superclass Asset. Tangible adds initialization methods that are used for all Tangible assets, including:
  • link related objects
  • register parts

Returns:

Boolean
IOVallowOnce(verb) → {Boolean}

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

Inherited from: adventurejs.Asset#IOVallowOnce

Parameters:

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

Returns:

Boolean
IOVallowWithAnything(verb) → {Boolean}

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

Inherited from: adventurejs.Asset#IOVallowWithAnything

Parameters:

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

Returns:

Boolean
IOVallowWithAsset(verb, asset) → {Boolean}

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

Inherited from: adventurejs.Asset#IOVallowWithAsset

Parameters:

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

Returns:

Boolean
IOVallowWithNothing(verb) → {Boolean}

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

Inherited from: adventurejs.Asset#IOVallowWithNothing

Parameters:

  • verb String
IOVallowWithNothing is a method to check whether this asset is subscribed to act as an indirect object with the specified verb without any direct object. Unlikely to happen but provided for completionism.

Returns:

Boolean
IOVdidDo(verb) → {Boolean}

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

Inherited from: adventurejs.Asset#IOVdidDo

Parameters:

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

_iDidDo is an alias meant for authors.

Returns:

Boolean
IOVdidDoCount(verb) → {Int}

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

Inherited from: adventurejs.Asset#IOVdidDoCount

Parameters:

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

_iDoCount is an alias meant for authors.

Returns:

Int
IOVdidTry(verb) → {Boolean}

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

Inherited from: adventurejs.Asset#IOVdidTry

Parameters:

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

_iDidTry is an alias meant for authors.

Returns:

Boolean
IOVdidTryCount(verb) → {Boolean}

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

Inherited from: adventurejs.Asset#IOVdidTryCount

Parameters:

  • verb String
IOVdidTryCount is a method to get a count of times it was attempted to use this asset as an indirect object by the specified verb.

_iTryCount is an alias meant for authors.

Returns:

Boolean
IOVgetConnectionCount(verb) → {Int}

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

Inherited from: adventurejs.Asset#IOVgetConnectionCount

Parameters:

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

Returns:

Int
IOVgetConnections(verb) → {Array}

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

Inherited from: adventurejs.Asset#IOVgetConnections

Parameters:

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

Returns:

Array
IOVgetMaxConnections(verb) → {Int}

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

Inherited from: adventurejs.Asset#IOVgetMaxConnections

Parameters:

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

Returns:

Int
IOVhasDirectObjects(verb) → {Boolean}

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

Inherited from: adventurejs.Asset#IOVhasDirectObjects

Parameters:

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

Returns:

Boolean
IOVhasMaxConnections(verb) → {Boolean}

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

Inherited from: adventurejs.Asset#IOVhasMaxConnections

Parameters:

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

Returns:

Boolean
IOVincrementDoCount(verb)

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

Inherited from: adventurejs.Asset#IOVincrementDoCount

Parameters:

  • verb String
IOVincrementDoCount is a method to increment the number of times the specified verb has acted on this asset as an indirect object.
IOVincrementTryCount(verb)

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

Inherited from: adventurejs.Asset#IOVincrementTryCount

Parameters:

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

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

Inherited from: adventurejs.Asset#IOVisConnectedToAnything

Parameters:

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

Returns:

Boolean
IOVisConnectedToAsset(verb, asset) → {Boolean}

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

Inherited from: adventurejs.Asset#IOVisConnectedToAsset

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 an indirect object to the specified direct object by the specified verb. For example, in the case of a computer plugged into an outlet, the outlet would be the indirect object, and calling this method on it would return true.

Returns:

Boolean
IOVisConnectedToNothing(verb) → {Boolean}

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

Inherited from: adventurejs.Asset#IOVisConnectedToNothing

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. (This seems like an unlikely situation as of this writing, but is offered for completion with DOVisConnectedToNothing which does have at least one use case.)

Returns:

Boolean
IOVsetConnection(verb, asset)

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

Inherited from: adventurejs.Asset#IOVsetConnection

Parameters:

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

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

Inherited from: adventurejs.Asset#IOVsetWithAsset

Parameters:

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

Returns:

Boolean
IOVsetWithClass(verb, clas) → {Boolean}

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

Inherited from: adventurejs.Asset#IOVsetWithClass

Parameters:

  • verb String
  • clas String
IOVsetWithClass is a method to add a direct object class to asset.iov[verb].with_classes.

Returns:

Boolean
IOVunsetConnection(verb, asset)

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

Inherited from: adventurejs.Asset#IOVunsetConnection

Parameters:

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

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

Inherited from: adventurejs.Asset#isDOV

Parameters:

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

Returns:

Boolean
isIn(asset)

Defined in: adventure/assets/tangible/$isIn.js, line 7

Inherited from: adventurejs.Tangible#isIn

Parameters:

  • asset Object | String
    Can be string or object.
isIn tests whether one asset is in (any aspect of) another asset.
if( MyGame.$('jewel').$isIn('crown') ){ // do stuff }
isIOV(verb) → {Boolean}

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

Inherited from: adventurejs.Asset#isIOV

Parameters:

  • verb String
isIOV is a method to check whether this asset is subscribed to allow the specified verb to act on it as an indirect object.

Returns:

Boolean
isPlacedAtAspect() → {Boolean}

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

Inherited from: adventurejs.Tangible#isPlacedAtAspect

Verify that asset is in the specified aspect. For example, cap.isPlacedAtAspect( 'attached' )

Returns:

Boolean
isPlacedAtAspectAndAsset(aspect, asset) → {Boolean}

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

Inherited from: adventurejs.Tangible#isPlacedAtAspectAndAsset

Parameters:

  • aspect String
  • asset String
Determine whether asset has a place. Can be used to test against specific aspects and parent assets. For example, cap.isPlacedAtAspectAndAsset( 'attached', 'pen' )

Returns:

Boolean
isState(verb) → {Boolean}

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

Inherited from: adventurejs.Asset#isState

Parameters:

  • verb String
isState is a method to check whether this asset already has state set by the specified verb.

Returns:

Boolean
isWithinYRange(asset) → {Boolean}

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

Inherited from: adventurejs.Tangible#isWithinYRange

Parameters:

  • asset Object
Determine whether this asset's y position is within another asset's y range, aka its height from its y position.

Returns:

Boolean
linkRegisteredParts()

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

Inherited from: adventurejs.Tangible#linkRegisteredParts

linkRegisteredParts does the bulk of the work for registerParts. The base method defined in Tangible is blank. Subclasses that can make use of it will override the method as needed.
moveFrom(asset) → {Boolean}

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

Inherited from: adventurejs.Tangible#moveFrom

Parameters:

  • asset Object
$moveFrom is an author shortcut that is similar to moveFrom but which bypasses onRemoveThatFromThis, avoiding the consequences of any verb actions.

Returns:

Boolean
moveTo(aspect, asset)

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

Inherited from: adventurejs.Tangible#moveTo

Parameters:

  • aspect String
  • asset Object
moveFrom is an alias to onMoveThatToThis but with asset and this reversed purely for syntactic convenience.
onAddSubstanceToThis(asset)

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

Inherited from: adventurejs.Tangible#onAddSubstanceToThis

Parameters:

  • asset Object
Called when a substance asset is added to this, providing an opportunity to override default behavior through the use of verb effect hook doAddSubstanceToThis.
onChangeGravity()

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

Inherited from: adventurejs.Tangible#onChangeGravity

Called when there is a change in gravity, providing an opportunity to override default behavior through the use of verb effect hook doChangeGravity.
onChangeMoisture(asset)

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

Inherited from: adventurejs.Tangible#onChangeMoisture

Todos: This should probably take a moisture value rather than an asset.

Parameters:

  • asset Object
Called when there is a change in moisture level, providing an opportunity to override default behavior through the use of verb effect hook doChangeMoisture.
onChangeTemperature()

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

Inherited from: adventurejs.Tangible#onChangeTemperature

Called when there is a change in temperature, providing an opportunity to override default behavior through the use of verb effect hook doChangeTemperature.
onMoveThatToThis(asset, where) → {Boolean}

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

Inherited from: adventurejs.Tangible#onMoveThatToThis

Parameters:

  • asset Object
  • where String
Called when another asset is added to this. Provides opportunities to override default behavior through the use of verb reactions doMoveThisToThat and doMoveThatToThis.

Returns:

Boolean
onNestThatToThis(player) → {Boolean}

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

Inherited from: adventurejs.Tangible#onNestThatToThis

Parameters:

  • player Object
Called when a player asset is nested to this. Provides an opportunity to override default behavior through the use of verb reactions doNestThatToThis.

Returns:

Boolean
onRemoveThatFromThis(asset) → {Boolean}

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

Inherited from: adventurejs.Tangible#onRemoveThatFromThis

Parameters:

  • asset Object
Called when another asset is removed from this. Provides opportunities to override default behavior through the use of verb reactions doRemoveThisFromThat and doRemoveThatFromThis.

Returns:

Boolean
onSubtractSubstanceFromThis(asset)

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

Inherited from: adventurejs.Tangible#onSubtractSubstanceFromThis

Parameters:

  • asset Object
Called when a substance is subtracted from this, providing an opportunity to override default behavior through the use of verb reactions doSubtractSubstanceFromThis.
onTieThisToThat(asset) → {Boolean}

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

Inherited from: adventurejs.Tangible#onTieThisToThat

Parameters:

  • asset Object
Called when this asset is tied to another asset. Provides opportunities to override default behavior through the use of verb reactions doTieThisToThat and doTieThatToThis.

Returns:

Boolean
onUnnestThatFromThis(player) → {Boolean}

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

Inherited from: adventurejs.Tangible#onUnnestThatFromThis

Parameters:

  • player Object
Called when player is unnested from this asset. Provides an opportunity to override default behavior through the use of verb reactions doUnnestThatFromThis.

Returns:

Boolean
onUntieThisFromThat(asset) → {Boolean}

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

Inherited from: adventurejs.Tangible#onUntieThisFromThat

Parameters:

  • asset Object
Called when this asset is untied from another asset. Provides opportunities to override default behavior through the use of verb reactions doUntieThisFromThat and doUntieThatFromThis.

Returns:

Boolean
put(preposition, indirect_object)

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

Inherited from: adventurejs.Tangible#put

Parameters:

  • preposition String
  • indirect_object Object | String
    asset object or name/id
put places one asset inside another, bypassing onMoveThatToThis and subsequent doMoveThatToThis/doMoveThisToThat.
redirectVerb(oldVerb, newVerb)

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

Inherited from: adventurejs.Asset#redirectVerb

Parameters:

  • oldVerb String
  • newVerb String
redirectVerb is a method for setting a verb redirect on this asset, such that when one verb is called on the asset, another verb will be called instead. Example: player enters "hit person", it is redirected to "slap person".
registerParts()

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

Inherited from: adventurejs.Tangible#registerParts

registerParts is a shortcut method for use with complex objects that have interlinked parts. For example, a sink of class Drainable can have a faucet, a drain, and multiple handles, each of which interact with the base object or other objects in the collection in different ways. Registering parts with the base object offers an opportunity to create object references and share variables.
removeAssetAt() → {Array}

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

Inherited from: adventurejs.Tangible#removeAssetAt

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

Returns:

Array
removeThatFromThis(asset)

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

Inherited from: adventurejs.Tangible#removeThatFromThis

Parameters:

  • asset Object
Removes an asset from another asset. It's not meant to be called directly, but is the last piece, or bedrock, of the removal process after checking for custom logic.
set(props) → {Object}

Defined in: adventure/Atom.js, line 119

Inherited from: adventurejs.Atom#set

Parameters:

  • props Object
    A generic object containing properties to copy to the Object instance.
Provides a chainable shortcut method for setting a number of properties on the instance.

Returns:

Object Returns the instance the method is called on (useful for chaining calls.)
setAllAspectsContentsKnown()

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

Inherited from: adventurejs.Tangible#setAllAspectsContentsKnown

This function will try to set all aspect contents of this asset known.
setAllAspectsContentsSeen()

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

Inherited from: adventurejs.Tangible#setAllAspectsContentsSeen

This function will try to set all aspect contents of this asset seen.
setAspectAt(aspect) → {Array}

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

Inherited from: adventurejs.Tangible#setAspectAt

Parameters:

  • aspect string
    The aspect to add.
Add an aspect at the specified aspect on this asset.

Returns:

Array
setAspectContentsKnown()

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

Inherited from: adventurejs.Tangible#setAspectContentsKnown

When player knows an asset, call this function to make its contents known. Generally, contents of behind/in/on/under are listed automatically and known, whereas attachments may go unlisted in room descriptions. This function is chiefly for setting is.known for attachments, but can be applied to any aspects.
setAspectContentsSeen()

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

Inherited from: adventurejs.Tangible#setAspectContentsSeen

When player sees an asset, call this function to make its contents known. Generally, contents of behind/in/on/under are listed automatically and seen, whereas attachments may go unlisted in room descriptions. This function is chiefly for setting is.seen for attachments, but can be applied to any aspects.
setAttachmentsKnown()

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

Inherited from: adventurejs.Tangible#setAttachmentsKnown

Attachments may go unlisted in room descriptions unlike other assets. It's assumed that the author will include them in their parent's description. For example "The desk has a drawer" where drawer is an attachment. When these assets go unlisted, they miss being marked as seen / known like other assets. This function explicitly sets is.known / is.seen properties for attachments.
setClosed(bool)

Defined in: adventure/assets/tangible/setClosed.js, line 7

Inherited from: adventurejs.Tangible#setClosed

Parameters:

  • bool Boolean
setClosed sets an object closed, also setting any linked assets closed.
setDOV(verb, params)

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

Inherited from: adventurejs.Asset#setDOV

Parameters:

  • verb String
  • params Object
setDOV is a passthrough to setVerbSubscription with direct object specified.
setDOVs(verb, params)

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

Inherited from: adventurejs.Asset#setDOVs

Parameters:

  • verb String
  • params Object
setDOVs is a passthrough to send multiple verbs to setVerbSubscription with direct object specified.
setIOV(verb, params)

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

Inherited from: adventurejs.Asset#setIOV

Parameters:

  • verb String
  • params Object
setIOV is a passthrough to setVerbSubscription with indirect object specified.
setIOVs(verb, params)

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

Inherited from: adventurejs.Asset#setIOVs

Parameters:

  • verb String
  • params Object
setIOVs is a passthrough to send multiple verbs to setVerbSubscription with indirect object specified.
setKnown(bool)

Defined in: adventure/assets/tangible/setKnown.js, line 7

Inherited from: adventurejs.Tangible#setKnown

Parameters:

  • bool Boolean
setKnown sets an object known, also setting any linked assets known.
setLinkedState(bool)

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

Inherited from: adventurejs.Asset#setLinkedState

Parameters:

  • bool Boolean
setLinkedState sets an asset and its linked asset to the specified state.
setLocked(bool)

Defined in: adventure/assets/tangible/setLocked.js, line 7

Inherited from: adventurejs.Tangible#setLocked

Parameters:

  • bool Boolean
setLocked sets an asset locked, also setting any linked assets locked.
setObjectOfVerbs(object_of, verb)

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

Inherited from: adventurejs.Asset#setObjectOfVerbs

Parameters:

  • object_of String
  • verb String
setObjectOfVerbs is a convenience method that passes a list of verb names through to setVerbSubscription.
setPlace(aspect, asset_id) → {Object}

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

Inherited from: adventurejs.Tangible#setPlace

Parameters:

  • aspect String
  • asset_id String
Set an asset's place, aka parent asset and aspect. This is how one thing is put inside another. cap.setPlace( 'attached', 'pen' );

Returns:

Object
setPosition(params) → {Object}

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

Inherited from: adventurejs.Tangible#setPosition

Parameters:

  • params Object
Set this asset's global position.

Returns:

Object
setSealed(bool)

Defined in: adventure/assets/tangible/setSealed.js, line 7

Inherited from: adventurejs.Tangible#setSealed

Parameters:

  • bool Boolean
setSealed sets an asset sealed, also setting any linked assets sealed.
setSeen(bool)

Defined in: adventure/assets/tangible/setSeen.js, line 7

Inherited from: adventurejs.Tangible#setSeen

Parameters:

  • bool Boolean
Used to track whether player has seen this asset. 'seen' and 'known' are distinct because a player may learn about a thing without seeing it.
setState(verb, bool)

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

Inherited from: adventurejs.Asset#setState

Parameters:

  • verb String
  • bool Boolean
Apply the specified state change to the asset.
setUsed(bool)

Defined in: adventure/assets/tangible/setUsed.js, line 7

Inherited from: adventurejs.Tangible#setUsed

Parameters:

  • bool Boolean
Set whether player has used this asset. Used chiefly for Exit class to say whether player has used an exit before. This figures into 'go to', which excludes exits a player has never used from its pathfinding algorithm.
setVerbSubscription(object_of, verb, params)

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

Inherited from: adventurejs.Asset#setVerbSubscription

Todos: phase out earlier version

Parameters:

  • object_of String
  • verb String | Object
    An early version takes a string, with separate params object. A later version takes an object that includes the verb name as an object key and params as value.
  • params Object
    An optional param that works with the earlier version.
setVerbSubscription constructs verb subscriptions at asset.dov / asset.iov. It's intended mostly as a private function, though it is available to authors. An early version takes a string with separate params object. A later version takes an object that includes the verb name as an object key and params as value. // valid (for now) early version this.setIOV('hold',{with_params:{max_connections:2}}); // valid later version with one verb this.setIOV( { hold: { with_params: { max_connections:2 } } } ); // valid later version with multiple verbs this.setIOVs([ { hold: { with_params: { max_connections:3 } } }, { smell: true }, ]);
setVerbSubscriptionsWithAssets(description) → {String}

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

Inherited from: adventurejs.Asset#setVerbSubscriptionsWithAssets

Parameters:

  • description String
Link assets that connect via verb subscriptions. For example, imagine "hit target with sword", where we have target.dov.hit.with_assets:["sword"] This pass will set sword.iov.hit.with_assets:["target"] to ensure that both assets are in sync and either can be queried.

Returns:

String
setVerbSubscriptionsWithConnection()

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

Inherited from: adventurejs.Asset#setVerbSubscriptionsWithConnection

Make any connections specified in the game file. Assets can subscribe to verbs with dov[verb] and some verbs make connections between assets that they act upon, which are recorded in dov[verb].with_params.connections. Authors can preset connections in their game file, and in case they only set one of two connected assets, we want to ensure that both assets are marked as connected, so we check that here.
setVesselAt(aspect) → {Array}

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

Inherited from: adventurejs.Tangible#setVesselAt

Parameters:

  • aspect string
    The aspect to add.
Add a substance container at the specified aspect on this asset.

Returns:

Array
setX(value) → {Float}

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

Inherited from: adventurejs.Tangible#setX

Parameters:

  • value Float
Set this asset's global x position.

Returns:

Float
setY(value) → {Float}

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

Inherited from: adventurejs.Tangible#setY

Parameters:

  • value Float
Set this asset's global y position.

Returns:

Float
setZ(value) → {Float}

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

Inherited from: adventurejs.Tangible#setZ

Parameters:

  • value Float
Set this asset's global x position.

Returns:

Float
toggleState(verb) → {Boolean}

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

Inherited from: adventurejs.Asset#toggleState

Parameters:

  • verb String
Apply the specified verb's state change to the asset.

Returns:

Boolean
undestroy()

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

Inherited from: adventurejs.Asset#undestroy

undestroy is called to return a destroyed asset to the game world.
unfasten() → {string}

Defined in: adventure/assets/tangible/unfasten.js, line 7

Inherited from: adventurejs.Tangible#unfasten

unfasten tries several methods for unfastening.

Returns:

string
unredirectVerb(oldVerb)

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

Inherited from: adventurejs.Asset#unredirectVerb

Parameters:

  • oldVerb String
unredirectVerb is a method for removing previously set verb redirects.
unsetDOV(verb)

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

Inherited from: adventurejs.Asset#unsetDOV

Parameters:

  • verb String
unsetDOV is a passthrough to unsetVerbSubscription.
unsetDOVs(verbs)

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

Inherited from: adventurejs.Asset#unsetDOVs

Parameters:

  • verbs Array
unsetDOVs is a passthrough to unsetVerbSubscription.
unsetIOV(verb)

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

Inherited from: adventurejs.Asset#unsetIOV

Parameters:

  • verb String
unsetIOV is a passthrough to unsetVerbSubscription.
unsetIOVs(verbs)

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

Inherited from: adventurejs.Asset#unsetIOVs

Parameters:

  • verbs Array
unsetIOVs is a passthrough to unsetVerbSubscription.
unsetVerbSubscription(object_of, verb)

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

Inherited from: adventurejs.Asset#unsetVerbSubscription

Parameters:

  • object_of String
  • verb String
unsetVerbSubscription disables the use of the specified verb with this asset, if it has been previously set.
validate(game) → {Boolean}

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

Inherited from: adventurejs.Tangible#validate

Parameters:

  • game Object
Inherited from superclass Asset. Tangible adds validation methods that are used for all Tangible assets, including:
  • check for implied dependencies and make them explicit
  • check for proper asset location
  • set parent associations

Returns:

Boolean

Properties  | 

absorption_quantity :Boolean

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

Inherited from: adventurejs.Tangible#absorption_quantity

Default value: 0

Set the amount of liquid an asset has absorbed. No particular logic has been implemented around absorption.
adjectives :Getter/Setter

Defined in: adventure/Asset.js, line 295

Inherited from: adventurejs.Asset#adjectives

A list of adjectives defined for this asset in the game file. Some asset classes may have predefined adjectives. If a class has predefined adjectives, and an author creates an instance of the class with custom adjectives, the custom adjectives will be appended to the predefined ones.
aperture :String

Defined in: adventure/assets/tangibles/Exit.js, line 298

Inherited from: adventurejs.Tangible#aperture

Default value: ""

Set an ID representing an Aperture. Used chiefly for Exit class to set a physical component corresponding to the exit.
append_written_strings_to_description :Boolean

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

Inherited from: adventurejs.Tangible#append_written_strings_to_description

Default value: false

Set whether strings written on this asset are appended to its description.
article_name :Getter

Defined in: adventure/Asset.js, line 388

Inherited from: adventurejs.Asset#article_name

Getter function returns asset name preceded either by definite article or indefinite article, depending on what's set for the asset's use_definite_article_in_lists property.
articlename :Getter

Defined in: adventure/Asset.js, line 402

Inherited from: adventurejs.Asset#articlename

Getter function returns asset name or proper name, depending on settings.
Articlename :Getter

Defined in: adventure/Asset.js, line 422

Inherited from: adventurejs.Asset#Articlename

Returns this.articlename with propercase.
aspects :Object

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

Inherited from: adventurejs.Tangible#aspects

Default value: {}

Containing object for Aspects, aka "in", "out", "under", "behind" etc.
buoyancy :float

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

Inherited from: adventurejs.Tangible#buoyancy

Default value: 0

Todos: Implement.

Set an asset's percent of buoyancy. No logic has been implemented around this.
can :Object

Defined in: adventure/Asset.js, line 51

Inherited from: adventurejs.Asset#can

can is a generalized container for asset boolean properties.
can.auto_open :Boolean

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

Inherited from: adventurejs.Tangible#can.auto_open

Default value: false

Nested property of Can

Set whether a closed thing can be auto-opened. This is used chiefly for 'go to', which tries to auto-open doors, something which authors might want to prevent depending on other logic.
can.auto_unlock :Boolean

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

Inherited from: adventurejs.Tangible#can.auto_unlock

Default value: false

Nested property of Can

Set whether a locked thing can be auto-unlocked. This is used chiefly for 'go to', which tries to auto-unlock doors, something which authors might want to prevent depending on other logic.
can.auto_unseal :Boolean

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

Inherited from: adventurejs.Tangible#can.auto_unseal

Default value: false

Nested property of Can

Set whether a sealed thing can be auto-unsealed. This is used chiefly for 'go to', which tries to auto-unseal apertures, something which authors might want to prevent depending on other logic.
can.be_swung_at :Boolean

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

Inherited from: adventurejs.Tangible#can.be_swung_at

Default value: true

Nested property of Can

Set whether this asset can be swung at another asset, as in swinging a bat at a ball.
collection :Getter/Setter

Defined in: adventure/Asset.js, line 169

Inherited from: adventurejs.Asset#collection

Collection is a special property that lets one object stand in for a group of objects. For example, object desk has three drawers: top_drawer, middle_drawer, bottom_drawer. desk_drawers is a scenery object attached to desk which intercepts player input like "examine drawers", so that author can return a response like "You see three drawers."
control_positions :int

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

Inherited from: adventurejs.Tangible#control_positions

Default value: 1

Used by GraduatedController class to set number of control positions for a controller, where 2 is a toggle and anything more than 2 is a dial.
control_target_id :String

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

Inherited from: adventurejs.Tangible#control_target_id

Default value: ""

Used by GraduatedController class to set target for the controller.
current_position :int

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

Inherited from: adventurejs.Tangible#current_position

Default value: 0

Used by GraduatedController class to set current position of controller. 0 means off. If 2 positions are available, 1 means on. If more than 2 positions, each position above 0 is treated as a percent of total capacity. For example in a 3 position controller, 1 = 50% and 2 = 100%;
default_aspect :String

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

Inherited from: adventurejs.Tangible#default_aspect

Default value: "on"

It's possible for player to become nested to an asset without a specified preposition. In such cases, this default aspect is used.
default_aspect_for_climb :String

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

Inherited from: adventurejs.Tangible#default_aspect_for_climb

Default value: "on"

Todos: Move string to const

When player climbs asset, set their preposition to this default.
default_aspect_for_swing_to :Boolean

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

Inherited from: adventurejs.Tangible#default_aspect_for_swing_to

Default value: false

If player becomes nested within this asset via 'swing to', set the player's preposition to this default.
default_posture_for_swing_to :Boolean

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

Inherited from: adventurejs.Tangible#default_posture_for_swing_to

Default value: false

If player becomes nested within this asset via 'swing to', set the player's posture to this default.
definite_article :String

Defined in: adventure/Asset.js, line 200

Inherited from: adventurejs.Asset#definite_article

Default value: 'the'

The asset's preferred definite article. Can be overridden in game file.
definite_name :Getter

Defined in: adventure/Asset.js, line 360

Inherited from: adventurejs.Asset#definite_name

Getter function returns asset name preceded by its definite article, example: 'the asset'.
description :*

Defined in: adventure/Asset.js, line 441

Inherited from: adventurejs.Asset#description

An alias to descriptions.look.
descriptions :Object

Defined in: adventure/Asset.js, line 145

Inherited from: adventurejs.Asset#descriptions

A list of descriptions for a variety of contexts. Only description is required, all others are optional. Most of these apply only to Tangible Asset.
  • descriptions.description -
  • descriptions.brief - used for room descriptions if player has typed "brief"
  • descriptions.verbose - used for room descriptions if player has typed "verbose"
  • descriptions.listen - used if player types "listen" or "listen to thing"
  • descriptions.in - used if player types "look in thing"
  • descriptions.through - used if player types "look through thing"
  • descriptions.smell - used if player types "smell thing"
  • descriptions.taste - used if player types "taste thing"
  • descriptions.touch - used if player types "touch thing"
  • descriptions.careful - used if player types "carefully examine thing"
did_do_verb :Object

Defined in: adventure/Asset.js, line 305

Inherited from: adventurejs.Asset#did_do_verb

did_do_verb is used to track which verbs have acted upon this object. This is a backup of the verb counter used in verb subscriptions.
did_do_verb_count :Object

Defined in: adventure/Asset.js, line 314

Inherited from: adventurejs.Asset#did_do_verb_count

did_do_verb_count is used to track the number of times that given verbs have acted upon this object. This is a backup of the verb counter used in verb subscriptions.
did_try_verb :Object

Defined in: adventure/Asset.js, line 324

Inherited from: adventurejs.Asset#did_try_verb

did_try_verb is used to track which verbs have been tried upon this object. This is a backup of the verb counter used in verb subscriptions.
did_try_verb_count :Object

Defined in: adventure/Asset.js, line 333

Inherited from: adventurejs.Asset#did_try_verb_count

did_try_verb_count is used to track the number of times that given verbs have been tried upon this object. This is a backup of the verb counter used in verb subscriptions.
dimensions :Object

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

Inherited from: adventurejs.Tangible#dimensions

Default value: {}

direction :String

Defined in: adventure/assets/tangibles/things/Aperture.js, line 81

Inherited from: adventurejs.Tangible#direction

Default value: ""

Todos: Use lookup table for this? In a GUI this would be a pull-down menu.

Set a direction for this asset. Chiefly used with Aperture class to set directions apertures. Takes a direction string, ie "north", "northeast", "down".
dont_use_articles :Boolean

Defined in: adventure/Asset.js, line 227

Inherited from: adventurejs.Asset#dont_use_articles

Default value: false

An option to prevent definite/indefinite articles from appearing before an asset name. Used chiefly for characters, to prevent phrases such as "the Mrs. Beasley". Can be overridden in game file.
dov :Boolean

Defined in: adventure/Asset.js, line 73

Inherited from: adventurejs.Asset#dov

Default value: {}

dov is a container for direct object verb subscriptions.
emits :Boolean

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

Inherited from: adventurejs.Tangible#emits

Default value: false

Todos: Write logic for this.

Set properties for a variety of things a tangible asset can emit.
exclude_from_lookup :Boolean

Defined in: adventure/Asset.js, line 119

Inherited from: adventurejs.Asset#exclude_from_lookup

Default value: false

Almost all assets will be listed in the world_lookup table that is used to find assets from player input , with some exceptions, such as SceneryZones.
exit :String

Defined in: adventure/assets/tangibles/things/Aperture.js, line 90

Inherited from: adventurejs.Tangible#exit

Default value: ""

Set an ID representing an Exit. Used chiefly for Aperture class to set an exit corresponding to an aperture.
game :Getter

Defined in: adventure/Atom.js, line 110

Inherited from: adventurejs.Atom#game

Returns the top level game object. Use this.game.
image :String

Defined in: adventure/Asset.js, line 343

Inherited from: adventurejs.Asset#image

image is used to store the id of an image in game.image_lookup that is associated with this asset.
indefinite_article :String

Defined in: adventure/Asset.js, line 208

Inherited from: adventurejs.Asset#indefinite_article

Default value: 'a'

The asset's preferred indefinite article. Can be overridden in game file.
indefinite_name :Getter

Defined in: adventure/Asset.js, line 374

Inherited from: adventurejs.Asset#indefinite_name

Getter function returns asset name preceded by its indefinite article, example: 'an asset'.
iov :Boolean

Defined in: adventure/Asset.js, line 83

Inherited from: adventurejs.Asset#iov

Default value: {}

iov is a container for direct object verb subscriptions.
is :Object

Defined in: adventure/Asset.js, line 38

Inherited from: adventurejs.Asset#is

is is a generalized container for asset states. Many states are / can be stored here. A chief benefit of this is being able to get specific states by testing asset.is.state. Note that there is also an asset.$is() method which is related to this, but is a distinct function.
is.abstract :Boolean

Defined in: adventure/asset/Asset_Is.js, line 91

Inherited from: adventurejs.Asset#is.abstract

Default value: false

Nested property of Is

Abstractions are universally available and bypass reachability tests.
is.buttoned :Boolean

Defined in: adventure/assets/Tangible_Is.js, line 136

Inherited from: adventurejs.Tangible#is.buttoned

Default value: false

Nested property of Is

Set whether this asset is buttoned.
is.climbable :Boolean

Defined in: adventure/assets/Tangible_Is.js, line 181

Inherited from: adventurejs.Tangible#is.climbable

Default value: false

Nested property of Is

Set whether this asset can be climbed.
is.closed :Boolean

Defined in: adventure/assets/Tangible_Is.js, line 158

Inherited from: adventurejs.Tangible#is.closed

Default value: false

Nested property of Is

Set whether this asset is closed.
is.collection :Boolean

Defined in: adventure/asset/Asset_Is.js, line 51

Inherited from: adventurejs.Asset#is.collection

Default value: true

Nested property of Is

Set whether object is a collection of other object IDs.
is.deep_nest :Boolean

Defined in: adventure/assets/Tangible_Is.js, line 210

Inherited from: adventurejs.Tangible#is.deep_nest

Default value: false

Nested property of Is

Set whether player can nest inside this asset when this asset is in an aspect of another asset (as opposed to being a direct child of a room). For example, a carousel horse might be on a carousel platform.
is.destroyed :Boolean

Defined in: adventure/asset/Asset_Is.js, line 36

Inherited from: adventurejs.Asset#is.destroyed

Default value: false

Nested property of Is

Set to true when an object is removed from the game by destruction.
is.distant :Boolean

Defined in: adventure/assets/Tangible_Is.js, line 98

Inherited from: adventurejs.Tangible#is.distant

Default value: false

Nested property of Is

Set whether this asset is distant. Originally meant to help define scenery assets, but mostly superseded by other scenery handling and no logic has been written for it.
is.extant :Boolean

Defined in: adventure/asset/Asset_Is.js, line 44

Inherited from: adventurejs.Asset#is.extant

Default value: true

Nested property of Is

Set to true when an object is in the game.
is.false_nest :Boolean

Defined in: adventure/assets/Tangible_Is.js, line 219

Inherited from: adventurejs.Tangible#is.false_nest

Default value: false

Nested property of Is

is.fixed :Boolean

Defined in: adventure/assets/Tangible_Is.js, line 143

Inherited from: adventurejs.Tangible#is.fixed

Default value: false

Nested property of Is

Set whether this asset is fixed in its place, such as drawers in a desk. (This may be redundant to can_be_taken.)
is.global :Boolean

Defined in: adventure/asset/Asset_Is.js, line 82

Inherited from: adventurejs.Asset#is.global

Default value: false

Nested property of Is

Almost all tangible assets have a singular location. Global assets are available in all locations in order to catch player input.
is.hidden :Getter|Boolean

Defined in: adventure/assets/Tangible_Is.js, line 43

Inherited from: adventurejs.Tangible#is.hidden

Default value: false

Nested property of Is

Todos: add logic to test conditions?

Set whether this asset is hidden.
is.hollow :Boolean

Defined in: adventure/assets/Tangible_Is.js, line 68

Inherited from: adventurejs.Tangible#is.hollow

Default value: false

Nested property of Is

Set whether this asset is hollow. Used to determine whether player can look in asset.
is.initialized :Boolean

Defined in: adventure/asset/Asset_Is.js, line 65

Inherited from: adventurejs.Asset#is.initialized

Default value: false

Nested property of Is

Used at runtime to keep track of asset's initialization state.
is.known :Boolean

Defined in: adventure/asset/Asset_Is.js, line 27

Inherited from: adventurejs.Asset#is.known

Default value: false

Nested property of Is

Todos: In games with multiple characters, any character the player takes will share this knowledge. May want an option to set this per player character.

Used to track whether player knows about an asset.
is.listed_in_parent :Boolean

Defined in: adventure/assets/Tangible_Is.js, line 91

Inherited from: adventurejs.Tangible#is.listed_in_parent

Default value: true

Nested property of Is

Set whether this asset is listed in its parent's description.
is.listed_in_room :Boolean

Defined in: adventure/assets/Tangible_Is.js, line 75

Inherited from: adventurejs.Tangible#is.listed_in_room

Default value: true

Nested property of Is

Set whether this asset is listed in the current room description.
is.locked :Boolean

Defined in: adventure/assets/Tangible_Is.js, line 151

Inherited from: adventurejs.Tangible#is.locked

Default value: false

Nested property of Is

Set whether this asset is locked.
is.lookthroughable :Boolean

Defined in: adventure/assets/Tangible_Is.js, line 202

Inherited from: adventurejs.Tangible#is.lookthroughable

Default value: false

Nested property of Is

Set whether this asset can be looked through, like a window or a telescope.
is.nameless :Boolean

Defined in: adventure/asset/Asset_Is.js, line 72

Inherited from: adventurejs.Asset#is.nameless

Default value: false

Nested property of Is

Almost all assets are given a name which is then used to create their id, with some exceptions. For example, exit ids are generated by taking the name of the exit's room + the exit's direction.
is.peddleable :Boolean

Defined in: adventure/assets/Tangible_Is.js, line 188

Inherited from: adventurejs.Tangible#is.peddleable

Default value: false

Nested property of Is

Set whether this asset can be peddled, like a bicycle.
is.plugged :Boolean

Defined in: adventure/assets/Tangible_Is.js, line 29

Inherited from: adventurejs.Asset#is.plugged

Default value: false

Nested property of Is

Set whether this asset is plugged, like a drain.
is.pluggedIn :Boolean

Defined in: adventure/assets/Tangible_Is.js, line 36

Inherited from: adventurejs.Asset#is.pluggedIn

Default value: false

Nested property of Is

Set whether this asset is plugged in, like an appliance.
is.rideable :Boolean

Defined in: adventure/assets/tangibles/things/Rideable.js, line 49

Inherited from: adventurejs.Tangible#is.rideable

Default value: false

Nested property of Is

Setting a Tangible Asset's is.rideable property to true allows players to ride the Tangible Asset while still holding it in inventory.

Normally, when putting one Tangible in/on/under/behind another, the child asset is added to the parent asset's in/on/under/behind Aspect.

In the case of Characters, they can only be in the Room they are in. When Characters move in/on/under/behind Tangible subclasses such as Chairs or Beds, they become nested, which is a secondary form of parent/child relationship.

For example, the player is IN a room. A bed is also IN the same room. When the player gets ON the bed, the player remains IN the room and also becomes NESTED ON the bed.

We do this for a couple of reasons. One is to prevent overcomplicating the routines that determine what Tangible Assets are considered to be within scope when parsing player input. Another is to avoid circular child/parent relationships, which overcomplicate save/restore operations. Circular relationships also overcomplicate parsing player input.

For example, imagine that a player holds a skateboard IN their inventory and then stands ON the skateboard. If both objects were in each other's Aspects, that would be a circular relationship. By nesting the player to the skateboard, the skateboard can remain in the player's inventory with fewer complications.
is.screwed :Boolean

Defined in: adventure/assets/Tangible_Is.js, line 122

Inherited from: adventurejs.Tangible#is.screwed

Default value: false

Nested property of Is

Set whether this asset is screwed.
is.sealed :Boolean

Defined in: adventure/assets/Tangible_Is.js, line 165

Inherited from: adventurejs.Tangible#is.sealed

Default value: false

Nested property of Is

Set whether this asset is sealed.
is.singleton :Boolean

Defined in: adventure/asset/Asset_Is.js, line 98

Inherited from: adventurejs.Asset#is.singleton

Default value: false

Nested property of Is

Todos: Have only applied this to several special global assets, and have not implemented any code around it. Is it still useful?

Meant for use to distinguish some assets as being singular in the game world.
is.skateable :Boolean

Defined in: adventure/assets/Tangible_Is.js, line 195

Inherited from: adventurejs.Tangible#is.skateable

Default value: false

Nested property of Is

Set whether this asset can be skated on, like a skateboard.
is.supported :Boolean

Defined in: adventure/assets/Tangible_Is.js, line 58

Inherited from: adventurejs.Tangible#is.supported

Default value: false

Nested property of Is

Set whether this asset is supported. Used in conjuction with can.swing_on_if_holding_and_supported to determine whether player can swing on the asset in its current state. Meant for assets like two-ended ropes which must be tied to a supporting structure.
is.typing_target :Boolean

Defined in: adventure/assets/Tangible_Is.js, line 51

Inherited from: adventurejs.Tangible#is.typing_target

Default value: false

Nested property of Is

Set whether this asset is a typing target, as in a screen for a keyboard.
is.unleavable :Boolean

Defined in: adventure/assets/Tangible_Is.js, line 172

Inherited from: adventurejs.Tangible#is.unleavable

Default value: false

Nested property of Is

Set whether player can leave this asset. Useful for keeping player from leaving, such as if they're on a carousel horse while the carousel is in motion.
is.unlisted_but_list_children :Boolean

Defined in: adventure/assets/Tangible_Is.js, line 82

Inherited from: adventurejs.Tangible#is.unlisted_but_list_children

Default value: false

Nested property of Is

Set whether this asset's children are listed in the current room description. Meant for situations where a parent asset is part of the room description, to avoid listing the parent asset twice.
is.validated :Boolean

Defined in: adventure/asset/Asset_Is.js, line 58

Inherited from: adventurejs.Asset#is.validated

Default value: false

Nested property of Is

Used at runtime to keep track of asset's validation state.
is.watertight :Boolean

Defined in: adventure/assets/Tangible_Is.js, line 106

Inherited from: adventurejs.Tangible#is.watertight

Default value: false

Nested property of Is

Todos: Write logic for this. Is this the same as airtight?

Set whether this asset is watertight. No logic has been written for this.
is.worn :Boolean

Defined in: adventure/assets/Tangible_Is.js, line 115

Inherited from: adventurejs.Tangible#is.worn

Default value: false

Nested property of Is

Set whether this asset is being worn by player or other characters.
is.zipped :Boolean

Defined in: adventure/assets/Tangible_Is.js, line 129

Inherited from: adventurejs.Tangible#is.zipped

Default value: false

Nested property of Is

Set whether this asset is zipped.
list_group :int

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

Inherited from: adventurejs.Tangible#list_group

Default value: 0

Todos: Implement this or remove it.

Meant for handling screen output, by breaking listed items into subgroups to be divided into paragraphs, but not implemented.
location_required :Boolean

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

Inherited from: adventurejs.Tangible#location_required

Default value: false

Set whether this asset must have a location. Chiefly for use with Aperture class. Apertures must have a location because they're tied to Exits. Other assets can exist without a location, though unlocated tangible assets won't be available to player.
location_unneccessary :Boolean

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

Inherited from: adventurejs.Tangible#location_unneccessary

Default value: false

Explicitly set whether this asset can exist without a location. Chiefly for use with Room class. Rooms will not have a location.
min_light_required_to_see :float

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

Inherited from: adventurejs.Tangible#min_light_required_to_see

Default value: 0.5

Todos: Write logic for this in selectVisible.js

Set the minimum light required to see this asset. Meant for situations with variable lighting where some objects might be hidden in shadow.
must :Object

Defined in: adventure/Asset.js, line 60

Inherited from: adventurejs.Asset#must

must is a generalized container for asset boolean properties.
must.be_in_hands_to_look_through :Boolean

Defined in: adventure/assets/Tangible_Must.js, line 34

Inherited from: adventurejs.Tangible#must.be_in_hands_to_look_through

Default value: false

Nested property of Must

Set whether this asset must be held to look through, as with a telescope.
must.be_in_hands_to_look_with :Boolean

Defined in: adventure/assets/Tangible_Must.js, line 27

Inherited from: adventurejs.Tangible#must.be_in_hands_to_look_with

Default value: false

Nested property of Must

Set whether this asset must be held to look with, as with a binocular.
must.be_in_hands_to_read :Boolean

Defined in: adventure/assets/Tangible_Must.js, line 48

Inherited from: adventurejs.Tangible#must.be_in_hands_to_read

Default value: false

Nested property of Must

Set whether this asset must be held to be read, as with a small book.
must.be_worn_to_look_with :Boolean

Defined in: adventure/assets/Tangible_Must.js, line 41

Inherited from: adventurejs.Tangible#must.be_worn_to_look_with

Default value: false

Nested property of Must

Set whether this asset must be worn to look with, as with glasses.
must.let_go_after_swing :Boolean

Defined in: adventure/assets/Tangible_Must.js, line 55

Inherited from: adventurejs.Tangible#must.let_go_after_swing

Default value: false

Nested property of Must

Set whether player will let go of this asset after swinging on it. Meant for situations such as when player swings from a vine and lets go upon landing.
Name :String

Defined in: adventure/Atom.js, line 97

Inherited from: adventurejs.Atom#Name

Name returns the name of the class instance with the first character uppercased.
name_is_proper :Boolean

Defined in: adventure/Asset.js, line 184

Inherited from: adventurejs.Asset#name_is_proper

Default value: false

Used to determine whether to display a name or proper name.
noun :String

Defined in: adventure/Asset.js, line 237

Inherited from: adventurejs.Asset#noun

noun is a string representing the type of asset this is, for example 'mug' or 'rock'. Players can input this word to refer to any asset of its type.
on_drink_destroy :Boolean

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

Inherited from: adventurejs.Tangible#on_drink_destroy

Default value: false

Set whether this asset should be destroyed when drunk.
on_drink_empty :Boolean

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

Inherited from: adventurejs.Tangible#on_drink_empty

Default value: false

Set whether this asset should be emptied when drunk, versus only subtracting a mouthful as set in Settings.
on_eat_destroy :Boolean

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

Inherited from: adventurejs.Tangible#on_eat_destroy

Default value: false

Set whether this asset should be destroyed when eaten.
on_tie_to_drag_behind_rope :Boolean

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

Inherited from: adventurejs.Tangible#on_tie_to_drag_behind_rope

Default value: false

If player uses a rope in inventory to tie to an object that is not in inventory, this sets whether the object gets dragged behind when player leaves the current room.
on_tie_to_this_take_this :Boolean

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

Inherited from: adventurejs.Tangible#on_tie_to_this_take_this

Default value: false

Set whether this is taken into player inventory when another asset is tied to it. For example, on tying a string that is in inventory to a tin can that is not in inventory, it's assumed that player would then pick up the can.
opacity :float

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

Inherited from: adventurejs.Tangible#opacity

Default value: 1

Set the opacity for this asset. Used for assets made of transparent materials such as glass, and helps determine whether player can look in or through assets.
parts :Array

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

Inherited from: adventurejs.Tangible#parts

Default value: []

Some Tangible subclasses come pre-coded to handle certain "parts", classes which can automatically be registered with each other to form complex associations. For example, a Sink can have matching Faucet, FaucetHandles, Drain and Plug. Not all classes have parts. See each class's documentation header for "Can have parts:" and "Can be part of:". The registerParts() method is called during initialization. Set up parts like so:
MyGame.createAsset({
  class: "Sink",
  name: "sink",
  place: { in: "Bathroom" },
  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 ). ";
    }
  },
  parts: [
    // each of these is a name of another Asset
    "hot water handle",
    "cold water handle",
    "faucet",
    "drain",
    "plug"
  ],
});
place :Object

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

Inherited from: adventurejs.Tangible#place

Get / set place. The private var __place is an object with two properties: aspect and asset. For example: { aspect:"in", asset:"room" } However, the public var place appears in the form { in: "room" }. This is to make it easier and more intuitive for authors to set asset places.
player_can_exit :Boolean

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

Inherited from: adventurejs.Tangible#player_can_exit

Default value: false

Set whether player can go off (aka get off) this asset. Used for Rooms.
player_can_hang_on_this :Boolean

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

Inherited from: adventurejs.Tangible#player_can_hang_on_this

Default value: false

Set whether player can hang on this asset.
player_knows_its_hidden :Boolean

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

Inherited from: adventurejs.Tangible#player_knows_its_hidden

Default value: false

Set whether player knows a thing is hidden. Useful if player is the one doing the hiding, or if player has found an object but not picked it up.
plural :String

Defined in: adventure/Asset.js, line 266

Inherited from: adventurejs.Asset#plural

plural is a string representing multiple assets of this type, for example 'swords'. Players can input this word to refer to groups of assets.
position :Object

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

Inherited from: adventurejs.Tangible#position

Default value: {x:0,y:0,z:0}

XYZ coordinates. Defaults to 0,0,0. It's safe to ignore these if you don't want to use them. They can be used for things like:
  • managing reachability of objects that are on top of other things
  • managing reachability of objects in the room while player is climbing or standing atop a thing
  • dividing a room up into reachable/unreachable spaces
  • managing player depth in an underwater location
  • managing player position while flying/floating/levitating
Here's an example of how to set an object's position.
MyGame.createAsset({
  class: "Stalactite",
  name: "stalactite",
  place: { on: "Colossal Cave" },
  descriptions: {look: "It clings tight to the ceiling. ",},
  height: -2,
  position: { x:0, y:5, z:0 },
});
Also see related height.
posture_position :Boolean

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

Inherited from: adventurejs.Tangible#posture_position

Default value: "default"

A string that describes the position the Asset is in, ex "resting" for most non-Character Assets, or "lying", "sitting", "standing" etc for Characters. this.game.dictionary.getStringLookup( type, value ). Can be referenced in custom code through MyGame.dictionary.getStringLookup( type, value ).
print_bold :Boolean

Defined in: adventure/Asset.js, line 105

Inherited from: adventurejs.Asset#print_bold

Default value: false

Set to true to have an object's name be printed bold.
print_italic :Boolean

Defined in: adventure/Asset.js, line 112

Inherited from: adventurejs.Asset#print_italic

Default value: false

Set to true to have an object's name be printed italic.
print_open_or_closed :Boolean

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

Inherited from: adventurejs.Tangible#print_open_or_closed

Default value: false

Get a string representing open / closed state of this asset.
pronoun :String

Defined in: adventure/Asset.js, line 246

Inherited from: adventurejs.Asset#pronoun

pronoun is a string representing the generic pronoun.
propername :String

Defined in: adventure/Asset.js, line 191

Inherited from: adventurejs.Asset#propername

The asset's proper name, as provided in the game file. Assets can have both a name and a proper name. Used chiefly for characters, so that, for example, an asset can be both 'cat' and 'Mister Whiskers'.
quirks :Object

Defined in: adventure/Asset.js, line 94

Inherited from: adventurejs.Asset#quirks

quirks is a container for setting how to handle ambiguous verbs based on context. For example, if player inputs "stand" while sitting in a chair with quirks.stand_means_get_off set to true, player will get off the chair, as opposed to trying to stand in place on the chair.
quirks.climb_means_go_on :Boolean

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

Inherited from: adventurejs.Tangible#quirks.climb_means_go_on

Default value: false

Nested property of Quirks

Set whether 'climb' means 'go on', which might apply to assets such as stairs and ladders.
quirks.climb_means_stand_on :Boolean

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

Inherited from: adventurejs.Tangible#quirks.climb_means_stand_on

Default value: false

Nested property of Quirks

Set whether 'climb' means 'stand on', which might apply to furniture and things like boulders which players can stand on.
quirks.crawl_means_go :Boolean

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

Inherited from: adventurejs.Tangible#quirks.crawl_means_go

Default value: false

Nested property of Quirks

Set whether 'crawl' means 'go on', which might apply to furniture and things like boulders which players can stand on.
quirks.get_up_means_get_off :Boolean

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

Inherited from: adventurejs.Tangible#quirks.get_up_means_get_off

Default value: false

Nested property of Quirks

Set whether 'get up' means 'go off' (aka 'get off'), which might apply to furniture such as chairs or beds.
quirks.go_on_means_climb :Boolean

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

Inherited from: adventurejs.Tangible#quirks.go_on_means_climb

Default value: false

Nested property of Quirks

Set whether 'get on' means 'climb', which might apply to things such as trees.
quirks.in_means_on :Boolean

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

Inherited from: adventurejs.Tangible#quirks.in_means_on

Default value: false

Nested property of Quirks

If set to true, "in" and "on" become interchangeable for some verbs. Intended chiefly for things like chairs where "sit in chair" and "sit on chair" can be interpreted to mean the same thing.
quirks.jump_means_jump_off :Boolean

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

Inherited from: adventurejs.Tangible#quirks.jump_means_jump_off

Default value: false

Nested property of Quirks

Set whether 'jump' means 'jump off' as in jumping off a tree.
quirks.jump_means_jump_on :Boolean

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

Inherited from: adventurejs.Tangible#quirks.jump_means_jump_on

Default value: true

Nested property of Quirks

Set whether 'jump' means 'jump on' as in jumping up and down on a bed.
quirks.let_go_of_means_go_down :Boolean

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

Inherited from: adventurejs.Tangible#quirks.let_go_of_means_go_down

Default value: false

Nested property of Quirks

Set whether 'let go of' means 'go down', as in the case of player being suspended by a rope above a pit, where letting go means moving to a new Room.
quirks.let_go_of_means_go_off :Boolean

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

Inherited from: adventurejs.Tangible#quirks.let_go_of_means_go_off

Default value: false

Nested property of Quirks

Set whether 'let go of' means 'get off', as in the case of assets that the player is suspended from, such as hanging from a rope.
quirks.look_with_means_look_through :Boolean

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

Inherited from: adventurejs.Tangible#quirks.look_with_means_look_through

Default value: false

Nested property of Quirks

Set whether "look with" is equivalent to "look through". For example, in the case of a telescope, "look with telescope" is equivalent to "look through telescope". In the case of a window, you can look through it, but not look with it. In the case of a candle, you can look with it, but not look through it.
quirks.pick_means_unlock :Boolean

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

Inherited from: adventurejs.Tangible#quirks.pick_means_unlock

Default value: false

Nested property of Quirks

Set whether 'pick' means 'unlock'. This is provided to give authors the option to choose whether pick and unlock are treated as distinct verbs.
quirks.point_means_aim :Boolean

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

Inherited from: adventurejs.Tangible#quirks.point_means_aim

Default value: false

Nested property of Quirks

Set whether verb point means aim for this asset. If so, point verb will redirect to aim.
quirks.put_means_pour :Boolean

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

Inherited from: adventurejs.Tangible#quirks.put_means_pour

Default value: false

Nested property of Quirks

If set to true, "put" means "pour" for some verbs. Intended chiefly for things like "put syrup on pancakes" which is a common phrasing where clearly the speaker means to pour.
quirks.stand_means_get_off :Boolean

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

Inherited from: adventurejs.Tangible#quirks.stand_means_get_off

Default value: false

Nested property of Quirks

Set whether 'stand' means 'go off' (aka 'get off'), which might apply to furniture such as chairs.
quirks.step_on_means_stamp_on :Boolean

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

Inherited from: adventurejs.Tangible#quirks.step_on_means_stamp_on

Default value: false

Nested property of Quirks

Set whether player can step on this asset.
quirks.step_on_means_stand_on :Boolean

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

Inherited from: adventurejs.Tangible#quirks.step_on_means_stand_on

Default value: false

Nested property of Quirks

Set whether ver 'step on' means 'stand on', as with a skateboard or some types of furniture.
quirks.take_means_hold :Boolean

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

Inherited from: adventurejs.Tangible#quirks.take_means_hold

Default value: false

Nested property of Quirks

Set whether 'take' means 'hold', as in the case of hanging ropes.
quirks.write_on_means_write_in :Boolean

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

Inherited from: adventurejs.Tangible#quirks.write_on_means_write_in

Default value: false

Nested property of Quirks

Set whether this asset can be written in like a book.
redirected_verbs :Boolean

Defined in: adventure/Asset.js, line 351

Inherited from: adventurejs.Tangible#redirected_verbs

Default value: {}

redirected_verbs is an object used for storing verb redirections via redirectVerb().
registerableClasses :Object

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

Inherited from: adventurejs.Tangible#registerableClasses

Default value: {}

registered_parts :Object

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

Inherited from: adventurejs.Tangible#registered_parts

Default value: {}

show_things_this_is_tied_to_in_description :Boolean

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

Inherited from: adventurejs.Tangible#show_things_this_is_tied_to_in_description

Default value: true

Set whether this asset's description includes things that it is tied to.
singlePluralPairs :Array

Defined in: adventure/Asset.js, line 254

Inherited from: adventurejs.Asset#singlePluralPairs

singlePluralPairs is a collection of strings representing the singular and plural forms of this asset, for example ['mug', 'mugs']. Players can use the singular to refer to a single asset or the plural to refer to a group of assets. These are stored in pairs so we can check for correspondence between the forms.
split_name_for_world_lookup :Boolean

Defined in: adventure/Asset.js, line 128

Inherited from: adventurejs.Asset#split_name_for_world_lookup

Default value: true

Object names are split into individual words for the world_lookup table. For example, given an object named "crystal sword", adventurejs creates lookup table entries for "crystal" and "sword". This lets the game recognize either word as player input, such as "get crystal" or "swing sword".

But, an author might want to name a thing, eg, "hole in the ground", in which case we wind up with lookup table entries for "hole" and "in" and "the" and "ground", which is likely to lead to bad input parsing. To avoid name splitting, set split_name_for_world_lookup to false. The object's full name will still be added to the lookup.
things_player_can_climb_to_from_this :Array

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

Inherited from: adventurejs.Tangible#things_player_can_climb_to_from_this

Default value: []

Set list of other assets that player can climb to from this.
things_player_can_do_all_verbs_to_from_this :Array

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

Inherited from: adventurejs.Tangible#things_player_can_do_all_verbs_to_from_this

Default value: []

Todos: Revisit this. Use things_within_reach for all reach settings?

When player is nested, some verbs can only be applied to assets that have been specified as being within reach.
things_player_can_jump_to_from_this :Array

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

Inherited from: adventurejs.Tangible#things_player_can_jump_to_from_this

Default value: []

List of other assets player can jump to while nested within this asset.
things_player_can_reach_from_this :Array

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

Inherited from: adventurejs.Tangible#things_player_can_reach_from_this

Default value: []

When player is nested within an aspect of an asset, other assets may not be reachable. things_player_can_reach_from_this helps manage reachability. For example, if player is on a ladder, things on the ground might not be reachable. But, a player seated on a chair at a desk should be able to reach the desk and anything on it. Use this property to explicitly make some things reachable from other things.

things_player_can_reach_from_this is a broad catchall that covers all nesting options. What this means is that players can reach assets in this list no matter how they are nested within this asset. Going back to the example of the chair and desk, if the chair has this property set thusly...
this.things_player_can_reach_from_this = [ 'desk' ];
...it means that the player, seated in the chair, can reach any part of the desk: not just stuff that's on it, but also stuff under it or behind it. That might be fine for your purposes. Or, you might want more granular control. Let's say there's an electrical outlet under the desk, and you want that players shouldn't be able to reach it without actually crawling under the desk. If you need that kind of precision, you can manage reachability for each aspect of an asset. For more information about that, see Aspect.things_player_can_reach_from_this_aspect and Aspect.things_player_can_reach_from_positions_of_this_aspect.
things_player_can_reach_from_top_of_this :Array

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

Inherited from: adventurejs.Tangible#things_player_can_reach_from_top_of_this

Default value: []

When player is nested within an asset, other assets may not be reachable. For example, if player is on a ladder, things on the ground won't be reachable. Use this property to explicitly list things that player can reach while nested at the top of asset. For example, perhaps there is a window that player should only be able to reach from the top of a ladder. things_player_can_reach_from_top_of_this allows that to be set. For example:
this.things_player_can_reach_from_top_of_this = [ 'window' ];
things_player_can_reach_from_this is a convenience method for a common situation. If you need more control over reachability from specific positions within an aspect, like left/right/front/back, you can manage that at the aspect level. For more information about that, see Aspect.things_player_can_reach_from_this_aspect and Aspect.things_player_can_reach_from_positions_of_this_aspect.
things_player_can_swing_to_across_this :Getter/Setter
things_player_can_swing_to_from_this :Array

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

Inherited from: adventurejs.Tangible#things_player_can_swing_to_from_this

Default value: []

List of other assets that player can swing to while nested within this asset.
turn_positions :int

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

Inherited from: adventurejs.Tangible#turn_positions

Default value: 1

This property was superseded by the GraduatedController class. It may still be useful for simpler interactions. Use in conjunction with turn_rotation to save current position.
turn_rotation :float

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

Inherited from: adventurejs.Tangible#turn_rotation

Default value: 0

This property was superseded by the GraduatedController class. It may still be useful for simpler interactions. Use in conjunction with turn_positions to set number of positions.
turn_target_id :String

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

Inherited from: adventurejs.Tangible#turn_target_id

Default value: ""

typing_target_id :String

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

Inherited from: adventurejs.Tangible#typing_target_id

Default value: ""

Set the ID of a target asset for this asset to type on, as in a screen for a keyboard.
use_definite_article_in_lists :Boolean

Defined in: adventure/Asset.js, line 216

Inherited from: adventurejs.Asset#use_definite_article_in_lists

Default value: false

A preference for how an asset's name appears when it is printed in certain contexts. Chiefly used for room names. For example, you might name a room 'Sitting Room', but want it to appear as 'the Sitting Room' in some contexts for narrative clarity. Can be overridden in game file.
use_once_message :Boolean

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

Inherited from: adventurejs.Tangible#use_once_message

Default value: false

Set a message to print for asset's single use.
written_strings :Array

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

Inherited from: adventurejs.Tangible#written_strings

Default value: []

List of strings that have been written on this asset.