change rescue + police transport

This commit is contained in:
2018-12-19 19:53:56 +01:00
parent f7ce310ea7
commit ccb451a1ed
3 changed files with 74 additions and 74 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
/*Generated on:Wed Dec 19 2018 19:34:49 GMT+0100 (CET)*/ /*Generated on:Wed Dec 19 2018 19:53:55 GMT+0100 (CET)*/
var AutomaticDispose_Branch = "master"; var AutomaticDispose_Branch = "master";
var AutomaticDispose_URL = "https://jf.git.rest/Jomaar/automatic-dispose/raw/branch/"; var AutomaticDispose_URL = "https://jf.git.rest/Jomaar/automatic-dispose/raw/branch/";
var da_lss_adis_time = new Date().getTime(); var da_lss_adis_time = new Date().getTime();
+37 -37
View File
@@ -1,4 +1,4 @@
/*Generated on:Wed Dec 19 2018 19:34:49 GMT+0100 (CET)*/ /*Generated on:Wed Dec 19 2018 19:53:55 GMT+0100 (CET)*/
/* /*
* Dexie.js - a minimalistic wrapper for IndexedDB * Dexie.js - a minimalistic wrapper for IndexedDB
* =============================================== * ===============================================
@@ -17135,11 +17135,11 @@ class AutomaticDispose {
if (window.location.pathname === "/" || window.location.pathname === "/#") { if (window.location.pathname === "/" || window.location.pathname === "/#") {
self.GetAvailableMissions() self.GetAvailableMissions()
self.IndexPage() self.IndexPage()
setInterval(self.CollectRescueSprechwuensche.bind(self), 2500); setInterval(self.CollectRescueSprechwuensche.bind(self), 3500);
setInterval(self.OpenNextRescueSprechwunsch.bind(self), 5000); setInterval(self.OpenNextRescueSprechwunsch.bind(self), 1000);
self.CollectRescueSprechwuensche(); self.CollectRescueSprechwuensche();
setInterval(self.CollectPoliceSprechwuensche.bind(self), 2500); setInterval(self.CollectPoliceSprechwuensche.bind(self), 3500);
setInterval(self.OpenNextPoliceSprechwunsch.bind(self), 5000); setInterval(self.OpenNextPoliceSprechwunsch.bind(self), 1000);
self.CollectPoliceSprechwuensche(); self.CollectPoliceSprechwuensche();
setTimeout(() => { setTimeout(() => {
@@ -18409,41 +18409,41 @@ class AutomaticDispose {
// return tellParent(`console.log('handler:1000:done:${window.name}:${self.MissionID}');window.AutomaticDisposeCall.FreeIframe('${self.MyRunner}');`); // delete Mission here as completed // return tellParent(`console.log('handler:1000:done:${window.name}:${self.MissionID}');window.AutomaticDisposeCall.FreeIframe('${self.MyRunner}');`); // delete Mission here as completed
// }) // })
// } else { // } else {
return self.ADisDB.transaction('rw', [self.ADisDB.ADisMissions], () => { return self.ADisDB.transaction('rw', [self.ADisDB.ADisMissions], () => {
self.ADSettings().then((setting) => { self.ADSettings().then((setting) => {
if (setting[self.MyRunnerSettings] === 'true') { if (setting[self.MyRunnerSettings] === 'true') {
let where = { let where = {
missionID: self.MissionID, missionID: self.MissionID,
runner: self.MyRunner, runner: self.MyRunner,
done: 'false' done: 'false'
}
// console.log(where);
return self.ADisDB.ADisMissions.where(where).and(function (item) {
return item.next_check <= Math.floor(new Date().getTime() / 1000)
}).limit(1)
}
}).then((Wunsch) => {
if (Wunsch !== undefined) {
return Wunsch.count(function (count) {
if (count > 0) {
return Wunsch.each((mywunsch) => {
console.table(mywunsch);
return self.MainHandler()
});
} else {
return self.UpdateMissionsToDone(self.MissionID).then(() => {
return tellParent(`console.log('wunsch:1000:done:${window.name}:${self.MissionID}');window.AutomaticDisposeCall.FreeIframe('${self.MyRunner}');`);
})
} }
// console.log(where); });
return self.ADisDB.ADisMissions.where(where).and(function (item) { } else {
return item.next_check <= Math.floor(new Date().getTime() / 1000) return self.RemoveMissionsFromQueue(self.MissionID).then(() => {
}).limit(1) return tellParent(`console.log('wunsch:2000:done:${window.name}:${self.MissionID}');window.AutomaticDisposeCall.FreeIframe('${self.MyRunner}');`);
} })
}).then((Wunsch) => { }
if (Wunsch !== undefined) {
return Wunsch.count(function (count) {
if (count > 0) {
return Wunsch.each((mywunsch) => {
console.table(mywunsch);
return self.MainHandler()
});
} else {
return self.UpdateMissionsToDone(self.MissionID).then(() => {
return tellParent(`console.log('wunsch:1000:done:${window.name}:${self.MissionID}');window.AutomaticDisposeCall.FreeIframe('${self.MyRunner}');`);
})
}
});
} else {
return self.RemoveMissionsFromQueue(self.MissionID).then(() => {
return tellParent(`console.log('wunsch:2000:done:${window.name}:${self.MissionID}');window.AutomaticDisposeCall.FreeIframe('${self.MyRunner}');`);
})
}
})
}) })
})
// } // }
}, 500); }, 500);
} }
+36 -36
View File
@@ -128,11 +128,11 @@ class AutomaticDispose {
if (window.location.pathname === "/" || window.location.pathname === "/#") { if (window.location.pathname === "/" || window.location.pathname === "/#") {
self.GetAvailableMissions() self.GetAvailableMissions()
self.IndexPage() self.IndexPage()
setInterval(self.CollectRescueSprechwuensche.bind(self), 2500); setInterval(self.CollectRescueSprechwuensche.bind(self), 3500);
setInterval(self.OpenNextRescueSprechwunsch.bind(self), 5000); setInterval(self.OpenNextRescueSprechwunsch.bind(self), 1000);
self.CollectRescueSprechwuensche(); self.CollectRescueSprechwuensche();
setInterval(self.CollectPoliceSprechwuensche.bind(self), 2500); setInterval(self.CollectPoliceSprechwuensche.bind(self), 3500);
setInterval(self.OpenNextPoliceSprechwunsch.bind(self), 5000); setInterval(self.OpenNextPoliceSprechwunsch.bind(self), 1000);
self.CollectPoliceSprechwuensche(); self.CollectPoliceSprechwuensche();
setTimeout(() => { setTimeout(() => {
@@ -1168,41 +1168,41 @@ class AutomaticDispose {
// return tellParent(`console.log('handler:1000:done:${window.name}:${self.MissionID}');window.AutomaticDisposeCall.FreeIframe('${self.MyRunner}');`); // delete Mission here as completed // return tellParent(`console.log('handler:1000:done:${window.name}:${self.MissionID}');window.AutomaticDisposeCall.FreeIframe('${self.MyRunner}');`); // delete Mission here as completed
// }) // })
// } else { // } else {
return self.ADisDB.transaction('rw', [self.ADisDB.ADisMissions], () => { return self.ADisDB.transaction('rw', [self.ADisDB.ADisMissions], () => {
self.ADSettings().then((setting) => { self.ADSettings().then((setting) => {
if (setting[self.MyRunnerSettings] === 'true') { if (setting[self.MyRunnerSettings] === 'true') {
let where = { let where = {
missionID: self.MissionID, missionID: self.MissionID,
runner: self.MyRunner, runner: self.MyRunner,
done: 'false' done: 'false'
}
// console.log(where);
return self.ADisDB.ADisMissions.where(where).and(function (item) {
return item.next_check <= Math.floor(new Date().getTime() / 1000)
}).limit(1)
}
}).then((Wunsch) => {
if (Wunsch !== undefined) {
return Wunsch.count(function (count) {
if (count > 0) {
return Wunsch.each((mywunsch) => {
console.table(mywunsch);
return self.MainHandler()
});
} else {
return self.UpdateMissionsToDone(self.MissionID).then(() => {
return tellParent(`console.log('wunsch:1000:done:${window.name}:${self.MissionID}');window.AutomaticDisposeCall.FreeIframe('${self.MyRunner}');`);
})
} }
// console.log(where); });
return self.ADisDB.ADisMissions.where(where).and(function (item) { } else {
return item.next_check <= Math.floor(new Date().getTime() / 1000) return self.RemoveMissionsFromQueue(self.MissionID).then(() => {
}).limit(1) return tellParent(`console.log('wunsch:2000:done:${window.name}:${self.MissionID}');window.AutomaticDisposeCall.FreeIframe('${self.MyRunner}');`);
} })
}).then((Wunsch) => { }
if (Wunsch !== undefined) {
return Wunsch.count(function (count) {
if (count > 0) {
return Wunsch.each((mywunsch) => {
console.table(mywunsch);
return self.MainHandler()
});
} else {
return self.UpdateMissionsToDone(self.MissionID).then(() => {
return tellParent(`console.log('wunsch:1000:done:${window.name}:${self.MissionID}');window.AutomaticDisposeCall.FreeIframe('${self.MyRunner}');`);
})
}
});
} else {
return self.RemoveMissionsFromQueue(self.MissionID).then(() => {
return tellParent(`console.log('wunsch:2000:done:${window.name}:${self.MissionID}');window.AutomaticDisposeCall.FreeIframe('${self.MyRunner}');`);
})
}
})
}) })
})
// } // }
}, 500); }, 500);
} }