Pre-release
Adventure.js Docs Downloads
Score: 0 Moves: 0
// Container.js
(function () {
  /*global adventurejs A*/
  "use strict";

  /**
   * @ajspath adventurejs.Atom.Asset.Matter.Tangible.Thing.Container
   * @augments adventurejs.Thing
   * @class adventurejs.Container
   * @ajsconstruct MyGame.createAsset({ "class":"Container", "name":"foo", [...] })
   * @ajsconstructedby adventurejs.Game#createAsset
   * @ajsnavheading MiscAssetClasses
   * @param {String} game_name The name of the top level game object.
   * @param {String} name A name for the object, to be serialized and used as ID.
   * @summary Thing to put things in.
   * @classdesc
   * <p>
   * <strong>Container</strong> is the base class for
   * {@link adventurejs.GasContainer|GasContainers},
   * {@link adventurejs.LiquidContainer|LiquidContainers},
   * {@link adventurejs.SolidContainer|SolidContainers}, and
   * {@link adventurejs.SurfaceContainer|SurfaceContainers}.
   * Container has no particular properties - each of the
   * subclasses define unique properties.
   * </p>
   **/
  class Container extends adventurejs.Thing {
    constructor(name, game_name) {
      super(name, game_name);
      this.class = "Container";

      this.is.hollow = true;
      this.default_aspect = "in";
    }

    initialize(game) {
      super.initialize(game);
      return this;
    }
  }
  adventurejs.Container = Container;
})();