moon-red-goddess-cornelia/js/plugins/WaitModeEx.js
2025-03-31 13:21:45 -05:00

69 lines
No EOL
1.8 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.

// WaitModeEx.js Ver.1.0.0
// MIT License (C) 2023 あわやまたな
// http://opensource.org/licenses/mit-license.php
/*:
* @target MZ MV
* @orderAfter PluginCommonBase
* @plugindesc 「完了までウェイト」を使いやすくします。
* @author あわやまたな (Awaya_Matana)
* @url https://awaya3ji.seesaa.net/article/499273093.html
* @help 完了までウェイトを任意のタイミングで、
* 任意のキャラクターに対して行えるようになります。
*
* PluginCommonBaseにも対応。
*
* [更新履歴]
* 2023/05/08Ver.1.0.0 公開。
*
* @command setWaitMode
* @desc 完了までウェイト
*
* @arg waitMode
* @text ウェイトモード
* @type select
* @default route
* @option 移動ルート
* @value route
* @option アニメーション
* @value animation
* @option フキダシアイコン
* @value balloon
*
* @arg characterId
* @text キャラクターID
* @desc 未入力で最後に対象となったキャラクター。
* @default
*
*/
'use strict';
{
const useMZ = Utils.RPGMAKER_NAME === "MZ";
const pluginName = document.currentScript.src.match(/^.*\/(.*).js$/)[1];
const hasPluginCommonBase = typeof PluginManagerEx === "function";
//-----------------------------------------------------------------------------
// Spriteset_Battle
PluginManager.registerCommand(pluginName, "setWaitMode", function (args) {
const characterId = +args.characterId;
if (args.characterId !== "" && this.character(characterId)) {
this._characterId = characterId;
}
this.setWaitMode(args.waitMode);
});
if (hasPluginCommonBase) {
PluginManagerEx.registerCommand(document.currentScript, "setWaitMode", function (args) {
const characterId = args.characterId;
if (characterId !== "" && this.character(characterId)) {
this._characterId = characterId;
}
this.setWaitMode(args.waitMode);
});
}
}