C# Class MissionController.Manager

Manages the missions and the current space program (budget and so on)
Inheritance: IManager
Afficher le fichier Open project: pweingardt/KSPMissionController

Private Properties

Свойство Type Description

Méthodes publiques

Méthode Description
Manager ( ) : System
costs ( int value ) : int
discardRandomMission ( Mission m ) : void

Discards the given random mission. Removed it from the random missions list

finishMission ( Mission m, Vessel vessel, GameEvent events ) : void

Finishes the given mission with the given vessel. Rewards the space program with the missions reward.

finishMissionGoal ( MissionGoal goal, Vessel vessel, GameEvent events ) : void

Finishes the given mission goal with the given vessel. Rewards the space program with the reward from mission goal.

getActivePassiveMissions ( ) : List

Gets all passive missions that are currently active. Removes old passive missions

getBudget ( ) : int
getClientControlledMission ( Vessel vessel ) : MissionStatus

Gets the client controlled mission that has been finished with the given vessel

getClientControlledMissions ( ) : List

Gets all client controlled missions

getPassiveMission ( Vessel vessel ) : MissionStatus

Gets the passive mission for the given vessel.

isClientControlled ( Vessel vessel ) : bool

Checks if the given vessel is controlled by a client.

isMissionAlreadyFinished ( Mission m, Vessel v ) : bool

Returns true, if the given mission has been finished with the given vessel.

isMissionAlreadyFinished ( String name ) : bool

If true, the given mission name has been finished. False otherwise.

isMissionGoalAlreadyFinished ( MissionGoal c, Vessel v ) : bool

Returns true, if the given mission goal has been finish in another game with the given vessel, false otherwise

isOnPassiveMission ( Vessel vessel ) : bool

Checks if the given vessel in on a passive mission

loadMissionPackage ( String path ) : MissionPackage

Loads the given mission package

loadProgram ( String title ) : void
recycleVessel ( Vessel vessel, int costs ) : void

Recycles the vessel with the given costs. It is added to the recycled vessels list.

reloadMission ( Mission m, Vessel vessel ) : Mission

Reloads the given mission for the given vessel. Checks for already finished mission goals and reexecutes the instructions.

removeMission ( MissionStatus s ) : void

Removes an mission status

resetSpaceProgram ( ) : void

Reset the current space program.

reward ( int value ) : int
rewind ( ) : void

Rewinds the latest expenses.

saveProgram ( ) : void

Saves the current space program

Method Details

Manager() public méthode

public Manager ( ) : System
Résultat System

costs() public méthode

public costs ( int value ) : int
value int
Résultat int

discardRandomMission() public méthode

Discards the given random mission. Removed it from the random missions list
public discardRandomMission ( Mission m ) : void
m Mission M.
Résultat void

finishMission() public méthode

Finishes the given mission with the given vessel. Rewards the space program with the missions reward.
public finishMission ( Mission m, Vessel vessel, GameEvent events ) : void
m Mission mission
vessel Vessel vessel
events GameEvent
Résultat void

finishMissionGoal() public méthode

Finishes the given mission goal with the given vessel. Rewards the space program with the reward from mission goal.
public finishMissionGoal ( MissionGoal goal, Vessel vessel, GameEvent events ) : void
goal MissionGoal Goal.
vessel Vessel Vessel.
events GameEvent
Résultat void

getActivePassiveMissions() public méthode

Gets all passive missions that are currently active. Removes old passive missions
public getActivePassiveMissions ( ) : List
Résultat List

getBudget() public méthode

public getBudget ( ) : int
Résultat int

getClientControlledMission() public méthode

Gets the client controlled mission that has been finished with the given vessel
public getClientControlledMission ( Vessel vessel ) : MissionStatus
vessel Vessel Vessel.
Résultat MissionStatus

getClientControlledMissions() public méthode

Gets all client controlled missions
public getClientControlledMissions ( ) : List
Résultat List

getPassiveMission() public méthode

Gets the passive mission for the given vessel.
public getPassiveMission ( Vessel vessel ) : MissionStatus
vessel Vessel Vessel.
Résultat MissionStatus

isClientControlled() public méthode

Checks if the given vessel is controlled by a client.
public isClientControlled ( Vessel vessel ) : bool
vessel Vessel Vessel.
Résultat bool

isMissionAlreadyFinished() public méthode

Returns true, if the given mission has been finished with the given vessel.
public isMissionAlreadyFinished ( Mission m, Vessel v ) : bool
m Mission mission
v Vessel vessel
Résultat bool

isMissionAlreadyFinished() public méthode

If true, the given mission name has been finished. False otherwise.
public isMissionAlreadyFinished ( String name ) : bool
name String mission name
Résultat bool

isMissionGoalAlreadyFinished() public méthode

Returns true, if the given mission goal has been finish in another game with the given vessel, false otherwise
public isMissionGoalAlreadyFinished ( MissionGoal c, Vessel v ) : bool
c MissionGoal goal
v Vessel vessel
Résultat bool

isOnPassiveMission() public méthode

Checks if the given vessel in on a passive mission
public isOnPassiveMission ( Vessel vessel ) : bool
vessel Vessel Vessel.
Résultat bool

loadMissionPackage() public méthode

Loads the given mission package
public loadMissionPackage ( String path ) : MissionPackage
path String Path.
Résultat MissionPackage

loadProgram() public méthode

public loadProgram ( String title ) : void
title String
Résultat void

recycleVessel() public méthode

Recycles the vessel with the given costs. It is added to the recycled vessels list.
public recycleVessel ( Vessel vessel, int costs ) : void
vessel Vessel Vessel.
costs int Costs.
Résultat void

reloadMission() public méthode

Reloads the given mission for the given vessel. Checks for already finished mission goals and reexecutes the instructions.
public reloadMission ( Mission m, Vessel vessel ) : Mission
m Mission mission
vessel Vessel vessel
Résultat Mission

removeMission() public méthode

Removes an mission status
public removeMission ( MissionStatus s ) : void
s MissionStatus S.
Résultat void

resetSpaceProgram() public méthode

Reset the current space program.
public resetSpaceProgram ( ) : void
Résultat void

reward() public méthode

public reward ( int value ) : int
value int
Résultat int

rewind() public méthode

Rewinds the latest expenses.
public rewind ( ) : void
Résultat void

saveProgram() public méthode

Saves the current space program
public saveProgram ( ) : void
Résultat void