Skip to content

Commit

Permalink
Update IgnisDebugControl.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Raizen884 authored Aug 22, 2020
1 parent 96dba1f commit 8a6a8f4
Showing 1 changed file with 26 additions and 2 deletions.
28 changes: 26 additions & 2 deletions IgnisDebugControl.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@
* @author Reisen (Mauricio Pastana)
* @help Use F7 to fast boot, F6 to switch between active and inactive (only on test mode)
*/
* @param DebugWindow
* @type boolean
* @desc If the chrome DevTools should automatically open with the test
* @default false
*/


//////////////////////////////////////////////////////////////////////////////////////////////////
Expand All @@ -15,7 +21,9 @@
// SceneManager
//
// The scene class of the Manager.

//=============================================================================
// onKeyDown - alias function
//=============================================================================
let _ignisEngine_SceneManager_OnKeyDown = SceneManager.onKeyDown
SceneManager.onKeyDown = function (event) {
_ignisEngine_SceneManager_OnKeyDown.call(this, event);
Expand All @@ -28,11 +36,27 @@ SceneManager.onKeyDown = function (event) {
}
};

//=============================================================================
// ignisRebootGame - new function
//=============================================================================
SceneManager.ignisRebootGame = function () {
location.reload();
}
//=============================================================================
// isGameActive - alias function
//=============================================================================
let _ignisEngine_SceneManager_isGameActive = SceneManager.isGameActive
SceneManager.isGameActive = function () {
if ($gameTemp.isPlaytest()) { return !this.ignisResumePlay }
_ignisEngine_SceneManager_isGameActive.call(this);
};
//=============================================================================
// initialize - alias function
//=============================================================================
let _ignisEngine_Scene_Boot_initialize = Scene_Boot.prototype.initialize
Scene_Boot.prototype.initialize = function () {
_ignisEngine_Scene_Boot_initialize.call(this);
let ignisParameters = PluginManager.parameters('IgnisDebugControl');
let windowDevToolsWindow = JSON.parse(ignisParameters['DebugWindow']);
if (windowDevToolsWindow) { require('nw.gui').Window.get().showDevTools(); }
};

0 comments on commit 8a6a8f4

Please sign in to comment.