xmap2
This commit is contained in:
@@ -15,10 +15,18 @@ $(document).ready(function () {
|
||||
function ADis_CollectPoliceSprechwuensche() {
|
||||
ADisDB.ADisSprechwunschPolice.where({
|
||||
done: 'false'
|
||||
}).each((Wunsch) => {
|
||||
if (!$("#mission_" + Wunsch.missionID).text().match(/Gefangene sollen abtransportiert werden/g)) {
|
||||
$("#mission_" + Wunsch.missionID).remove();
|
||||
return ADis_RemovePoliceSprechwunschFromQueue(Wunsch.missionID);
|
||||
}).then((Wunsch) => {
|
||||
if (Wunsch !== undefined) {
|
||||
return Wunsch.count(function (count) {
|
||||
if (count > 0) {
|
||||
return Wunsch.each((myWunsch) => {
|
||||
if (!$("#mission_" + myWunsch.missionID).text().match(/Gefangene sollen abtransportiert werden/g)) {
|
||||
$("#mission_" + myWunsch.missionID).remove();
|
||||
return ADis_RemovePoliceSprechwunschFromQueue(myWunsch.missionID);
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
}).then(() => {
|
||||
var MOIODOS = $('div#mission_list div.missionSideBarEntry:visible');
|
||||
|
||||
@@ -13,16 +13,25 @@ $(document).ready(function () {
|
||||
function ADis_CollectRescueSprechwuensche() {
|
||||
ADisDB.ADisSprechwunsch.where({
|
||||
done: 'false'
|
||||
}).each((Wunsch) => {
|
||||
if ($("#vehicle_list_" + Wunsch.vehicleID).find(".building_list_fms").text() != "5") {
|
||||
return ADis_RemoveRescueSprechwunschFromQueue(Wunsch.vehicleID);
|
||||
}).then((Wunsch) => {
|
||||
if (Wunsch !== undefined) {
|
||||
return Wunsch.count(function (count) {
|
||||
if (count > 0) {
|
||||
return Wunsch.each((myWunsch) => {
|
||||
if ($("#vehicle_list_" + myWunsch.vehicleID).find(".building_list_fms").text() != "5") {
|
||||
return ADis_RemoveRescueSprechwunschFromQueue(myWunsch.vehicleID);
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
}).then(() => {
|
||||
$("#building_list").find(".building_list_vehicle_element").each(function () {
|
||||
var VehicleStatus = $(this).find(".building_list_fms").text();
|
||||
var VehicleType = Number(parseInt($(this).find("a").attr("vehicle_type_id")));
|
||||
var VehicleID = $(this).attr("vehicle_id");
|
||||
if (VehicleStatus == "5" && [32,52].indexOf(VehicleType) === -1) {
|
||||
if (VehicleStatus == "5" && [32, 52].indexOf(VehicleType) === -1) {
|
||||
ADis_AddRescueSprechwunschToQueue(VehicleID);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user