C# Class MissionController.Manager

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

Private Properties

Property Type Description

Public Methods

Method 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 method

public Manager ( ) : System
return System

costs() public method

public costs ( int value ) : int
value int
return int

discardRandomMission() public method

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

finishMission() public method

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
return void

finishMissionGoal() public method

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
return void

getActivePassiveMissions() public method

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

getBudget() public method

public getBudget ( ) : int
return int

getClientControlledMission() public method

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

getClientControlledMissions() public method

Gets all client controlled missions
public getClientControlledMissions ( ) : List
return List

getPassiveMission() public method

Gets the passive mission for the given vessel.
public getPassiveMission ( Vessel vessel ) : MissionStatus
vessel Vessel Vessel.
return MissionStatus

isClientControlled() public method

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

isMissionAlreadyFinished() public method

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
return bool

isMissionAlreadyFinished() public method

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

isMissionGoalAlreadyFinished() public method

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
return bool

isOnPassiveMission() public method

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

loadMissionPackage() public method

Loads the given mission package
public loadMissionPackage ( String path ) : MissionPackage
path String Path.
return MissionPackage

loadProgram() public method

public loadProgram ( String title ) : void
title String
return void

recycleVessel() public method

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.
return void

reloadMission() public method

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
return Mission

removeMission() public method

Removes an mission status
public removeMission ( MissionStatus s ) : void
s MissionStatus S.
return void

resetSpaceProgram() public method

Reset the current space program.
public resetSpaceProgram ( ) : void
return void

reward() public method

public reward ( int value ) : int
value int
return int

rewind() public method

Rewinds the latest expenses.
public rewind ( ) : void
return void

saveProgram() public method

Saves the current space program
public saveProgram ( ) : void
return void