Let scripts access Java classes
Fix script attempting to schedule with non-long (double) time value
This commit is contained in:
@@ -60,7 +60,9 @@ function takeoff() {
|
||||
|
||||
em.setProperty("docked","false");
|
||||
|
||||
if(Math.random() < 0.42) em.schedule("approach", (invasionStartTime + (Math.random() * invasionDelayTime)));
|
||||
if (Math.random() < 0.42) {
|
||||
em.schedule("approach", (invasionStartTime + Math.trunc((Math.random() * invasionDelayTime))));
|
||||
}
|
||||
em.schedule("arrived", rideTime);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user