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

  /**
   * @ajspath adventurejs.Atom.Asset.GlobalAsset.GlobalSomething
   * @augments adventurejs.GlobalAsset
   * @class adventurejs.GlobalSomething
   * @ajsconstruct MyGame.createAsset({ "class":"GlobalSomething", "name":"foo", [...] })
   * @ajsconstructedby adventurejs.Game#createAsset
   * @ajsinternal
   * @ajsnavheading LibraryAssets
   * @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 Special class to handle the word 'something'.
   * @todo This isn't complete, is it?
   * @classdesc
   * <p>
   * <strong>GlobalSomething</strong> is a special subclass
   * of {@link adventurejs.GlobalAsset|GlobalAsset} used to
   * catch player input such as 'take something'. Authors
   * should not have to construct or modify this Asset.
   * </p>
   **/
  class GlobalSomething extends adventurejs.GlobalAsset {
    constructor(name, game_name) {
      super(name, game_name);
      this.class = "GlobalSomething";

      this.descriptions.look = "It's something.";
      this.noun = "something";
      this.plural = "somethings";
      this.singlePluralPairs = [["something", "somethings"]];
    }
  }

  adventurejs.GlobalSomething = GlobalSomething;
})();