v2 update planned events
This commit is contained in:
@@ -639,7 +639,7 @@ class AutomaticDispose {
|
||||
}
|
||||
});
|
||||
|
||||
if ($('#vehicle_show_table_all tr[vehicle_type="GefKw"] input[type="checkbox"]').size() > 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) => {
|
||||
if (CountGefangene > 0) {
|
||||
$(elem).click()
|
||||
@@ -647,7 +647,7 @@ class AutomaticDispose {
|
||||
}
|
||||
});
|
||||
}
|
||||
if ($('#vehicle_show_table_all tr[vehicle_type="FuStW"] input[type="checkbox"]').size() > 0 && CountGefangene > 0) {
|
||||
if ($('#vehicle_show_table_all tr[vehicle_type="FuStW"] input[type="checkbox"]').length > 0 && CountGefangene > 0) {
|
||||
$('#vehicle_show_table_all tr[vehicle_type="FuStW"] input[type="checkbox"]').each((_, elem) => {
|
||||
if (CountGefangene > 0) {
|
||||
$(elem).click()
|
||||
@@ -655,7 +655,7 @@ class AutomaticDispose {
|
||||
}
|
||||
});
|
||||
}
|
||||
if ($('#vehicle_show_table_all input[type="checkbox"]:checked').size() > 0) {
|
||||
if ($('#vehicle_show_table_all input[type="checkbox"]:checked').length > 0) {
|
||||
$('#mission_alarm_btn').click();
|
||||
}
|
||||
}
|
||||
@@ -1191,7 +1191,7 @@ class AutomaticDispose {
|
||||
return self.RemoveMissionsFromQueue(self.MissionID).then(() => {
|
||||
return tellParent(`console.log('handler:1000:done:${window.name}:${self.MissionID}');window.AutomaticDisposeCall.FreeIframe('${self.MyRunner}');`); // delete Mission here as completed
|
||||
})
|
||||
} else if (self.includesString($('#iframe-inside-container > div.alert.fade.in.alert-success').text(), "wurde erfolgreich informiert") /*|| $('#vehicle_show_table_all input[type="checkbox"]:checked').size() > 0*/ ) {
|
||||
} else if (self.includesString($('#iframe-inside-container > div.alert.fade.in.alert-success').text(), "wurde erfolgreich informiert") /*|| $('#vehicle_show_table_all input[type="checkbox"]:checked').length > 0*/ ) {
|
||||
console.log("SEND");
|
||||
console.log("SEND: " + self.MissionID);
|
||||
return self.UpdateMissionsToDone(self.MissionID).then(() => {
|
||||
@@ -1221,45 +1221,45 @@ class AutomaticDispose {
|
||||
var title = document.getElementById('missionH1');
|
||||
var isVerband = title.innerText.toLowerCase().includes("[verband]");
|
||||
if (setting['Alliance-Automatic'] == 'true' && isVerband) {
|
||||
if ([52, 55, 129, 203].indexOf(self.MissionType) !== -1 && $('#vehicle_show_table_all tr[vehicle_type="FuStW"] input[type="checkbox"]').size() > 0) {
|
||||
if ([52, 55, 129, 203].indexOf(self.MissionType) !== -1 && $('#vehicle_show_table_all tr[vehicle_type="FuStW"] input[type="checkbox"]').length > 0) {
|
||||
$('#vehicle_show_table_all tr[vehicle_type="FuStW"] input[type="checkbox"]')[0].click();
|
||||
} else if ([53, 130, 202].indexOf(self.MissionType) !== -1) {
|
||||
if ($('#vehicle_show_table_all tr[vehicle_type="FLF"] input[type="checkbox"]').size() > 0) {
|
||||
if ($('#vehicle_show_table_all tr[vehicle_type="FLF"] input[type="checkbox"]').length > 0) {
|
||||
$('#vehicle_show_table_all tr[vehicle_type="FLF"] input[type="checkbox"]')[0].click();
|
||||
} else if ($('#vehicle_show_table_all tr[vehicle_type="GW-A"] input[type="checkbox"]').size() > 0) {
|
||||
} else if ($('#vehicle_show_table_all tr[vehicle_type="GW-A"] input[type="checkbox"]').length > 0) {
|
||||
$('#vehicle_show_table_all tr[vehicle_type="GW-A"] input[type="checkbox"]')[0].click();
|
||||
} else if ($('#vehicle_show_table_all tr[vehicle_type="GW-Öl"] input[type="checkbox"]').size() > 0) {
|
||||
} else if ($('#vehicle_show_table_all tr[vehicle_type="GW-Öl"] input[type="checkbox"]').length > 0) {
|
||||
$('#vehicle_show_table_all tr[vehicle_type="GW-Öl"] input[type="checkbox"]')[0].click();
|
||||
} else if ($('#vehicle_show_table_all tr[vehicle_type="NEF"] input[type="checkbox"]').size() > 0) {
|
||||
} else if ($('#vehicle_show_table_all tr[vehicle_type="NEF"] input[type="checkbox"]').length > 0) {
|
||||
$('#vehicle_show_table_all tr[vehicle_type="NEF"] input[type="checkbox"]')[0].click();
|
||||
}
|
||||
} else if ([54, 56].indexOf(self.MissionType) !== -1) {
|
||||
if ($('#vehicle_show_table_all tr[vehicle_type="FLF"] input[type="checkbox"]').size() > 0) {
|
||||
if ($('#vehicle_show_table_all tr[vehicle_type="FLF"] input[type="checkbox"]').length > 0) {
|
||||
$('#vehicle_show_table_all tr[vehicle_type="FLF"] input[type="checkbox"]')[0].click();
|
||||
} else if ($('#vehicle_show_table_all tr[vehicle_type="FuStW"] input[type="checkbox"]').size() > 0) {
|
||||
} else if ($('#vehicle_show_table_all tr[vehicle_type="FuStW"] input[type="checkbox"]').length > 0) {
|
||||
$('#vehicle_show_table_all tr[vehicle_type="FuStW"] input[type="checkbox"]')[0].click();
|
||||
} else if ($('#vehicle_show_table_all tr[vehicle_type="GW-A"] input[type="checkbox"]').size() > 0) {
|
||||
} else if ($('#vehicle_show_table_all tr[vehicle_type="GW-A"] input[type="checkbox"]').length > 0) {
|
||||
$('#vehicle_show_table_all tr[vehicle_type="GW-A"] input[type="checkbox"]')[0].click();
|
||||
} else if ($('#vehicle_show_table_all tr[vehicle_type="GW-Öl"] input[type="checkbox"]').size() > 0) {
|
||||
} else if ($('#vehicle_show_table_all tr[vehicle_type="GW-Öl"] input[type="checkbox"]').length > 0) {
|
||||
$('#vehicle_show_table_all tr[vehicle_type="GW-Öl"] input[type="checkbox"]')[0].click();
|
||||
} else if ($('#vehicle_show_table_all tr[vehicle_type="LF 20"] input[type="checkbox"]').size() > 0) {
|
||||
} else if ($('#vehicle_show_table_all tr[vehicle_type="LF 20"] input[type="checkbox"]').length > 0) {
|
||||
$('#vehicle_show_table_all tr[vehicle_type="LF 20"] input[type="checkbox"]')[0].click();
|
||||
} else if ($('#vehicle_show_table_all tr[vehicle_type="LF 20/16"] input[type="checkbox"]').size() > 0) {
|
||||
} else if ($('#vehicle_show_table_all tr[vehicle_type="LF 20/16"] input[type="checkbox"]').length > 0) {
|
||||
$('#vehicle_show_table_all tr[vehicle_type="LF 20/16"] input[type="checkbox"]')[0].click();
|
||||
} else if ($('#vehicle_show_table_all tr[vehicle_type="HLF 20"] input[type="checkbox"]').size() > 0) {
|
||||
} else if ($('#vehicle_show_table_all tr[vehicle_type="HLF 20"] input[type="checkbox"]').length > 0) {
|
||||
$('#vehicle_show_table_all tr[vehicle_type="HLF 20"] input[type="checkbox"]')[0].click();
|
||||
} else if ($('#vehicle_show_table_all tr[vehicle_type="TLF 8/8"] input[type="checkbox"]').size() > 0) {
|
||||
} else if ($('#vehicle_show_table_all tr[vehicle_type="TLF 8/8"] input[type="checkbox"]').length > 0) {
|
||||
$('#vehicle_show_table_all tr[vehicle_type="TLF 8/8"] input[type="checkbox"]')[0].click();
|
||||
}
|
||||
} else {
|
||||
if ($('#vehicle_show_table_all tr[vehicle_type="FuStW"] input[type="checkbox"]').size() > 0) {
|
||||
if ($('#vehicle_show_table_all tr[vehicle_type="FuStW"] input[type="checkbox"]').length > 0) {
|
||||
$('#vehicle_show_table_all tr[vehicle_type="FuStW"] input[type="checkbox"]')[0].click();
|
||||
} else if ($('#vehicle_show_table_all tr[vehicle_type="KTW Typ B"] input[type="checkbox"]').size() > 0) {
|
||||
} else if ($('#vehicle_show_table_all tr[vehicle_type="KTW Typ B"] input[type="checkbox"]').length > 0) {
|
||||
$('#vehicle_show_table_all tr[vehicle_type="KTW Typ B"] input[type="checkbox"]')[0].click();
|
||||
}
|
||||
}
|
||||
// Todo add alternative cars, please no LF because of Mülltonne....
|
||||
if ($('#vehicle_show_table_all input[type="checkbox"]:checked').size() > 0) {
|
||||
if ($('#vehicle_show_table_all input[type="checkbox"]:checked').length > 0) {
|
||||
$('#mission_alarm_btn').click();
|
||||
}
|
||||
}
|
||||
@@ -1302,7 +1302,7 @@ class AutomaticDispose {
|
||||
if (self.MyRunner == 'os') {
|
||||
self.OweSecure = true;
|
||||
}
|
||||
self.GetMissionConfiguration(self.MyRunner == 'kt' ? 147 : Mission.type);
|
||||
self.GetMissionConfiguration(Mission.type);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -1341,31 +1341,49 @@ class AutomaticDispose {
|
||||
}).then(async () => {
|
||||
return await self.CollectInvolvedVehicles();
|
||||
}).then(async () => {
|
||||
if (self.MyRunner == 'os' && self.Vehicles.length > 0){
|
||||
return
|
||||
}
|
||||
return await self.CollectPatients();
|
||||
})
|
||||
.then(async () => {
|
||||
if (self.MyRunner == 'os' && self.Vehicles.length > 0){
|
||||
return
|
||||
}
|
||||
return await self.ProcessEmergencyMedicalService()
|
||||
})
|
||||
.then(async () => {
|
||||
if (self.MyRunner == 'os' && self.Vehicles.length > 0){
|
||||
return
|
||||
}
|
||||
return await self.ProcessFireDepartment()
|
||||
})
|
||||
.then(async () => {
|
||||
if (self.MyRunner == 'os' && self.Vehicles.length > 0){
|
||||
return
|
||||
}
|
||||
return await self.ProcessPoliceDepartment()
|
||||
})
|
||||
.then(async () => {
|
||||
if (self.MyRunner == 'os' && self.Vehicles.length > 0){
|
||||
return
|
||||
}
|
||||
return await self.ProcessTechnicalEmergencyService()
|
||||
})
|
||||
.then(async () => {
|
||||
if (self.MyRunner == 'os' && self.Vehicles.length > 0){
|
||||
return
|
||||
}
|
||||
return await self.ProcessWaterRescue()
|
||||
}).then(() => {
|
||||
|
||||
if (self.OweSecure) {
|
||||
if ($('#vehicle_show_table_all tr[vehicle_type="FuStW"] input[type="checkbox"]:not(:checked)').size() > 0) {
|
||||
if (self.OweSecure && $('#vehicle_show_table_all tr[vehicle_type="FuStW"] input[type="checkbox"]:checked').length == 0) {
|
||||
if ($('#vehicle_show_table_all tr[vehicle_type="FuStW"] input[type="checkbox"]:not(:checked)').length > 0) {
|
||||
$('#vehicle_show_table_all tr[vehicle_type="FuStW"] input[type="checkbox"]:not(:checked)')[0].click();
|
||||
}
|
||||
}
|
||||
|
||||
// console.log("Clicked Vehicles: ", $('#vehicle_show_table_all input[type="checkbox"]:checked').size(), $('#vehicle_show_table_all input[type="checkbox"]:checked'));
|
||||
// console.log("Clicked Vehicles: ", $('#vehicle_show_table_all input[type="checkbox"]:checked').length, $('#vehicle_show_table_all input[type="checkbox"]:checked'));
|
||||
// console.log("WILL KLICK SEND")
|
||||
setTimeout(() => {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user