// Generated by CoffeeScript 1.9.3
/* Save_Load_CallCommonEvent.js */
/*:ja
* @plugindesc セーブ時、ロード時にのみ、特定のコモンイベントを起動します。
* @author mamunine
* @param SaveCommonID
* @desc セーブ時に呼び出すコモンイベントID (1未満なら呼ばない)
* @default 0
* @param LoadCommonID
* @desc ロード時に呼び出すコモンイベントID (1未満なら呼ばない)
* @default 0
*/
(function() {
var loadCommonId, params, saveCommonId,
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
hasProp = {}.hasOwnProperty;
params = PluginManager.parameters('Save_Load_CallCommonEvent');
saveCommonId = Number(params['SaveCommonID'] || 0);
loadCommonId = Number(params['LoadCommonID'] || 0);
this.Scene_Save = (function(superClass) {
extend(Scene_Save, superClass);
function Scene_Save() {
return Scene_Save.__super__.constructor.apply(this, arguments);
}
Scene_Save.prototype.onSaveSuccess = function() {
Scene_Save.__super__.onSaveSuccess.call(this);
if (saveCommonId < 1) {
return;
}
$gameTemp.reserveCommonEvent(saveCommonId);
if (SceneManager.isPreviousScene(Scene_Menu)) {
SceneManager.pop();
}
};
return Scene_Save;
})(Scene_Save);
this.Scene_Load = (function(superClass) {
extend(Scene_Load, superClass);
function Scene_Load() {
return Scene_Load.__super__.constructor.apply(this, arguments);
}
Scene_Load.prototype.onLoadSuccess = function() {
Scene_Load.__super__.onLoadSuccess.call(this);
if (loadCommonId < 1) {
return;
}
$gameTemp.reserveCommonEvent(loadCommonId);
if (SceneManager.isPreviousScene(Scene_Menu)) {
SceneManager.pop();
}
};
return Scene_Load;
})(Scene_Load);
}).call(this);