v2 transact

This commit is contained in:
2018-12-19 17:28:31 +01:00
parent efd95eacab
commit e48b0a7bdd
3 changed files with 40 additions and 38 deletions

39
dist/autoloaderV2.js vendored
View File

@@ -1,4 +1,4 @@
/*Generated on:Wed Dec 19 2018 17:27:29 GMT+0100 (CET)*/
/*Generated on:Wed Dec 19 2018 17:28:31 GMT+0100 (CET)*/
/*
* Dexie.js - a minimalistic wrapper for IndexedDB
* ===============================================
@@ -4479,6 +4479,7 @@ class AutomaticDispose {
// Variablen
get ADisSettings() {
let self =this
return {
url: "https://jf.git.rest/Jomaar/automatic-dispose/raw/branch/",
branch: "master",
@@ -17015,7 +17016,7 @@ class AutomaticDispose {
}
}
}`),
name: this.name,
name: self.name,
runner: ['kt', 'om', 'os', 'vm', 've'],
runner_divs: ['mission_list_krankentransporte', 'mission_list', /*'mission_list_sicherheitswache',*/ 'mission_list_alliance', 'mission_list_alliance_event'],
runner_settings: ['Krankentransport-Automatic', 'MissionsOwn-Automatic', /*'MissionsOwn-Automatic',*/ 'Alliance-Automatic', 'AllianceEvent-Automatic'],
@@ -17038,20 +17039,20 @@ class AutomaticDispose {
self.Vehicles = {}
self.Patients = {}
this.ADis_MyHead = document.getElementsByTagName('head')[0];
this.ADis_MyBody = document.getElementsByTagName('body')[0];
self.ADis_MyHead = document.getElementsByTagName('head')[0];
self.ADis_MyBody = document.getElementsByTagName('body')[0];
// -
// - Sprechwunsch Variablen
// -
this.Jails = [];
this.JailRegEx = /\(Freie Zellen\:\s+(\d)\,\s+Entfernung\:\s+(\d+\,\d+)\s+km(?:\,\s+Abgabe an Besitzer\:\s+(\d+)%)?\)/g;
this.Hospitals = [];
this.RescueVehicleFrameWatchDog = null;
this.PoliceVehicleFrameWatchDog = null;
self.Jails = [];
self.JailRegEx = /\(Freie Zellen\:\s+(\d)\,\s+Entfernung\:\s+(\d+\,\d+)\s+km(?:\,\s+Abgabe an Besitzer\:\s+(\d+)%)?\)/g;
self.Hospitals = [];
self.RescueVehicleFrameWatchDog = null;
self.PoliceVehicleFrameWatchDog = null;
this.ADisDB = new Dexie('LSS_AutomaticDispo');
this.ADisDB.version(1).stores({
self.ADisDB = new Dexie('LSS_AutomaticDispo');
self.ADisDB.version(1).stores({
/**
* AvailabelMissions
* - missionID
@@ -17096,7 +17097,7 @@ class AutomaticDispose {
*/
ADisMissions: "++missionID,runner,available,done,[missionID+available+done],[missionID+runner],[missionID+runner+done],[runner+available+done]"
});
this.ADisDB.on("populate", () => {
self.ADisDB.on("populate", () => {
self.ADisDB.ADisSettings.add({
name: "Krankentransport-Automatic",
value: 'true'
@@ -17118,10 +17119,10 @@ class AutomaticDispose {
value: 'false'
});
});
this.ADisDB.open().catch((err) => {
self.ADisDB.open().catch((err) => {
console.error(err.stack || err);
});
this.ADisDB.on("ready", async () => {
self.ADisDB.on("ready", async () => {
self.adis_settings = {
'Krankentransport-Automatic': false,
'Sprechwunsch-Automatic': false,
@@ -17203,7 +17204,7 @@ class AutomaticDispose {
RemovePoliceSprechwunschFromQueue(WunschID) {
let self = this;
return self.ADisDB.transaction('rw', [self.ADisDB.ADisSprechwunschPolice], async () => {
return await this.ADisDB.ADisSprechwunschPolice.where({
return await self.ADisDB.ADisSprechwunschPolice.where({
missionID: WunschID
}).delete();
@@ -17214,7 +17215,7 @@ class AutomaticDispose {
RemoveRescueSprechwunschFromQueue(WunschID) {
let self = this;
return self.ADisDB.transaction('rw', [self.ADisDB.ADisSprechwunsch], async () => {
return await this.ADisDB.ADisSprechwunsch.where({
return await self.ADisDB.ADisSprechwunsch.where({
vehicleID: WunschID
}).delete();
@@ -17258,8 +17259,8 @@ class AutomaticDispose {
OpenNextRescueSprechwunsch() {
let self = this;
return await self.ADisDB.transaction('rw', [self.ADisDB.ADisSprechwunsch], async () => {
return await this.ADSettings().then((setting) => {
return self.ADisDB.transaction('rw', [self.ADisDB.ADisSprechwunsch], async () => {
return await self.ADSettings().then((setting) => {
if (setting['Sprechwunsch-Automatic'] == 'true') {
return self.ADisDB.ADisSprechwunsch.where({
done: 'false'
@@ -17403,7 +17404,7 @@ class AutomaticDispose {
});
self.Hospitals.reverse();
this.Send_Vehicle_To_Hospital()
self.Send_Vehicle_To_Hospital()
}
// Krankenhaus einlieferung