53 lines
No EOL
1.8 KiB
JavaScript
53 lines
No EOL
1.8 KiB
JavaScript
//=============================================================================
|
|
// RPG Maker MZ - KN_Boot.js
|
|
//=============================================================================
|
|
|
|
/*:ja
|
|
* @target MZ
|
|
* @author kurogoma knights
|
|
* @base PluginCommonBase
|
|
* @plugindesc ブート時の設定
|
|
*/
|
|
|
|
(() => {
|
|
'use strict';
|
|
const script = document.currentScript;
|
|
const param = PluginManagerEx.createParameter(script);
|
|
|
|
// ニューゲームしたら強制的にOPに飛ばす テストプレイ中は通らないからOK
|
|
const _Scene_Title_commandNewGame = Scene_Title.prototype.commandNewGame;
|
|
Scene_Title.prototype.commandNewGame = function() {
|
|
_Scene_Title_commandNewGame.call(this);
|
|
|
|
// 強制的にOPに飛ばす
|
|
// ここはリリース時にコメントアウトされてるとダメなので要注意!!
|
|
$gamePlayer.reserveTransfer(7, 1, 1, 2, 0); // mapId(op) x, y, 向き(下), fade(黒)
|
|
};
|
|
|
|
// 開発用のカットシーン上書き テストプレイ時のみ?
|
|
// @see DevToolManage
|
|
Scene_Boot.prototype.cutSceneTitle = function() {
|
|
// テストプレイ要 上書き
|
|
param.CutTitle = 1; // 0:title
|
|
|
|
//
|
|
if (DataManager.isBattleTest() || DataManager.isEventTest()) {
|
|
return;
|
|
}
|
|
switch (param.CutTitle) {
|
|
case 1:
|
|
this.goToNewGame();
|
|
break;
|
|
case 2:
|
|
const result = this.goToLatestContinue();
|
|
if (!result) {
|
|
this.goToNewGame();
|
|
}
|
|
break;
|
|
}
|
|
};
|
|
|
|
// テストプレイ時、イベント消えたときに進行不能になる問題 (pages of null) のワークアラウンド
|
|
// Game_Event.prototype.refresh = function() {}
|
|
|
|
})(); |