/* globals WAY, WAYModuleLoader */ // =========================================================================== // WAY_AnimationRate.js // =========================================================================== /*: @plugindesc v1.1.0 Allows you to set the animation rate for each animation individually. @author waynee95 @param animationRate @text Default Animation Rate @type number @min 1 @desc Adjusts the rate of battle animations. The higher, the slower. Default: 4 @default 4 @help Just add to the name of the Animation. The higher, the slower. ============================================================================== ■ Terms of Use ============================================================================== This work is licensed under the MIT license. More info here: https://github.com/waynee95/mv-plugins/blob/master/LICENSE ============================================================================== ■ Contact Information ============================================================================== Forum Link: https://forums.rpgmakerweb.com/index.php?members/waynee95.88436/ Website: http://waynee95.me/ Discord Name: waynee95#4261 */ "use strict"; if (typeof WAY === "undefined") { console.error("You need to install WAY_Core!"); // eslint-disable-line no-console if (Utils.isNwjs() && Utils.isOptionValid("test")) { var gui = require("nw.gui"); //eslint-disable-line gui.Window.get().showDevTools(); } SceneManager.stop(); } else { WAYModuleLoader.registerPlugin("WAY_AnimationRate", "1.1.0", "waynee95", { name: "WAY_Core", version: ">= 2.0.0" }); } (function ($) { //========================================================================== // Sprite_Animation //========================================================================== $.alias.Sprite_Animation_setRate = Sprite_Animation.prototype.setupRate; Sprite_Animation.prototype.setupRate = function () { var re = /<(?:RATE): (\d+)>/i; if (this._animation.name.match(re)) { this._rate = Number(RegExp.$1); } else { this._rate = $.parameters.animationRate; } }; })(WAYModuleLoader.getModule("WAY_AnimationRate"));