Skip to content

Instantly share code, notes, and snippets.

@GMMan
Created February 21, 2018 23:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GMMan/d72bd056e6e5bea04e12c28bcb8e68e5 to your computer and use it in GitHub Desktop.
Save GMMan/d72bd056e6e5bea04e12c28bcb8e68e5 to your computer and use it in GitHub Desktop.
diff --git a/Game.rpgproject b/Game.rpgproject
index 0ad457a..df7c111 100644
--- a/Game.rpgproject
+++ b/Game.rpgproject
@@ -1 +1 @@
-RPGMV 1.5.1
\ No newline at end of file
+RPGMV 1.6.0
\ No newline at end of file
diff --git a/js/rpg_core.js b/js/rpg_core.js
index 63d2d66..1b660ea 100644
--- a/js/rpg_core.js
+++ b/js/rpg_core.js
@@ -1,5 +1,5 @@
//=============================================================================
-// rpg_core.js v1.5.1
+// rpg_core.js v1.6.0
//=============================================================================
//-----------------------------------------------------------------------------
@@ -180,7 +180,7 @@ Utils.RPGMAKER_NAME = 'MV';
* @type String
* @final
*/
-Utils.RPGMAKER_VERSION = "1.5.1";
+Utils.RPGMAKER_VERSION = "1.6.0";
/**
* Checks whether the option is in the query string.
@@ -191,7 +191,9 @@ Utils.RPGMAKER_VERSION = "1.5.1";
* @return {Boolean} True if the option is in the query string
*/
Utils.isOptionValid = function(name) {
- return location.search.slice(1).split('&').contains(name);
+ if (location.search.slice(1).split('&').contains(name)) {return 1;};
+ if (typeof nw !== "undefined" && nw.App.argv.length > 0 && nw.App.argv[0].split('&').contains(name)) {return 1;};
+ return 0;
};
/**
@@ -1715,7 +1717,7 @@ function Graphics() {
throw new Error('This is a static class');
}
-Graphics._cssFontLoading = document.fonts && document.fonts.ready;
+Graphics._cssFontLoading = document.fonts && document.fonts.ready && document.fonts.ready.then;
Graphics._fontLoaded = null;
Graphics._videoVolume = 1;
@@ -2364,6 +2366,8 @@ Graphics._updateRealScale = function() {
if (this._stretchEnabled) {
var h = window.innerWidth / this._width;
var v = window.innerHeight / this._height;
+ if (h >= 1 && h - 0.01 <= 1) h = 1;
+ if (v >= 1 && v - 0.01 <= 1) v = 1;
this._realScale = Math.min(h, v);
} else {
this._realScale = this._scale;
diff --git a/js/rpg_managers.js b/js/rpg_managers.js
index 51f45eb..3ff064f 100644
--- a/js/rpg_managers.js
+++ b/js/rpg_managers.js
@@ -1,5 +1,5 @@
//=============================================================================
-// rpg_managers.js v1.5.1
+// rpg_managers.js v1.6.0
//=============================================================================
//-----------------------------------------------------------------------------
@@ -1939,6 +1939,11 @@ SceneManager.onKeyDown = function(event) {
require('nw.gui').Window.get().showDevTools();
}
break;
+ case 123: //F12
+ if (Utils.isNwjs()) {
+ event.preventDefault();
+ }
+ break;
}
}
};
@@ -2274,7 +2279,7 @@ BattleManager.updateEvent = function() {
return this.updateEventMain();
}
}
- return this.checkAbort2();
+ return this.checkAbort();
};
BattleManager.updateEventMain = function() {
@@ -2623,14 +2628,6 @@ BattleManager.checkBattleEnd = function() {
BattleManager.checkAbort = function() {
if ($gameParty.isEmpty() || this.isAborting()) {
- this.processAbort();
- return true;
- }
- return false;
-};
-
-BattleManager.checkAbort2 = function() {
- if ($gameParty.isEmpty() || this.isAborting()) {
SoundManager.playEscape();
this._escaped = true;
this.processAbort();
diff --git a/js/rpg_objects.js b/js/rpg_objects.js
index a6a09a9..1c192d3 100644
--- a/js/rpg_objects.js
+++ b/js/rpg_objects.js
@@ -1,5 +1,5 @@
//=============================================================================
-// rpg_objects.js v1.5.1
+// rpg_objects.js v1.6.0
//=============================================================================
//-----------------------------------------------------------------------------
@@ -9339,12 +9339,20 @@ Game_Interpreter.prototype.command413 = function() {
};
// Break Loop
-Game_Interpreter.prototype.command113 = function() {
+Game_Interpreter.prototype.command113 = function () {
+ var depth = 0;
while (this._index < this._list.length - 1) {
this._index++;
var command = this.currentCommand();
+
+ if (command.code === 112)
+ depth++;
+
if (command.code === 413 && command.indent < this._indent) {
- break;
+ if (depth > 0)
+ depth--;
+ else
+ break;
}
}
return true;
diff --git a/js/rpg_scenes.js b/js/rpg_scenes.js
index 1468534..53a3713 100644
--- a/js/rpg_scenes.js
+++ b/js/rpg_scenes.js
@@ -1,5 +1,5 @@
//=============================================================================
-// rpg_scenes.js v1.5.1
+// rpg_scenes.js v1.6.0
//=============================================================================
//=============================================================================
@@ -1292,6 +1292,13 @@ Scene_Item.prototype.useItem = function() {
this._itemWindow.redrawCurrentItem();
};
+Scene_Item.prototype.update = function() {
+ Scene_ItemBase.prototype.update.call(this);
+ if (this._categoryWindow.active !== true && this._itemWindow.active !== true && this._actorWindow.active !== true) {
+ this._categoryWindow.activate();
+ }
+};
+
//-----------------------------------------------------------------------------
// Scene_Skill
//
diff --git a/js/rpg_sprites.js b/js/rpg_sprites.js
index 2f44cc7..82514fe 100644
--- a/js/rpg_sprites.js
+++ b/js/rpg_sprites.js
@@ -1,5 +1,5 @@
//=============================================================================
-// rpg_sprites.js v1.5.1
+// rpg_sprites.js v1.6.0
//=============================================================================
//-----------------------------------------------------------------------------
@@ -2535,6 +2535,7 @@ Spriteset_Battle.prototype.battleback2Name = function() {
};
Spriteset_Battle.prototype.overworldBattleback1Name = function() {
+ if ($gameMap.battleback1Name() === '') return '';
if ($gamePlayer.isInVehicle()) {
return this.shipBattleback1Name();
} else {
@@ -2543,6 +2544,7 @@ Spriteset_Battle.prototype.overworldBattleback1Name = function() {
};
Spriteset_Battle.prototype.overworldBattleback2Name = function() {
+ if ($gameMap.battleback2Name() === '') return '';
if ($gamePlayer.isInVehicle()) {
return this.shipBattleback2Name();
} else {
diff --git a/js/rpg_windows.js b/js/rpg_windows.js
index 35efde9..a108b43 100644
--- a/js/rpg_windows.js
+++ b/js/rpg_windows.js
@@ -1,5 +1,5 @@
//=============================================================================
-// rpg_windows.js v1.5.1
+// rpg_windows.js v1.6.0
//=============================================================================
//-----------------------------------------------------------------------------
diff --git a/package.json b/package.json
new file mode 100644
index 0000000..8268cd5
--- /dev/null
+++ b/package.json
@@ -0,0 +1,12 @@
+{
+ "name": "",
+ "main": "index.html",
+ "js-flags": "--expose-gc",
+ "window": {
+ "title": "",
+ "toolbar": false,
+ "width": 816,
+ "height": 624,
+ "icon": "icon/icon.png"
+ }
+}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment