forked from neofuji/RPGMV-Plugins
-
Notifications
You must be signed in to change notification settings - Fork 0
/
FastBattleOption.js
73 lines (63 loc) · 2.22 KB
/
FastBattleOption.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
//=============================================================================
// FastBattleOption.js
//=============================================================================
/*:
* @plugindesc Adds fast battle option.
* @author Toru Higuruma
*
* @param Option Text
* @desc The text for "Fast battle".
* @default Fast battle
*
* @help FastBattleOption v1.0 (2017-08-02)
* Copyright (c) 2017 Toru Higuruma
* This plugin is provided under the MIT License.
* https://git.io/tmv
*
* Plugin commands:
* This plugin does not provide plugin commands.
*/
/*:ja
* @plugindesc 高速戦闘のオプションを追加します。
* @author Toru Higuruma
*
* @param Option Text
* @desc 「高速戦闘」の文字列です。
* @default 高速戦闘
*
* @help FastBattleOption v1.0 (2017-08-02)
* Copyright (c) 2017 Toru Higuruma
* このプラグインは MIT License の下で提供されます。
* https://git.io/tmv
*
* プラグインコマンド:
* このプラグインにプラグインコマンドはありません。
*/
(function() {
var parameters = PluginManager.parameters('FastBattleOption');
var optionText = String(parameters['Option Text'] || 'Fast battle');
ConfigManager.fastBattle = false;
var _ConfigManager_makeData = ConfigManager.makeData;
ConfigManager.makeData = function() {
var config = _ConfigManager_makeData.call(this);
config.fastBattle = this.fastBattle;
return config;
};
var _ConfigManager_applyData = ConfigManager.applyData;
ConfigManager.applyData = function(config) {
_ConfigManager_applyData.call(this, config);
this.fastBattle = this.readFlag(config, 'fastBattle');
};
var _Window_Options_addGeneralOptions =
Window_Options.prototype.addGeneralOptions;
Window_Options.prototype.addGeneralOptions = function() {
_Window_Options_addGeneralOptions.call(this);
this.addCommand(optionText, 'fastBattle');
};
var _Window_BattleLog_isFastForward =
Window_BattleLog.prototype.isFastForward;
Window_BattleLog.prototype.isFastForward = function() {
return (_Window_BattleLog_isFastForward.call(this) ||
ConfigManager.fastBattle);
};
})();