Skip to content

Instantly share code, notes, and snippets.

function MixIn(SceneClass){
class mixin extends SceneClass{
constructor(){
super()
}
initialize(){
super.initialize()
Scene_Message.prototype.initialize.call(this)
this.createDisplayObjects()
}
//=============================================================================
// Window_EventSkill.js
//
//=============================================================================
/*:
* @plugindesc 「アイテム選択の処理」のようにスキルを選択してIDを変数に渡す
* @target MZ
* @author mihiraghi
*
* @help
@asakayu
asakayu / Lightest_Game_SelfSwitches_refresh.js
Last active September 15, 2020 19:25
ツクールMV・MZでGame_SelfSwitches.prototype.setValue時のrefresh処理を軽くします。
const _Game_SelfSwitches_setValue = Game_SelfSwitches.prototype.setValue
Game_SelfSwitches.prototype.setValue = function(key, value) {
_Game_SelfSwitches_setValue.apply(this, arguments)
this.onChange(key);//onChangeが2回呼ばれることになるが、1回目はkeyがないので弾かれる
}
Game_SelfSwitches.prototype.onChange = function(key) {
if(!Array.isArray(key)){ return; }// keyが渡されなかったり配列でなかったら抜ける
const [mapId, eventId, switchId] = key;
// mapIdが一致しなかったら更新しない(マップ読み込み時に更新される)
if(mapId === $gameMap.mapId() && $gameMap.event(eventId)){ $gameMap.event(eventId).refresh(); }
//=============================================================================
// Mihil_HiddenItems.js
//=============================================================================
// Copyright (c) 2018-2020 Mihiraghi
// Released under the MIT license.
// http://opensource.org/licenses/mit-license.php
/*:
* @plugindesc アイテムをメニューから隠します
* @author Mihiraghi
* @Thanks
//=============================================================================
// Mihil_CheckFileExists.js
//
//=============================================================================
// Copyright (c) 2020- Mihiraghi
// Released under the MIT license.
// http://opensource.org/licenses/mit-license.php
/*:
* @plugindesc ファイル欠けでゲーム進行が止まらなくする
* @author Mihigarhi