magical-girls-runa-and-nanami/js/plugins/MNKR_SwitchBattleLog.js
2026-02-28 12:33:13 -06:00

52 lines
1.7 KiB
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
* --------------------------------------------------
* MNKR_SwitchBattleLog.js
* Ver.0.0.1
* Copyright (c) 2021 Munokura
* This software is released under the MIT license.
* http://opensource.org/licenses/mit-license.php
* --------------------------------------------------
*/
/*:
* @target MZ MV
* @url https://raw.githubusercontent.com/munokura/MNKR-MZ-plugins/master/MNKR_SwitchBattleLog.js
* @plugindesc バトルログの表示非表示をスイッチで切り替えられるようになります。
* @author munokura
*
* @help
* バトルログの表示非表示をスイッチで切り替えられるようになります。
*
*
* 利用規約:
* MITライセンスです。
* https://licenses.opensource.jp/MIT/MIT.html
* 作者に無断で改変、再配布が可能で、
* 利用形態商用、18禁利用等についても制限はありません。
*
*
* @param hideSwitch
* @text 非表示スイッチ
* @type switch
* @default 0
* @desc スイッチがONの時にバトルログが非表示になります。「なし」に指定すると、常に非表示になります。
*/
(() => {
"use strict";
const pluginName = document.currentScript.src.split("/").pop().replace(/\.js$/, "");
const parameters = PluginManager.parameters(pluginName);
const param = {};
param.hideSwitch = Number(parameters['hideSwitch'] || 0);
const _Window_BattleLog_update = Window_BattleLog.prototype.update;
Window_BattleLog.prototype.update = function () {
_Window_BattleLog_update.call(this);
const raise = param.hideSwitch === 0 ? true : $gameSwitches.value(param.hideSwitch);
if (raise) {
this.hide();
}
};
})();