mirror of
https://github.com/brendan-ch/project-inter-server.git
synced 2026-04-17 07:50:31 +00:00
Pass down the new arguments into the shuttle repositories
This commit is contained in:
@@ -20,6 +20,14 @@ import {
|
||||
export class UnoptimizedInMemoryShuttleRepository
|
||||
extends EventEmitter
|
||||
implements ShuttleGetterSetterRepository {
|
||||
|
||||
constructor(
|
||||
readonly shuttleStopArrivalDegreeDelta: number = 0.001,
|
||||
readonly shuttleStopNearbyDegreeDelta: number = 0.003,
|
||||
) {
|
||||
super()
|
||||
}
|
||||
|
||||
public override on<T extends ShuttleRepositoryEventName>(
|
||||
event: T,
|
||||
listener: ShuttleRepositoryEventListener<T>,
|
||||
@@ -252,8 +260,8 @@ export class UnoptimizedInMemoryShuttleRepository
|
||||
|
||||
public async getArrivedStopIfExists(
|
||||
shuttle: IShuttle,
|
||||
delta = 0.001,
|
||||
): Promise<IStop | undefined> {
|
||||
const delta = this.shuttleStopArrivalDegreeDelta;
|
||||
const orderedStops = await this.getOrderedStopsByRouteId(shuttle.routeId);
|
||||
|
||||
for (const orderedStop of orderedStops) {
|
||||
|
||||
Reference in New Issue
Block a user