Double_X

DoubleX RMMV Action Input Timer

Sep 5th, 2020 (edited)
96
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*============================================================================
  2.  *    ## Plugin Info
  3.  *----------------------------------------------------------------------------
  4.  *    # Plugin Name
  5.  *      DoubleX RMMV Action Input Timer
  6.  *----------------------------------------------------------------------------
  7.  *    # Terms Of Use
  8.  *      1. Commercial use's always allowed and crediting me's always optional.
  9.  *      2. You shall keep this plugin's Plugin Info part's contents intact.
  10.  *      3. You shalln't claim that this plugin's written by anyone other than
  11.  *         DoubleX or my aliases. I always reserve the right to deny you from
  12.  *         using any of my plugins anymore if you've violated this.
  13.  *      4. If you repost this plugin directly(rather than just linking back),
  14.  *         you shall inform me of these direct repostings. I always reserve
  15.  *         the right to request you to edit those direct repostings.
  16.  *      5. CC BY 4.0, except those conflicting with any of the above, applies
  17.  *         to this plugin, unless you've my permissions not needing follow so.
  18.  *      6. I always reserve the right to deny you from using this plugin
  19.  *         anymore if you've violated any of the above.
  20.  *----------------------------------------------------------------------------
  21.  *    # Prerequisites
  22.  *      Abilities:
  23.  *      1. Nothing special for most ordinary cases
  24.  *         (No capability on Javascript ES5 experience but can still make
  25.  *         reasonable guesses on readable novice codes up to 100 LoC scale)
  26.  *      2. Little RMMV plugin development proficiency to fully utilize this
  27.  *         plugin in intended ways
  28.  *         (Elementary Javascript ES5 exposures being able to write beginner
  29.  *         codes up to 300LoC scale )
  30.  *----------------------------------------------------------------------------
  31.  *    # Links
  32.  *      Video:
  33.  *      1. https://www.youtube.com/watch?v=-dY6H1fbh8c
  34.  *      This Plugin:
  35.  *      1. https://pastebin.com/desAQfAP
  36.  *      Posts:
  37.  *      1. https://forums.rpgmakerweb.com/index.php?threads/doublex-rmmv-action-input-timer.126840/
  38.  *      2. https://www.rpgmakercentral.com/topic/42579-doublex-rmmv-action-input-timer/
  39.  *      3. https://rpgmaker.net/scripts/792/
  40.  *      4. https://www.save-point.org/thread-8161-post-52646.html
  41.  *      5. https://gdu.one/forums/topic/13632-doublex-rmmv-action-input-timer/
  42.  *      6. http://www.hbgames.org/forums/viewtopic.php?f=332&t=80315
  43.  *      7. https://www.xyphien.com/forums/resources/doublex-rmmv-action-input-timer.1696/
  44.  *      8. https://forum.chaos-project.com/index.php/topic,16074.new.html
  45.  *      9. https://www.patreon.com/posts/41296187
  46.  *      10. https://www.makerdevs.com/plugin/doublex-rmmv-action-input-timer
  47.  *----------------------------------------------------------------------------
  48.  *    # Instructions
  49.  *      1. The default plugin parameters file name is
  50.  *         doublex rmmv action input timer v100a
  51.  *         If you want to change that, you must edit the value of
  52.  *         DoubleX_RMMV.Action_Input_Timer_File, which must be done via
  53.  *         opening this plugin js file directly
  54.  *----------------------------------------------------------------------------
  55.  *    # Contributors
  56.  *      Authors:
  57.  *      1. DoubleX
  58.  *      Plugin Development Collaborators:
  59.  *      - None So Far
  60.  *      Bug Reporters:
  61.  *      - None So Far
  62.  *      Compatibility Issue Raisers:
  63.  *      - None So Far
  64.  *      Feature Requesters:
  65.  *      - None So Far
  66.  *----------------------------------------------------------------------------
  67.  *    # Changelog
  68.  *      v1.00a(GMT 0500 6-Sep-2020):
  69.  *      1. 1st version of this plugin finished
  70.  *============================================================================*/
  71. /*:
  72.  * @plugindesc (v1.00a)Lets you sets a timer that will cause all actors not
  73.  * inputted actions yet to have their turns skipped in turn based battles
  74.  * @author DoubleX
  75.  *
  76.  * @param timerLimit
  77.  * @type number
  78.  * @desc Sets the number of seconds the players are allowed to input
  79.  * all actions of all inputable actors
  80.  * @default 20
  81.  *
  82.  * @param timerWinX
  83.  * @type number
  84.  * @desc Sets the x position of the action input timer window
  85.  * The smaller the number the more left the window is
  86.  * @default 0
  87.  *
  88.  * @param timerWinY
  89.  * @type number
  90.  * @desc Sets the y position of the action input timer window
  91.  * The smaller the number the more upper the window is
  92.  * @default 0
  93.  *
  94.  * @param timerWinW
  95.  * @type number
  96.  * @desc Sets the width of the action input timer window
  97.  * You've to test this yourselves to find a suitable value
  98.  * @default 240
  99.  *
  100.  * @param timerWinDesc
  101.  * @type string
  102.  * @desc Sets the action input timer window description text
  103.  * %1 is the number of seconds remaining of the input timer
  104.  * @default %1s input time
  105.  *
  106.  * @help
  107.  *============================================================================
  108.  *    ## (Advanced)Script Call Info
  109.  *----------------------------------------------------------------------------
  110.  *    # Battle manipulations
  111.  *      1. BattleManager.setActionInputTimer(timerLimit)
  112.  *         - Sets the current action input timer in battle as timerLimit
  113.  *           seconds
  114.  *         - The script call has no meaning outside battles
  115.  *         - The script call's supposed to be Idempotent
  116.  *    # Parameter manipulations
  117.  *      1. $gameSystem.actionInputTimerParam(param)
  118.  *         - Returns the value of specified parameter stored in game save
  119.  *           files
  120.  *         - param can be either of the following:
  121.  *           timerLimit
  122.  *           timerWinX
  123.  *           timerWinY
  124.  *           timerWinW
  125.  *           timerWinDesc
  126.  *         - The script call's supposed to be Nullipotent
  127.  *      2. $gameSystem.setActionInputTimerParam(param, val)
  128.  *         - Sets the value of the specified parameter stored in game save
  129.  *           files as val
  130.  *         - param can be either of the following:
  131.  *           timerLimit
  132.  *           timerWinX
  133.  *           timerWinY
  134.  *           timerWinW
  135.  *           timerWinDesc
  136.  *         - For any parameter other than timerWinDesc, the script call will
  137.  *           be ignored if val isn't a Number
  138.  *         - The script call's supposed to be Idempotent
  139.  *         - The new value of the specified parameter will be stored in game
  140.  *           save files
  141.  *----------------------------------------------------------------------------
  142.  *    ## (Advanced)Plugin Command Info
  143.  *----------------------------------------------------------------------------
  144.  *      1. setActionInputTimer timerLimit
  145.  *         - Applies the script call
  146.  *           BattleManager.setActionInputTimer(timerLimit)
  147.  *      2. setActionInputTimerParam param val
  148.  *         - Applies the script call
  149.  *           $gameSystem.setActionInputTimerParam(param, val)
  150.  *============================================================================
  151.  */
  152.  
  153. var DoubleX_RMMV = DoubleX_RMMV || {};
  154. DoubleX_RMMV["Action Input Timer"] = "v1.00a";
  155.  
  156. // The plugin file name must be the same as DoubleX_RMMV.Action_Input_Timer_File
  157. DoubleX_RMMV.Action_Input_Timer_File = "doublex rmmv action input timer v100a";
  158. //
  159.  
  160. /*============================================================================
  161.  *    ## Plugin Implementations
  162.  *       You need not edit this part as it's about how this plugin works
  163.  *----------------------------------------------------------------------------
  164.  *    # Plugin Support Info:
  165.  *      1. Prerequisites
  166.  *         - Some RMMV plugin development proficiency to fully comprehend this
  167.  *           plugin
  168.  *           (Basic knowledge on what RMMV plugin development does in general
  169.  *           with several easy, simple and small plugins written without
  170.  *           nontrivial bugs up to 1000 LoC scale but still being
  171.  *           inexperienced)
  172.  *      2. Parameter/Return value of type * means it might be of any type
  173.  *      3. Function signature with (**) means it might take any number of
  174.  *         parameters of any type
  175.  *----------------------------------------------------------------------------*/
  176.  
  177. DoubleX_RMMV.Action_Input_Timer = {};
  178.  
  179. /*----------------------------------------------------------------------------
  180.  *    # New class: Window_ActionInputTimer
  181.  *      - Implements the action input timer window
  182.  *----------------------------------------------------------------------------*/
  183.  
  184. function Window_ActionInputTimer() {
  185.     "use strict";
  186.     this.initialize.apply(this, arguments);
  187. } // Window_ActionInputTimer
  188.  
  189. /*----------------------------------------------------------------------------
  190.  *    # Edit class: BattleManager
  191.  *      - Implements the timer that skips all actors not finished inputs
  192.  *----------------------------------------------------------------------------*/
  193.  
  194. (function(AIT) {
  195.  
  196.     "use strict";
  197.  
  198.     AIT.BattleManager = { orig: {}, new: {} };
  199.     var _BM = AIT.BattleManager.orig, _AIT = AIT.BattleManager.new;
  200.  
  201.     /*------------------------------------------------------------------------
  202.      *    New private variables
  203.      *------------------------------------------------------------------------*/
  204.     // {{*}} _actionInputTimer: The container of all other new variables
  205.     //       {Number} timerLimit: The action input timer limit in seconds
  206.  
  207.     _BM.initMembers = BattleManager.initMembers;
  208.     _AIT.initMembers = BattleManager.initMembers = function() {
  209.     // v1.00a - v1.00a; Extended
  210.         _BM.initMembers.apply(this, arguments);
  211.         // Added to initialize timer that skips all actors not finished inputs
  212.         _AIT._endTimer.call(this);
  213.         //
  214.     }; // BattleManager.initMembers
  215.  
  216.     _BM.startInput = BattleManager.startInput;
  217.     _AIT.startInput = BattleManager.startInput = function() {
  218.     // v1.00a - v1.00a; Extended
  219.         _BM.startInput.apply(this, arguments);
  220.         // Added to start the timer that skips all actors not finished inputs
  221.         _AIT._startTimer.call(this);
  222.         //
  223.     }; // BattleManager.startInput
  224.  
  225.     _BM.startTurn = BattleManager.startTurn;
  226.     _AIT.startTurn = BattleManager.startTurn = function() {
  227.     // v1.00a - v1.00a; Extended
  228.         _BM.startTurn.apply(this, arguments);
  229.         // Added to end the timer that skips all actors not finished inputs
  230.         _AIT._endTimer.call(this);
  231.         //
  232.     }; // BattleManager.startTurn
  233.  
  234.     /**
  235.      * Script Call/Idempotent
  236.      * @interface @since v1.00a @version v1.00a
  237.      * @param {Number} timerLimit - The action input timer in seconds
  238.      */
  239.     BattleManager.setActionInputTimer = function(timerLimit) {
  240.         var actionInputTimer = this._actionInputTimer;
  241.         if (actionInputTimer) actionInputTimer.timerLimit = timerLimit;
  242.     }; // BattleManager.setActionInputTimer
  243.  
  244.     /**
  245.      * Idempotent
  246.      * @interface @since v1.00a @version v1.00a
  247.      */
  248.     BattleManager.updateActionInputTimer = function() {
  249.         var actionInputTimer = this._actionInputTimer;
  250.         if (actionInputTimer.timerLimit <= 0) return;
  251.         actionInputTimer.timerLimit -= SceneManager._deltaTime;
  252.     }; // BattleManager.updateActionInputTimer
  253.  
  254.     /**
  255.      * Idempotent
  256.      * @interface @since v1.00a @version v1.00a
  257.      * @returns {Number} The action input timer in seconds
  258.      */
  259.     BattleManager.actionInputTimer = function() {
  260.         return this._actionInputTimer.timerLimit;
  261.     }; // BattleManager.actionInputTimer
  262.  
  263.     /**
  264.      * The this pointer is BattleManager
  265.      * Idempotent
  266.      * @since v1.00a @version v1.00a
  267.      */
  268.     _AIT._startTimer = function() {
  269.         var timerLimit = $gameSystem.actionInputTimerParam("timerLimit");
  270.         this._actionInputTimer.timerLimit = timerLimit;
  271.     }; // _AIT._startTimer
  272.  
  273.     /**
  274.      * The this pointer is BattleManager
  275.      * Idempotent
  276.      * @since v1.00a @version v1.00a
  277.      */
  278.     _AIT._endTimer = function() { this._actionInputTimer = { timerLimit: 0 }; };
  279.  
  280. })(DoubleX_RMMV.Action_Input_Timer); // BattleManager
  281.  
  282. /*----------------------------------------------------------------------------
  283.  *    # Edit class: Game_System
  284.  *      - Stores all parameters of this plugin into save game files
  285.  *----------------------------------------------------------------------------*/
  286.  
  287. (function(AIT) {
  288.  
  289.     "use strict";
  290.  
  291.     AIT.Game_System = { orig: {}, new: {} };
  292.     var $ = Game_System.prototype;
  293.     var _GS = AIT.Game_System.orig, _AIT = AIT.Game_System.new;
  294.  
  295.     _GS._NUM_PARAMS = ["timerLimit", "timerWinX", "timerWinY", "timerWinW"];
  296.  
  297.     /*------------------------------------------------------------------------
  298.      *    New private variables
  299.      *------------------------------------------------------------------------*/
  300.     // {{*}} _actionInputTimer: The container of all other new variables
  301.     //       {Number} timerLimit: The stored real timerLimit parameter value
  302.  
  303.     _GS.initialize = $.initialize;
  304.     _AIT.initialize = $.initialize = function() { // v1.00a - v1.00a; Extended
  305.         _GS.initialize.apply(this, arguments);
  306.         // Added to store all parameters of this plugin as well
  307.         _AIT._init.call(this);
  308.         //
  309.     }; // $.initialize
  310.  
  311.     /**
  312.      * Script Call/Nullipotent
  313.      * @interface @since v1.00a @version v1.00a
  314.      * @enum @param {String} param - The name of the parameter to have its value
  315.      * @returns {*} The value of specified parameter stored in game save file
  316.      */
  317.     $.actionInputTimerParam = function(param) {
  318.         return this._actionInputTimer[param];
  319.     }; // $.actionInputTimerParam
  320.  
  321.     /**
  322.      * Script Call/Idempotent
  323.      * @interface @since v1.00a @version v1.00a
  324.      * @enum @param {String} param - The name of the parameter to have its value
  325.      * @param {*} val - Value of specified parameter stored in game save file
  326.      */
  327.     $.setActionInputTimerParam = function(param, val) {
  328.         if (_GS._NUM_PARAMS.contains(param) && isNaN(val)) return;
  329.         this._actionInputTimer[param] = val;
  330.     }; // $.setActionInputTimerParam
  331.  
  332.     /**
  333.      * The this pointer is Game_System.prototype
  334.      * Idempotent
  335.      * @since v1.00a @version v1.00a
  336.      */
  337.     _AIT._init = function() {
  338.         this._actionInputTimer = {};
  339.         var pluginName = DoubleX_RMMV.Action_Input_Timer_File;
  340.         var params = PluginManager.parameters(pluginName);
  341.         this.setActionInputTimerParam("timerLimit", +params.timerLimit);
  342.         this.setActionInputTimerParam("timerWinX", +params.timerWinX);
  343.         this.setActionInputTimerParam("timerWinY", +params.timerWinY);
  344.         this.setActionInputTimerParam("timerWinW", +params.timerWinW);
  345.         this.setActionInputTimerParam("timerWinDesc", params.timerWinDesc);
  346.     }; // _AIT._init
  347.  
  348. })(DoubleX_RMMV.Action_Input_Timer); // Game_System
  349.  
  350. /*----------------------------------------------------------------------------
  351.  *    # Edit class: Game_Interpreter
  352.  *      - Implements all plugin commands of this plugin
  353.  *----------------------------------------------------------------------------*/
  354.  
  355. (function(AIT) {
  356.  
  357.     "use strict";
  358.  
  359.     AIT.Game_Interpreter = { orig: {}, new: {} };
  360.     var $ = Game_Interpreter.prototype;
  361.     var _GI = AIT.Game_Interpreter.orig, _AIT = AIT.Game_Interpreter.new;
  362.  
  363.     _AIT._GAME_SYS_PLUGIN_CMDS = {
  364.         timerLimit: function(args) {
  365.             var secs = +args[0];
  366.             if (isNaN(secs)) return;
  367.             $gameSystem.setActionInputTimerParam("timerLimit", secs);
  368.         }, // timerLimit
  369.         timerWinX: function(args) {
  370.             var x = +args[0];
  371.             if (isNaN(x)) return;
  372.             $gameSystem.setActionInputTimerParam("timerWinX", x);
  373.         }, // timerWinX
  374.         timerWinY: function(args) {
  375.             var y = +args[0];
  376.             if (isNaN(y)) return;
  377.             $gameSystem.setActionInputTimerParam("timerWinY", y);
  378.         }, // timerWinY
  379.         timerWinW: function(args) {
  380.             var w = +args[0];
  381.             if (isNaN(w)) return;
  382.             $gameSystem.setActionInputTimerParam("timerWinW", w);
  383.         }, // timerWinW
  384.         timerWinDesc: function(args) {
  385.             $gameSystem.setActionInputTimerParam("timerWinDesc", args[0]);
  386.         } // timerWinDesc
  387.     }; // _AIT._GAME_SYS_PLUGIN_CMDS
  388.  
  389.     _AIT._RUN_GAME_SYS_PLUGIN_CMD = function(args) {
  390.         var pluginCmdFunc = _AIT._GAME_SYS_PLUGIN_CMDS[args.shift()];
  391.         if (pluginCmdFunc) pluginCmdFunc(args);
  392.     }; // _AIT._RUN_PLUGIN_CMD
  393.  
  394.     _AIT._RUN_PLUGIN_CMD = function(cmd, args) {
  395.         if (cmd === "setActionInputTimer") {
  396.             return BattleManager.setActionInputTimer(+args[0]);
  397.         } else if (cmd !== "setActionInputTimerParam") return;
  398.         _AIT._RUN_GAME_SYS_PLUGIN_CMD(args);
  399.     }; // _AIT._RUN_PLUGIN_CMD
  400.  
  401.     _GI.pluginCommand = $.pluginCommand;
  402.     _AIT.pluginCommand = $.pluginCommand = function(command, args) {
  403.     // v1.00a - v1.00a; Extended
  404.         _GI.pluginCommand.apply(this, arguments);
  405.         // Added to run all plugin commands of this plugin as well
  406.         _AIT._RUN_PLUGIN_CMD(command, args);
  407.         //
  408.     }; // $.pluginCommand
  409.  
  410. })(DoubleX_RMMV.Action_Input_Timer); // Game_Interpreter
  411.  
  412. /*----------------------------------------------------------------------------
  413.  *    # New class: Window_ActionInputTimer
  414.  *      - Implements the action input timer window
  415.  *----------------------------------------------------------------------------*/
  416.  
  417. (function() {
  418.  
  419.     "use strict";
  420.  
  421.     var $$ = Window_Base.prototype;
  422.  
  423.     Window_ActionInputTimer.prototype = Object.create($$);
  424.  
  425.     var $ = Window_ActionInputTimer.prototype;
  426.  
  427.     $.constructor = Window_ActionInputTimer;
  428.  
  429.     /*------------------------------------------------------------------------
  430.      *    New private variables
  431.      *------------------------------------------------------------------------*/
  432.     // {Number} _timerLimit: The action input timer limit in seconds
  433.     // {Integer} _shownTimerLimit: The shown action input timer limit in seconds
  434.  
  435.     /**
  436.      * Idempotent
  437.      * @constructor @since v1.00a @since v1.00a
  438.      */
  439.     $.initialize = function() {
  440.         var x = $gameSystem.actionInputTimerParam("timerWinX");
  441.         var y = $gameSystem.actionInputTimerParam("timerWinY");
  442.         var w = $gameSystem.actionInputTimerParam("timerWinW");
  443.         $$.initialize.call(this, x, y, w, this.fittingHeight(1));
  444.         this._timerLimit = this._shownTimerLimit = 0;
  445.     }; // $.initialize
  446.  
  447.     /**
  448.      * Idempotent
  449.      * @interface @override @since v1.00a @since v1.00a
  450.      */
  451.     $.update = function() {
  452.         $$.update.call(this);
  453.         this.visible = this._timerLimit > 0;
  454.         if (this.visible) this._redrawTimerLimit();
  455.     }; // $.initialize
  456.  
  457.     /**
  458.      * Idempotent
  459.      * @interface @since v1.00a @version v1.00a
  460.      * @param {Number} timerLimit - The action input timer in seconds
  461.      */
  462.     $.setTimerLimit = function(timerLimit) { this._timerLimit = timerLimit; };
  463.  
  464.     /**
  465.      * Idempotent
  466.      * @since v1.00a @version v1.00a
  467.      */
  468.     $._redrawTimerLimit = function() {
  469.         var shownTimerLimit = Math.ceil(this._timerLimit);
  470.         if (shownTimerLimit === this._shownTimerLimit) return;
  471.         this._shownTimerLimit = shownTimerLimit;
  472.         this.contents.clear();
  473.         var timerWinDesc = $gameSystem.actionInputTimerParam("timerWinDesc");
  474.         var text = timerWinDesc.replace("%1", shownTimerLimit);
  475.         this.drawText(text, 0, 0, this.textWidth(text), "center");
  476.     }; // $._redrawTimerLimit
  477.  
  478. })(); // $.prototype
  479.  
  480. /*----------------------------------------------------------------------------
  481.  *    # Edit class: Scene_Battle
  482.  *      - Implements the timer that skips all actors not finished inputs
  483.  *----------------------------------------------------------------------------*/
  484.  
  485. (function(AIT) {
  486.  
  487.     "use strict";
  488.  
  489.     AIT.Scene_Battle = { orig: {}, new: {} };
  490.     var $ = Scene_Battle.prototype;
  491.     var _SB = AIT.Scene_Battle.orig, _AIT = AIT.Scene_Battle.new;
  492.  
  493.     /*------------------------------------------------------------------------
  494.      *    New private variables
  495.      *------------------------------------------------------------------------*/
  496.     // {{*}} _actionInputTimer: The container of all other new variables
  497.     //       {Window_ActionInputTimer} timerWin: The action input timer window
  498.  
  499.     _SB.update = $.update;
  500.     _AIT.update = $.update = function() { // v1.00a - v1.00a; Extended
  501.         _SB.update.apply(this, arguments);
  502.         // Added to update the timer that skips all actors not finished inputs
  503.         _AIT._update.call(this);
  504.         //
  505.     }; // $.update
  506.  
  507.     _SB.createAllWindows = $.createAllWindows;
  508.     _AIT.createAllWindows = $.createAllWindows = function() {
  509.     // v1.00a - v1.00a; Extended
  510.         _SB.createAllWindows.apply(this, arguments);
  511.         // Added to store all parameters of this plugin as well
  512.         _AIT._createTimerWin.call(this);
  513.         //
  514.     }; // $.createAllWindows
  515.  
  516.     /**
  517.      * The this pointer is Scene_Battle.prototype
  518.      * Idempotent
  519.      * @since v1.00a @version v1.00a
  520.      */
  521.     _AIT._update = function() {
  522.         BattleManager.updateActionInputTimer();
  523.         var timerLimit = BattleManager.actionInputTimer();
  524.         this._actionInputTimer.timerWin.setTimerLimit(timerLimit);
  525.         if (timerLimit < 0) _AIT._startTurn.call(this);
  526.     }; // _AIT._update
  527.  
  528.     /**
  529.      * The this pointer is Scene_Battle.prototype
  530.      * Idempotent
  531.      * @since v1.00a @version v1.00a
  532.      */
  533.     _AIT._createTimerWin = function() {
  534.         this._actionInputTimer = {
  535.             timerWin: new Window_ActionInputTimer()
  536.         };
  537.         this.addWindow(this._actionInputTimer.timerWin);
  538.     }; // _AIT._createTimerWin
  539.  
  540.     /**
  541.      * The this pointer is Scene_Battle.prototype
  542.      * Idempotent
  543.      * @since v1.00a @version v1.00a
  544.      */
  545.     _AIT._startTurn = function() {
  546.         _AIT._endInputs.call(this);
  547.         BattleManager.startTurn();
  548.     }; // _AIT._startTurn
  549.  
  550.     /**
  551.      * The this pointer is Scene_Battle.prototype
  552.      * Idempotent
  553.      * @since v1.00a @version v1.00a
  554.      */
  555.     _AIT._endInputs = function() {
  556.         [
  557.             this._actorWindow,
  558.             this._enemyWindow,
  559.             this._skillWindow,
  560.             this._itemWindow
  561.         ].forEach(_AIT._endSelectWinInput, this);
  562.         this.endCommandSelection();
  563.         this._actorCommandWindow.deactivate();
  564.         this._partyCommandWindow.deactivate();
  565.     }; // _AIT._endInputs
  566.  
  567.     /**
  568.      * The this pointer is Scene_Battle.prototype
  569.      * Idempotent
  570.      * @since v1.00a @version v1.00a
  571.      * @param {Window_Selectable} win - The skill/item/actor/enemy select window
  572.      */
  573.     _AIT._endSelectWinInput = function(win) {
  574.         // Deactivate must be called before hide to void the current selection
  575.         win.deactivate();
  576.         win.hide();
  577.         //
  578.     }; // _AIT._endSelectWinInput
  579.  
  580. })(DoubleX_RMMV.Action_Input_Timer); // Scene_Battle
  581.  
RAW Paste Data