mirror of
https://github.com/ProjectSWGCore/Holocore.git
synced 2026-10-05 20:13:20 -04:00
The shuttle behaviour ExecutorService is now instantiated in initialize() instead of in TravelService's constructor
This commit is contained in:
@@ -92,7 +92,7 @@ public final class TravelService extends Service {
|
||||
|
||||
// Fields relating to shuttle take-off and landing
|
||||
private Posture currentShuttlePosture;
|
||||
private final ExecutorService executor;
|
||||
private ExecutorService executor;
|
||||
private final int timeUntilLand;
|
||||
private int timeRemaining;
|
||||
private final long landDelay;
|
||||
@@ -112,7 +112,6 @@ public final class TravelService extends Service {
|
||||
travelFeeTable = (DatatableData) ClientFactory.getInfoFromFile("datatables/travel/travel.iff");
|
||||
pointsOnPlanet = new HashMap<>();
|
||||
|
||||
executor = Executors.newSingleThreadExecutor();
|
||||
timeUntilLand = getConfig(ConfigFile.FEATURES).getInt("SHUTTLE-AWAY-TIME", 60);
|
||||
timeRemaining = timeUntilLand;
|
||||
shuttleLanded = true; // Shuttles start off being grounded
|
||||
@@ -131,6 +130,13 @@ public final class TravelService extends Service {
|
||||
registerForIntent(ObjectCreatedIntent.TYPE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean initialize() {
|
||||
executor = Executors.newSingleThreadExecutor();
|
||||
|
||||
return super.initialize();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean start() {
|
||||
executor.execute(new ShuttleBehaviour());
|
||||
|
||||
Reference in New Issue
Block a user