Fix Need Feuerwehrleute new.

This commit is contained in:
2019-02-05 21:31:12 +01:00
parent 73eabf8dcd
commit d3a1f61d38
5 changed files with 44 additions and 5 deletions

View File

@@ -1879,10 +1879,10 @@ class AutomaticDispose {
var dangerText = $('#iframe-inside-container > div.alert.alert-danger').text();
// TODO: need to check if already LF driving...
if (self.includesString(dangerText, "Wir benötigen min.") && self.includesString(dangerText, "Feuerwehrleute.")) {
if (self.includesString(dangerText, "Wir benötigen noch min.") && self.includesString(dangerText, "Feuerwehrleute.")) {
const weNeed = self._ADisVehiclesNeed["0"];
const regex = /(\d+) Feuerwehrleute/gm;
const newNeed = Math.ceil(Number(parseInt(dangerText.match(regex))) / 6) - weNeed;
const newNeed = Math.ceil(Number(parseInt(dangerText.match(regex))) / 6) + weNeed;
self._ADisVehiclesNeed["0"] = newNeed;
}