Advertisement
Double_X

DoubleX RMMV Action Input Timer

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