/*: * @target MZ * @plugindesc MapNameExtend 追加機能:フェードアウト中だけマップ名非表示 * @author IvI * @orderAfter MapNameExtend */ (() => { // 元の判定を残したまま、フェードアウト中は必ず true を返す const _isNeedHide = Window_MapName.prototype.isNeedHide; Window_MapName.prototype.isNeedHide = function() { // シーンフェード(場所移動暗転など)を検出 const s = SceneManager._scene; const sceneFade = s && s._fadeDuration > 0 && s._fadeSign < 0; // _fadeSign=-1 がフェードアウト // 画面色調フェード(イベントコマンド「フェードアウト」)も検出 const screenFade = $gameScreen.brightness() < 255; if (sceneFade || screenFade) { return true; // このフレームは隠す } return _isNeedHide.call(this); // それ以外は元の条件判定 }; })();