General mission abstraction. The mission can have any arbitrary task tree and reward. If you want to create new mission archetypes, you should register a new enum variant in MissionType

Constructors

Properties

missionGiver: UniverseObjectId

The space station that gave the mission

missionType: MissionType

The type of the mission (useful for displaying localized strings)

reward: number

The reward that the player gets for completing the mission

The task tree that the player has to complete to finish the mission

Methods

  • Describes the next task that the player has to complete given the current mission context

    Parameters

    • context: MissionContext

      The current mission context

    • keyboardLayout: Map<string, string>

      The keyboard layout map to localize the keys

    • starSystemDatabase: StarSystemDatabase

    Returns string

  • Returns true if the two missions have the same task tree

    Parameters

    • other: Mission

      The other mission to compare to

    Returns boolean

  • Returns the reward that the player gets for completing the mission

    Returns number

  • Returns the localized string for the mission type

    Returns string

  • Returns true if the mission is completed, false otherwise

    Returns boolean