diff --git a/dist/autoloader.js b/dist/autoloader.js index 9c2b53a..96ac596 100755 --- a/dist/autoloader.js +++ b/dist/autoloader.js @@ -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)*/ var AutomaticDispose_Branch = "master"; var AutomaticDispose_URL = "https://jf.git.rest/Jomaar/automatic-dispose/raw/branch/"; var da_lss_adis_time = new Date().getTime(); diff --git a/dist/autoloaderV2.js b/dist/autoloaderV2.js index cddf513..f6f7796 100644 --- a/dist/autoloaderV2.js +++ b/dist/autoloaderV2.js @@ -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 diff --git a/src/autoloaderV2.js b/src/autoloaderV2.js index 69cf798..963013d 100644 --- a/src/autoloaderV2.js +++ b/src/autoloaderV2.js @@ -4,11 +4,12 @@ class AutomaticDispose { // Variablen get ADisSettings() { + let self =this return { url: "https://jf.git.rest/Jomaar/automatic-dispose/raw/branch/", branch: "master", all_missions: /***ADis_AllMissions***/ 0, - 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'], @@ -31,20 +32,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 @@ -89,7 +90,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' @@ -111,10 +112,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, @@ -196,7 +197,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(); @@ -207,7 +208,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(); @@ -251,8 +252,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' @@ -396,7 +397,7 @@ class AutomaticDispose { }); self.Hospitals.reverse(); - this.Send_Vehicle_To_Hospital() + self.Send_Vehicle_To_Hospital() } // Krankenhaus einlieferung