2017-09-24 22:23:22 +00:00
|
|
|
module TK.SpaceTac {
|
2017-06-27 15:42:28 +00:00
|
|
|
/**
|
|
|
|
* An abstract part of a mission, describing the goal
|
|
|
|
*/
|
|
|
|
export class MissionPart {
|
2017-06-29 17:25:38 +00:00
|
|
|
// Link to mission
|
|
|
|
mission: Mission
|
|
|
|
|
2017-06-27 15:42:28 +00:00
|
|
|
// Very short description
|
|
|
|
title: string
|
|
|
|
|
2017-06-29 17:25:38 +00:00
|
|
|
constructor(mission: Mission, title: string) {
|
|
|
|
this.mission = mission;
|
2017-06-27 15:42:28 +00:00
|
|
|
this.title = title;
|
|
|
|
}
|
|
|
|
|
2017-06-29 17:25:38 +00:00
|
|
|
get universe(): Universe {
|
|
|
|
return this.mission.universe;
|
|
|
|
}
|
|
|
|
get fleet(): Fleet {
|
|
|
|
return this.mission.fleet;
|
|
|
|
}
|
|
|
|
|
2017-06-27 15:42:28 +00:00
|
|
|
/**
|
|
|
|
* Abstract checking if the part is completed
|
|
|
|
*/
|
2017-06-29 17:25:38 +00:00
|
|
|
checkCompleted(): boolean {
|
2017-06-27 15:42:28 +00:00
|
|
|
return false;
|
|
|
|
}
|
2017-06-29 17:25:38 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Force the part as completed
|
|
|
|
*
|
|
|
|
* This is a cheat, and should enforce the part conditions
|
|
|
|
*/
|
|
|
|
forceComplete(): void {
|
|
|
|
}
|
2017-07-02 18:21:04 +00:00
|
|
|
|
2017-07-11 22:28:45 +00:00
|
|
|
/**
|
|
|
|
* Get a location hint about this part
|
|
|
|
*/
|
|
|
|
getLocationHint(): Star | StarLocation | null {
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
2017-07-02 18:21:04 +00:00
|
|
|
/**
|
|
|
|
* Event called when the part starts
|
|
|
|
*/
|
|
|
|
onStarted(): void {
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Event called when the part ends
|
|
|
|
*/
|
|
|
|
onEnded(): void {
|
|
|
|
}
|
2017-06-27 15:42:28 +00:00
|
|
|
}
|
|
|
|
}
|