Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
1.1.0 2018/05/22 プラグインの機能を無効化するスイッチを追加
  • Loading branch information
triacontane committed May 22, 2018
1 parent 6b8f78a commit b4daa95
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion DescriptionExtend.js
Expand Up @@ -6,6 +6,7 @@
// http://opensource.org/licenses/mit-license.php
// ----------------------------------------------------------------------------
// Version
// 1.1.0 2018/05/22 プラグインの機能を無効化するスイッチを追加
// 1.0.0 2018/05/20 初版
// ----------------------------------------------------------------------------
// [Blog] : https://triacontane.blogspot.jp/
Expand All @@ -27,6 +28,11 @@
* @default 0
* @type number
*
* @param validSwitch
* @desc 指定した番号のスイッチがONのときのみプラグインが有効になります。0の場合は常に有効になります。
* @default 0
* @type switch
*
* @param notePrefix
* @desc 他のプラグインとメモ欄もしくはプラグインコマンドの名称が被ったときに指定する接頭辞です。通常は指定不要です。
* @default
Expand Down Expand Up @@ -56,6 +62,12 @@
* @default 0
* @type number
*
* @param validSwitch
* @text 有効スイッチ
* @desc 指定した番号のスイッチがONのときのみプラグインが有効になります。0の場合は常に有効になります。
* @default 0
* @type switch
*
* @param notePrefix
* @text メモ欄接頭辞
* @desc 他のプラグインとメモ欄もしくはプラグインコマンドの名称が被ったときに指定する接頭辞です。通常は指定不要です。
Expand Down Expand Up @@ -153,12 +165,16 @@
var _Window_Help_setItem = Window_Help.prototype.setItem;
Window_Help.prototype.setItem = function(item) {
_Window_Help_setItem.apply(this, arguments);
if (!item) {
if (!item || !this.isValidDescriptionExtend()) {
return;
}
var extendText = getMetaValues(item, ['拡張説明', 'ExtendDesc']);
if (extendText) {
this.setText((param.swapDescription ? '' : this._text + '\n') + extendText);
}
};

Window_Help.prototype.isValidDescriptionExtend = function() {
return !param.validSwitch || $gameSwitches.value(param.validSwitch)
};
})();

0 comments on commit b4daa95

Please sign in to comment.