fix loop... police cars send to verband mission
This commit is contained in:
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
/*Generated on:Tue Feb 19 2019 00:29:30 GMT+0100 (CET)*/
|
/*Generated on:Tue Feb 19 2019 00:47:18 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();
|
||||||
|
|||||||
Vendored
+12
-3
@@ -1,4 +1,4 @@
|
|||||||
/*Generated on:Tue Feb 19 2019 00:29:30 GMT+0100 (CET)*/
|
/*Generated on:Tue Feb 19 2019 00:47:18 GMT+0100 (CET)*/
|
||||||
/*
|
/*
|
||||||
* Dexie.js - a minimalistic wrapper for IndexedDB
|
* Dexie.js - a minimalistic wrapper for IndexedDB
|
||||||
* ===============================================
|
* ===============================================
|
||||||
@@ -4591,7 +4591,7 @@
|
|||||||
"last_check": Math.floor(new Date().getTime() / 1000),
|
"last_check": Math.floor(new Date().getTime() / 1000),
|
||||||
"next_check": Math.floor(new Date().getTime() / 1000) + 1
|
"next_check": Math.floor(new Date().getTime() / 1000) + 1
|
||||||
}
|
}
|
||||||
if (data.vehicle_state === 0 && (data.missing_text===null || (data.missing_text && data.missing_text.includes('Zusätzlich benötigte Fahrzeuge')))) {
|
if (data.vehicle_state === 0 && (data.missing_text === null || (data.missing_text && data.missing_text.includes('Zusätzlich benötigte Fahrzeuge')))) {
|
||||||
window.AutomaticDisposeCall.AddMissionsToQueue(missionData)
|
window.AutomaticDisposeCall.AddMissionsToQueue(missionData)
|
||||||
} else if (data.missing_text === 'Gefangene sollen abtransportiert werden.') {
|
} else if (data.missing_text === 'Gefangene sollen abtransportiert werden.') {
|
||||||
window.AutomaticDisposeCall.AddPoliceSprechwunschToQueue(String(data.id));
|
window.AutomaticDisposeCall.AddPoliceSprechwunschToQueue(String(data.id));
|
||||||
@@ -18431,7 +18431,7 @@
|
|||||||
|
|
||||||
Check_Call_Police_Active() {
|
Check_Call_Police_Active() {
|
||||||
let self = this;
|
let self = this;
|
||||||
if (($('#h2_prisoners').length > 0 || $('img.patientPrisonerIcon').length > 0) /*&& !self.includesString($('#missionH1').text(),'[verband]')*/) {
|
if (($('#h2_prisoners').length > 0 || $('img.patientPrisonerIcon').length > 0) /*&& !self.includesString($('#missionH1').text(),'[verband]')*/ ) {
|
||||||
//TODO: check if Verband or Event and
|
//TODO: check if Verband or Event and
|
||||||
// Maybe done with //__FIXX__20192
|
// Maybe done with //__FIXX__20192
|
||||||
self.Collect_Jails();
|
self.Collect_Jails();
|
||||||
@@ -18462,6 +18462,7 @@
|
|||||||
let self = this;
|
let self = this;
|
||||||
self.Jails = [];
|
self.Jails = [];
|
||||||
var CountGefangene = Number(parseInt($('#h2_prisoners').text()));
|
var CountGefangene = Number(parseInt($('#h2_prisoners').text()));
|
||||||
|
let ImThere = $('#mission_vehicle_at_mission tr > td:nth-child(5) > a:contains("Jomaar"),#mission_vehicle_driving tr > td:nth-child(7) > a:contains("Jomaar")').length;
|
||||||
var parentNode = $('#mission_vehicle_at_mission tr > td:nth-child(5) > a:contains("Jomaar")').parent().parent();
|
var parentNode = $('#mission_vehicle_at_mission tr > td:nth-child(5) > a:contains("Jomaar")').parent().parent();
|
||||||
var GefKw = parentNode.find('td:nth-child(2) > a[vehicle_type_id="52"]');
|
var GefKw = parentNode.find('td:nth-child(2) > a[vehicle_type_id="52"]');
|
||||||
var FuStW = parentNode.find('td:nth-child(2) > a[vehicle_type_id="32"]');
|
var FuStW = parentNode.find('td:nth-child(2) > a[vehicle_type_id="32"]');
|
||||||
@@ -18622,6 +18623,7 @@
|
|||||||
//__FIXX__20192
|
//__FIXX__20192
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (ImThere > 0) {
|
||||||
if ($('#vehicle_show_table_all tr[vehicle_type="GefKw"] input[type="checkbox"]').length > 0 && CountGefangene >= 5) {
|
if ($('#vehicle_show_table_all tr[vehicle_type="GefKw"] input[type="checkbox"]').length > 0 && CountGefangene >= 5) {
|
||||||
$('#vehicle_show_table_all tr[vehicle_type="GefKw"] input[type="checkbox"]').each((_, elem) => {
|
$('#vehicle_show_table_all tr[vehicle_type="GefKw"] input[type="checkbox"]').each((_, elem) => {
|
||||||
if (CountGefangene > 0) {
|
if (CountGefangene > 0) {
|
||||||
@@ -18638,9 +18640,16 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($('#vehicle_show_table_all input[type="checkbox"]:checked').length > 0) {
|
if ($('#vehicle_show_table_all input[type="checkbox"]:checked').length > 0) {
|
||||||
$('#mission_alarm_btn').click();
|
$('#mission_alarm_btn').click();
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
let MissionID = document.location.pathname.substr(document.location.pathname.lastIndexOf("/") + 1);
|
||||||
|
self.RemovePoliceSprechwunschFromQueue(MissionID).then((deleteCount) => {
|
||||||
|
tellParent(`console.log('sprechwunsch:${window.name}:${MissionID}');setTimeout(function(){ window.AutomaticDisposeCall.FreeIframe('adis-sprechwunsch-police-frame');},500);`);
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+11
-2
@@ -116,7 +116,7 @@
|
|||||||
"last_check": Math.floor(new Date().getTime() / 1000),
|
"last_check": Math.floor(new Date().getTime() / 1000),
|
||||||
"next_check": Math.floor(new Date().getTime() / 1000) + 1
|
"next_check": Math.floor(new Date().getTime() / 1000) + 1
|
||||||
}
|
}
|
||||||
if (data.vehicle_state === 0 && (data.missing_text===null || (data.missing_text && data.missing_text.includes('Zusätzlich benötigte Fahrzeuge')))) {
|
if (data.vehicle_state === 0 && (data.missing_text === null || (data.missing_text && data.missing_text.includes('Zusätzlich benötigte Fahrzeuge')))) {
|
||||||
window.AutomaticDisposeCall.AddMissionsToQueue(missionData)
|
window.AutomaticDisposeCall.AddMissionsToQueue(missionData)
|
||||||
} else if (data.missing_text === 'Gefangene sollen abtransportiert werden.') {
|
} else if (data.missing_text === 'Gefangene sollen abtransportiert werden.') {
|
||||||
window.AutomaticDisposeCall.AddPoliceSprechwunschToQueue(String(data.id));
|
window.AutomaticDisposeCall.AddPoliceSprechwunschToQueue(String(data.id));
|
||||||
@@ -632,7 +632,7 @@
|
|||||||
|
|
||||||
Check_Call_Police_Active() {
|
Check_Call_Police_Active() {
|
||||||
let self = this;
|
let self = this;
|
||||||
if (($('#h2_prisoners').length > 0 || $('img.patientPrisonerIcon').length > 0) /*&& !self.includesString($('#missionH1').text(),'[verband]')*/) {
|
if (($('#h2_prisoners').length > 0 || $('img.patientPrisonerIcon').length > 0) /*&& !self.includesString($('#missionH1').text(),'[verband]')*/ ) {
|
||||||
//TODO: check if Verband or Event and
|
//TODO: check if Verband or Event and
|
||||||
// Maybe done with //__FIXX__20192
|
// Maybe done with //__FIXX__20192
|
||||||
self.Collect_Jails();
|
self.Collect_Jails();
|
||||||
@@ -663,6 +663,7 @@
|
|||||||
let self = this;
|
let self = this;
|
||||||
self.Jails = [];
|
self.Jails = [];
|
||||||
var CountGefangene = Number(parseInt($('#h2_prisoners').text()));
|
var CountGefangene = Number(parseInt($('#h2_prisoners').text()));
|
||||||
|
let ImThere = $('#mission_vehicle_at_mission tr > td:nth-child(5) > a:contains("Jomaar"),#mission_vehicle_driving tr > td:nth-child(7) > a:contains("Jomaar")').length;
|
||||||
var parentNode = $('#mission_vehicle_at_mission tr > td:nth-child(5) > a:contains("Jomaar")').parent().parent();
|
var parentNode = $('#mission_vehicle_at_mission tr > td:nth-child(5) > a:contains("Jomaar")').parent().parent();
|
||||||
var GefKw = parentNode.find('td:nth-child(2) > a[vehicle_type_id="52"]');
|
var GefKw = parentNode.find('td:nth-child(2) > a[vehicle_type_id="52"]');
|
||||||
var FuStW = parentNode.find('td:nth-child(2) > a[vehicle_type_id="32"]');
|
var FuStW = parentNode.find('td:nth-child(2) > a[vehicle_type_id="32"]');
|
||||||
@@ -823,6 +824,7 @@
|
|||||||
//__FIXX__20192
|
//__FIXX__20192
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (ImThere > 0) {
|
||||||
if ($('#vehicle_show_table_all tr[vehicle_type="GefKw"] input[type="checkbox"]').length > 0 && CountGefangene >= 5) {
|
if ($('#vehicle_show_table_all tr[vehicle_type="GefKw"] input[type="checkbox"]').length > 0 && CountGefangene >= 5) {
|
||||||
$('#vehicle_show_table_all tr[vehicle_type="GefKw"] input[type="checkbox"]').each((_, elem) => {
|
$('#vehicle_show_table_all tr[vehicle_type="GefKw"] input[type="checkbox"]').each((_, elem) => {
|
||||||
if (CountGefangene > 0) {
|
if (CountGefangene > 0) {
|
||||||
@@ -839,9 +841,16 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($('#vehicle_show_table_all input[type="checkbox"]:checked').length > 0) {
|
if ($('#vehicle_show_table_all input[type="checkbox"]:checked').length > 0) {
|
||||||
$('#mission_alarm_btn').click();
|
$('#mission_alarm_btn').click();
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
let MissionID = document.location.pathname.substr(document.location.pathname.lastIndexOf("/") + 1);
|
||||||
|
self.RemovePoliceSprechwunschFromQueue(MissionID).then((deleteCount) => {
|
||||||
|
tellParent(`console.log('sprechwunsch:${window.name}:${MissionID}');setTimeout(function(){ window.AutomaticDisposeCall.FreeIframe('adis-sprechwunsch-police-frame');},500);`);
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user