Add Random Time 2-20 sec to start new Mission
This commit is contained in:
@@ -114,6 +114,7 @@ class AutomaticDisposeFaye {
|
||||
"captionOld": ""
|
||||
}
|
||||
*/
|
||||
let random = Math.floor((Math.random() * 20) + 2);
|
||||
let missionData = {
|
||||
"missionID": String(data.id),
|
||||
"type": String(data.mtid),
|
||||
@@ -123,8 +124,8 @@ class AutomaticDisposeFaye {
|
||||
"village": data.address.split(',')[1],
|
||||
"available": 'true',
|
||||
"done": 'false',
|
||||
"last_check": Math.floor(new Date().getTime() / 1000),
|
||||
"next_check": Math.floor(new Date().getTime() / 1000) + 1
|
||||
"last_check": Math.floor(new Date().getTime() / 1000) + random,
|
||||
"next_check": Math.floor(new Date().getTime() / 1000) + random + 1
|
||||
}
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user