トリアコンタン様のプラグイン、Scene Glossaryを利用しようと思うのですが、SRD_TranslationEngineと競合してしまい、メニューを開く前にエラーが起きてしまいます。
(追記) エラー内容は ”undefined is not a function” でした。
SRD_TranslationEngineは翻訳文を挿入できるプラグインなのですが、SRDude様の説明動画曰く、他のプラグインでコマンドが増えても問題なく動くそうなのですが、メニュー画面に追加された辞書コマンドに対応できていないような気がします。
SRD_TranslationEngineの内容に、下記のようなコードを見かけたのですが、ここを変更すれば上手く動作するでしょうか?
コード: 全て選択
////===========================================================================
//// Window_Command
////
//// A small field is appended in order to identify Window_Command children.
//// The "addCommand" function is manipulated in order to apply translations.
////===========================================================================
Window_Command._id = '49202934';
$.Window_Command_initialize = Window_Command.prototype.initialize;
Window_Command.prototype.initialize = function(x, y) {
$.Window_Command_initialize.apply(this, arguments);
this[Window_Command._id] = true; //Special code used to identify the window as a child of Window_Command.
};
$.Window_Command_addCommand = Window_Command.prototype.addCommand;
Window_Command.prototype.addCommand = function(name, symbol, enabled, ext) {
if(ConfigManager.isDefaultLanguage()) {
$.Window_Command_addCommand.apply(this, arguments);
return;
}
var lang = ConfigManager.getLanguage();
if($dataTranslations['cmd'] && $dataTranslations['cmd'][name] && $dataTranslations['cmd'][name][lang]) {
name = $dataTranslations['cmd'][name][lang];
}
$.Window_Command_addCommand.call(this, name, symbol, enabled, ext);
};
Window_Command.prototype.currentName = function() {
return this.currentData() ? this.currentData().name : null;
};
よろしくお願いします。