-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTPBWorkaround.js
134 lines (131 loc) · 3.64 KB
/
TPBWorkaround.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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
//=============================================================================
// RPG Maker MZ - アクティブTPBで落ちる問題に対処
//=============================================================================
/*:
* @target MZ
* @plugindesc Workaround that fixes crash issue with active TPB
* @author MihailJP
* @url https://github.com/MihailJP/mihamzplugin/blob/master/TPBWorkaround.js
*
* @help TPBWorkAround.js
*
* This plugin works around crash issue with active TPBS
* which occurs on version 1.0.0. This is discussed at:
* https://forums.rpgmakerweb.com/index.php?threads/bug-extremely-rare-but-fatal-active-tpbs-bug-crashing-the-game.126144/
*
* It does not provide plugin commands.
*
* License: The Unlicense
* https://github.com/MihailJP/mihamzplugin/blob/master/LICENSE.txt
*
* 更新履歴
* 24 Sept 2020: Update referencing the forum posts
* 21 Sept 2020: First edition
*/
/*:ja
* @target MZ
* @plugindesc アクティブTPBで落ちる問題に対処
* @author MihailJP
* @url https://github.com/MihailJP/mihamzplugin/blob/master/TPBWorkaround.js
*
* @help TPBWorkAround.js
*
* このプラグインは、Version 1.0.0 で発生している、
* アクティブTPBで落ちる問題に対処します。海外版ツクールフォーラムを参照してください。
* https://forums.rpgmakerweb.com/index.php?threads/bug-extremely-rare-but-fatal-active-tpbs-bug-crashing-the-game.126144/
*
* プラグインコマンドはありません。
*
* ライセンス: Unlicense
* https://github.com/MihailJP/mihamzplugin/blob/master/LICENSE.txt
*
* 更新履歴
* 令和2年9月24日 海外版フォーラムを参考に修正
* 令和2年9月21日 初版
*/
(() => {
const orig_Scene_Battle_onEnemyOk = Scene_Battle.prototype.onEnemyOk;
Scene_Battle.prototype.onEnemyOk = function() {
try {
orig_Scene_Battle_onEnemyOk.call(this);
} catch (e) {
if (e instanceof TypeError) {
console.log(e);
} else {
throw e;
}
}
};
const orig_Scene_Battle_onActorOk = Scene_Battle.prototype.onActorOk;
Scene_Battle.prototype.onActorOk = function() {
try {
orig_Scene_Battle_onActorOk.call(this);
} catch (e) {
if (e instanceof TypeError) {
console.log(e);
} else {
throw e;
}
}
};
const orig_Scene_Battle_onSkillOk = Scene_Battle.prototype.onSkillOk;
Scene_Battle.prototype.onSkillOk = function() {
try {
orig_Scene_Battle_onSkillOk.call(this);
} catch (e) {
if (e instanceof TypeError) {
console.log(e);
} else {
throw e;
}
}
};
const orig_Scene_Battle_onItemOk = Scene_Battle.prototype.onItemOk;
Scene_Battle.prototype.onItemOk = function() {
try {
orig_Scene_Battle_onItemOk.call(this);
} catch (e) {
if (e instanceof TypeError) {
console.log(e);
} else {
throw e;
}
}
};
const orig_Scene_Battle_onSelectAction = Scene_Battle.prototype.onSelectAction;
Scene_Battle.prototype.onSelectAction = function() {
try {
orig_Scene_Battle_onSelectAction.call(this);
} catch (e) {
if (e instanceof TypeError) {
console.log(e);
} else {
throw e;
}
}
};
const orig_Scene_Battle_commandAttack = Scene_Battle.prototype.commandAttack;
Scene_Battle.prototype.commandAttack = function() {
try {
orig_Scene_Battle_commandAttack.call(this);
} catch (e) {
if (e instanceof TypeError) {
console.log(e);
} else {
throw e;
}
}
};
const orig_Scene_Battle_commandGuard = Scene_Battle.prototype.commandGuard;
Scene_Battle.prototype.commandGuard = function() {
try {
orig_Scene_Battle_commandGuard.call(this);
} catch (e) {
if (e instanceof TypeError) {
console.log(e);
} else {
throw e;
}
}
};
})();