| 
 
| 赞 | 4 |  
| VIP | 0 |  
| 好人卡 | 0 |  
| 积分 | 3 |  
| 经验 | 0 |  
| 最后登录 | 2023-4-19 |  
| 在线时间 | 41 小时 |  
 Lv2.观梦者 
	梦石0 星屑348 在线时间41 小时注册时间2022-3-28帖子6 | 
| 貌似判定按钮出现的条件有些奇怪 插件代码里的这个地方
 
 复制代码NBDirButton.prototype.judge = function() {
    let boo = true;
    if (this.Data.switchScript.length>0) {
        boo = boo&&(!!eval(eval(this.Data.switchScript)));
    }
    if (this.Data.switch>0) {
        boo = boo&&($gameSwitches.value(this.Data.switch));
    }
    if (this.Data.textHide) {
        let ts = $gameMessage.isBusy();
        if (ts) {
            this.textShowDelay = 10;
            boo = false;
        } else if (this.textShowDelay>0) {
            this.textShowDelay--;
            boo = false;
        } else boo = true;
    }
    if (SceneManager._scene) {
        if (this.Data["showOn"+SceneManager._scene.constructor.name.toString()]) {
            boo=boo&&!!eval(this.Data["showOn"+SceneManager._scene.constructor.name.toString()]);
        } else {
            boo=boo&&defaultSceneShow
        }
    } else {
        boo=boo&&defaultSceneShow
    }
    return boo;
};
关于this.Data.textHide的判断,里面的else boo = true会不会导致,只要不符合前两个条件就显示,导致前面对脚本和开关的判断无效,从而不能做到全true的时候才能显示
 此外,貌似对于this.Data.switchScript.length>0的判断,在插件设置里写了代码,全部删除后会留下一个"",并且把他放到eval里也会返回false,长度也为1,导致即使没写代码也会误判
 也可能都是我自己的原因...总感觉关于对话框是否繁忙和脚本内容这两部分的出现条件有些奇怪
 | 
 |