适配新版本
This commit is contained in:
1 parent
2cb5ec83e9
commit
fc159016c8
1 file changed
+19
-15
+19
-15
@@ -469,7 +469,7 @@ game.import("extension", function (lib, game, ui, get, ai, _status) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
miao_nodelay = function(){
|
var miao_nodelay = function(){
|
||||||
lib.configMenu.general.config.game_speed = {
|
lib.configMenu.general.config.game_speed = {
|
||||||
name: "游戏速度",
|
name: "游戏速度",
|
||||||
init: "nodelay",
|
init: "nodelay",
|
||||||
@@ -486,20 +486,24 @@ game.import("extension", function (lib, game, ui, get, ai, _status) {
|
|||||||
};
|
};
|
||||||
//覆写十周年ui与被十周年ui覆写的delay,等1s加载完以后覆写
|
//覆写十周年ui与被十周年ui覆写的delay,等1s加载完以后覆写
|
||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
if(decadeUI){
|
try{
|
||||||
decadeUI.delay = num =>{}
|
if(decadeUI){
|
||||||
dui.delay = num =>{}
|
decadeUI.delay = num =>{}
|
||||||
game.delay = function (time, time2) {
|
dui.delay = num =>{}
|
||||||
if (_status.paused) return;
|
game.delay = function (time, time2) {
|
||||||
game.pause();
|
if (_status.paused) return;
|
||||||
if (typeof time != "number") time = 1;
|
game.pause();
|
||||||
if (typeof time2 != "number") time2 = 0;
|
if (typeof time != "number") time = 1;
|
||||||
time = time * lib.config.duration + time2;
|
if (typeof time2 != "number") time2 = 0;
|
||||||
if (lib.config.game_speed == "vvfast") time /= 3;
|
time = time * lib.config.duration + time2;
|
||||||
if (lib.config.game_speed == "nodelay"){ time = 1}
|
if (lib.config.game_speed == "vvfast") time /= 3;
|
||||||
_status.timeout = setTimeout(game.resume, time);
|
if (lib.config.game_speed == "nodelay"){ time = 1}
|
||||||
}
|
_status.timeout = setTimeout(game.resume, time);
|
||||||
};
|
}
|
||||||
|
};
|
||||||
|
}catch(e){
|
||||||
|
console.log(e)
|
||||||
|
}
|
||||||
},1000)
|
},1000)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user