-
Notifications
You must be signed in to change notification settings - Fork 67
/
Copy pathMrTS_CommonEventOnMenuLeave.js
39 lines (36 loc) · 1.39 KB
/
MrTS_CommonEventOnMenuLeave.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
//=============================================================================
// MrTS_CommonEventOnMenuLeave.js
//=============================================================================
/*:
* @plugindesc Calls common event when user leaves menu.
* @author Mr. Trivel
*
* @param CE ID
* @desc Common Event ID to call.
* @default 8
*
* @help
* --------------------------------------------------------------------------------
* Terms of Use
* --------------------------------------------------------------------------------
* Don't remove the header or claim that you wrote this plugin.
* Credit Mr. Trivel if using this plugin in your project.
* Free for commercial non-commercial projects.
* --------------------------------------------------------------------------------
* Version 1.0
* --------------------------------------------------------------------------------
*
* --------------------------------------------------------------------------------
* Version History
* --------------------------------------------------------------------------------
* 1.0 - Release
*/
(function() {
var parameters = PluginManager.parameters('MrTS_CommonEventOnMenuLeave');
var paramCeId = Number(parameters['CE ID'] || 8);
var _Scene_Menu_popScene = Scene_Menu.prototype.popScene
Scene_Menu.prototype.popScene = function() {
_Scene_Menu_popScene.call(this);
$gameTemp.reserveCommonEvent(paramCeId);
};
})();