Pre-release
AdventureJS Docs Downloads
Score: 0 Moves: 0
// Tangible_Must.js
(function () {
  /* global AdventureJS A */

  /**
   * @ajspath AdventureJS.Atom.TraitManager.Asset_Must.Tangible_Must
   * @augments AdventureJS.AssetTraits.Asset_Must
   * @class AdventureJS.AssetTraits.Tangible_Must
   * @ajsnavheading TraitClasses
   * @param {String} game_name Name of top level game instance that is scoped to window.
   * @param {String} name Instance name.
   * @summary A container for state variables.
   * @classdesc
   * <strong>Tangible_Must</strong> is a state management class
   * used to store a variety of booleans for
   * {@link AdventureJS.Assets.Tangible|Tangible Assets}.
   **/

  class Tangible_Must extends AdventureJS.AssetTraits.Asset_Can {
    constructor(name = "can", game_name, context_id) {
      // Call the constructor of the super class
      super(name, game_name, context_id);

      this.class = "Tangible_Must";

      /**
       * Set whether this asset must be held to look with, as with a binocular.
       * @var {Boolean} AdventureJS.Assets.Tangible#must!hold_to_see_with
       * @default false
       */
      this.hold_to_see_with = false;

      /**
       * Set whether this asset must be held to look through, as with a telescope.
       * @var {Boolean} AdventureJS.Assets.Tangible#must!hold_to_see_through
       * @default false
       */
      this.hold_to_see_through = false;

      /**
       * Set whether this asset must be worn to look with, as with glasses.
       * @var {Boolean} AdventureJS.Assets.Tangible#must!wear_to_see_with
       * @default false
       */
      this.wear_to_see_with = false;

      /**
       * Set whether this asset must be worn to look through, as with glasses.
       * @var {Boolean} AdventureJS.Assets.Tangible#must!wear_to_see_through
       * @default false
       */
      this.wear_to_see_through = false;

      /**
       * Set whether this asset must be held to be read, as with a small book.
       * @var {Boolean} AdventureJS.Assets.Tangible#must!hold_to_read
       * @default false
       */
      this.hold_to_read = false;

      /**
       * 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.
       * @var {Boolean} AdventureJS.Assets.Tangible#must!let_go_after_swing
       * @default false
       */
      this.let_go_after_swing = false;

      return this;
    }
  }
  AdventureJS.AssetTraits.Tangible_Must = Tangible_Must;
})();