This repository has been archived by the owner on Jun 20, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: treat carrierJump the same as location event
This should fix a bug where we were sending the wrong star pos to EDDN
- Loading branch information
1 parent
f40339d
commit fe6da7b
Showing
8 changed files
with
1,346 additions
and
1,316 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,61 @@ | ||
import { Component, Input, OnDestroy, OnInit } from '@angular/core'; | ||
import { JournalService } from '../../journal/journal.service'; | ||
import { DBService } from '../../core/services/db.service'; | ||
import { JournalEvents, JournalEvent, MissionCompleted, MissionAccepted, MissionAbandoned, MissionFailed, LoadGame, NewCommander } from 'cmdr-journal/dist'; | ||
import { Subscription, Observable } from 'rxjs'; | ||
import { OriginatedMission } from './originatedMission'; | ||
import { MissionService } from './mission.service'; | ||
import { takeWhile } from 'rxjs/operators'; | ||
import { TrackingFaction } from '../tracking-faction.service'; | ||
import { Component, Input, OnDestroy, OnInit } from "@angular/core"; | ||
import { JournalService } from "../../journal/journal.service"; | ||
import { DBService } from "../../core/services/db.service"; | ||
import { | ||
JournalEvents, | ||
JournalEvent, | ||
MissionCompleted, | ||
MissionAccepted, | ||
MissionAbandoned, | ||
MissionFailed, | ||
LoadGame, | ||
NewCommander, | ||
} from "cmdr-journal"; | ||
import { Subscription, Observable } from "rxjs"; | ||
import { OriginatedMission } from "./originatedMission"; | ||
import { MissionService } from "./mission.service"; | ||
import { takeWhile } from "rxjs/operators"; | ||
import { TrackingFaction } from "../tracking-faction.service"; | ||
|
||
@Component({ | ||
templateUrl: 'missions.component.html', | ||
styleUrls: ['missions.component.scss'], | ||
selector: 'app-missions' | ||
templateUrl: "missions.component.html", | ||
styleUrls: ["missions.component.scss"], | ||
selector: "app-missions", | ||
}) | ||
export class MissionsComponent implements OnInit, OnDestroy { | ||
|
||
missionsCompleted: OriginatedMission[]; | ||
factionMissionsCompleted: OriginatedMission[]; | ||
trackedFaction: string; | ||
|
||
private alive = true; | ||
|
||
constructor( | ||
private journalService: JournalService, | ||
private journalDB: DBService, | ||
private missionService: MissionService, | ||
private trackingFaction: TrackingFaction | ||
) { } | ||
|
||
ngOnInit() { | ||
this.missionService.factionMissionsCompleted | ||
.pipe(takeWhile(() => this.alive)) | ||
.subscribe(factionMissionsCompleted => this.factionMissionsCompleted = factionMissionsCompleted); | ||
|
||
this.missionService.missionsCompleted | ||
.pipe(takeWhile(() => this.alive)) | ||
.subscribe(missionsCompleted => this.missionsCompleted = missionsCompleted); | ||
|
||
this.trackingFaction.faction | ||
.pipe(takeWhile(() => this.alive)) | ||
.subscribe(trackedFaction => this.trackedFaction = trackedFaction); | ||
|
||
} | ||
|
||
ngOnDestroy() { | ||
this.alive = false; | ||
} | ||
} | ||
missionsCompleted: OriginatedMission[]; | ||
factionMissionsCompleted: OriginatedMission[]; | ||
trackedFaction: string; | ||
|
||
private alive = true; | ||
|
||
constructor( | ||
private journalService: JournalService, | ||
private journalDB: DBService, | ||
private missionService: MissionService, | ||
private trackingFaction: TrackingFaction | ||
) {} | ||
|
||
ngOnInit() { | ||
this.missionService.factionMissionsCompleted | ||
.pipe(takeWhile(() => this.alive)) | ||
.subscribe( | ||
(factionMissionsCompleted) => | ||
(this.factionMissionsCompleted = factionMissionsCompleted) | ||
); | ||
|
||
this.missionService.missionsCompleted | ||
.pipe(takeWhile(() => this.alive)) | ||
.subscribe( | ||
(missionsCompleted) => (this.missionsCompleted = missionsCompleted) | ||
); | ||
|
||
this.trackingFaction.faction | ||
.pipe(takeWhile(() => this.alive)) | ||
.subscribe((trackedFaction) => (this.trackedFaction = trackedFaction)); | ||
} | ||
|
||
ngOnDestroy() { | ||
this.alive = false; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.