【解決済み】CommonPopupCoreの競合について

アバター
にゃたま
記事: 837
登録日時: 2016年1月13日(水) 23:53
お住まい: 床下の猫王国-すみませんが体調悪いのでサポートはお休みさせていただきます
連絡を取る:

【解決済み】CommonPopupCoreの競合について

投稿記事by にゃたま » 2019年2月09日(土) 14:57

やな様のCommonPopupCore.js V1.06がLighting and Time EditorのLNM_GameTime.js V1.5.1と
競合して以下のエラーが出力されてしまう問題が発生しました。
実行時に共に入れているだけで発生するのでなにか根本的な問題でしょうか。
双方共、使用したいプラグインの為こちらの競合の解決法をご存知でしたら教えていただけないでしょうか?
ソースを見ても私には原因がわかりませんでした。よろしくお願いいたします。

追記
因みにやな様のGetInformation_ver1.16及びLighting and Time Editorの
その他のプラグインについても同様にオンにしています。

CommonPopupCore.js
https://www6.atwiki.jp/pokotan/pages/3.html

Lighting and Time Editor
最新版
https://github.com/FeelZoR/Lighting-GameTime-Editor
デモ版
https://drive.google.com/open?id=1OZO76 ... C6k3KwZEIq
添付ファイル
スクリーンショット 2019-02-09 14.48.52.png
最後に編集したユーザー にゃたま on 2019年2月10日(日) 11:18 [ 編集 1 回目 ]

astral
記事: 106
登録日時: 2018年11月14日(水) 00:21
連絡を取る:

Re: CommonPopupCoreの競合について

投稿記事by astral » 2019年2月09日(土) 17:59

こんばんは。

LNM_LightingTool.jsとLNM_GameTime.jsを書き換えてみてください。
(for in がArray.prototypeを列挙していました)

コード: 全て選択

//LNM_LightingTool.js v1.7.4

//2666行目
GameTime.prototype.update = function() {
    FLZ_GameTime_Update.call(this);
    if (GameEditor.TOOLS.TimeEnabled === 'true' && !this._pause) {
        /*  ここから追加変更
        for (var index in this.lightLimits) {
            this.lightLimits[index].update(this.time);
        }
        */
        this.lightLimits.forEach(function(lightLimit) {
            lightLimit.update(this.time);
        }, this);
    }
};
   
//2680行目
GameTime.prototype.updateAllLightLimits = function() {
    if (GameEditor.TOOLS.TimeEnabled === 'true' && !this._pause) {
        /*  ここから追加変更
        for (var index in this.lightLimits) {
            this.lightLimits[index]._lastValue = -1;
        }
        */
        this.lightLimits.forEach(function(lightLimit) {
            lightLimit._lastValue = -1;
        }, this);
    }
};

//LNM_GameTime.js v1.5.1

//431行目
GameTime.prototype.update = function() {
    if (GameEditor.TOOLS.TimeEnabled === 'true') {
        if (!this._pause) {
            this.time.update();
            /*  ここから追加変更
            for (var index in this.switchLimits) {
                this.switchLimits[index].update(this.time);
            }
            */
            this.switchLimits.forEach(function(switchLimit) {
                switchLimit.update(this.time);
            }, this);


追記 バージョン番号を追加しました。
最後に編集したユーザー astral on 2019年2月10日(日) 12:00 [ 編集 1 回目 ]
アバター
にゃたま
記事: 837
登録日時: 2016年1月13日(水) 23:53
お住まい: 床下の猫王国-すみませんが体調悪いのでサポートはお休みさせていただきます
連絡を取る:

Re: CommonPopupCoreの競合について

投稿記事by にゃたま » 2019年2月10日(日) 11:17

astral様

いつもすみません。見事競合が回避されていました。
おかげさまで制作続行できます。ありがとうございました。

“MV:質問” へ戻る