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

(function () {
  /*global adventurejs A*/
  "use strict";

  /**
   * @augments {adventurejs.Verb}
   * @class restore
   * @ajsnode game.dictionary.verbs.restore
   * @ajsconstruct MyGame.createVerb({ "name": "restore", [...] });
   * @ajsconstructedby adventurejs.Dictionary#createVerb
   * @hideconstructor
   * @ajsinstanceof Verb
   * @ajsnavheading UtilityVerbs
   * @summary Verb used to initiate restoring a saved game.
   * @tutorial Scripting_VerbSubscriptions
   * @tutorial Verbs_VerbAnatomy
   * @tutorial Verbs_VerbProcess
   * @tutorial Verbs_ModifyVerbs
   * @tutorial Verbs_WriteVerbs
   * @classdesc
   * <pre class="display border outline">
   * <span class="input">&gt; restore</span>
   * </pre>
   * <p>
   * <strong>Restore</strong> brings up the 'restore game' panel,
   * </p>
   */
  A.Preverbs.restore = {
    name: "restore",
    synonyms: ["restore", "restore game"],
    verb_prep_noun: ["restore game"],

    /**
     * @ajsverbstructures
     * @memberof restore
     */
    accepts_structures: ["verb"],

    do: function () {
      console.log("restore.do");
      this.game.log("log", "high", "Opening restore manager.", "verbs");
      this.game.restoreManager.openDisplay();
      return true;
    },
  };
})();