Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data PrerequisiteConfig = PrerequisiteConfig {}
- data Objective = Objective {}
- objectiveGoal :: Lens' Objective [Text]
- objectiveTeaser :: Lens' Objective (Maybe Text)
- objectiveCondition :: Lens' Objective ProcessedTerm
- objectiveId :: Lens' Objective (Maybe Text)
- objectiveOptional :: Lens' Objective Bool
- objectivePrerequisite :: Lens' Objective (Maybe PrerequisiteConfig)
- objectiveHidden :: Lens' Objective Bool
- objectiveAchievement :: Lens' Objective (Maybe AchievementInfo)
- data CompletionBuckets = CompletionBuckets {
- incomplete :: [Objective]
- completed :: [Objective]
- unwinnable :: [Objective]
- data ObjectiveCompletion = ObjectiveCompletion {}
- listAllObjectives :: CompletionBuckets -> [Objective]
- addCompleted :: Objective -> ObjectiveCompletion -> ObjectiveCompletion
- addUnwinnable :: Objective -> ObjectiveCompletion -> ObjectiveCompletion
- setIncomplete :: ([Objective] -> [Objective]) -> ObjectiveCompletion -> ObjectiveCompletion
- addIncomplete :: Objective -> ObjectiveCompletion -> ObjectiveCompletion
- extractIncomplete :: ObjectiveCompletion -> (ObjectiveCompletion, [Objective])
Documentation
data PrerequisiteConfig Source #
PrerequisiteConfig | |
|
Instances
An objective is a condition to be achieved by a player in a scenario.
Instances
objectiveGoal :: Lens' Objective [Text] Source #
An explanation of the goal of the objective, shown to the player during play. It is represented as a list of paragraphs.
objectiveTeaser :: Lens' Objective (Maybe Text) Source #
A very short (3-5 words) description of the goal for displaying on the left side of the Objectives modal.
objectiveCondition :: Lens' Objective ProcessedTerm Source #
A winning condition for the objective, expressed as a
program of type cmd bool
. By default, this program will be
run to completion every tick (the usual limits on the number
of CESK steps per tick do not apply).
objectiveId :: Lens' Objective (Maybe Text) Source #
Optional name by which this objective may be referenced as a prerequisite for other objectives.
objectiveOptional :: Lens' Objective Bool Source #
Indicates whether the objective is not required in order to "win" the scenario. Useful for (potentially hidden) achievements. If the field is not supplied, it defaults to False (i.e. the objective is mandatory to "win").
objectivePrerequisite :: Lens' Objective (Maybe PrerequisiteConfig) Source #
Dependencies upon other objectives
objectiveHidden :: Lens' Objective Bool Source #
Whether the goal is displayed in the UI before completion. The goal will always be revealed after it is completed.
This attribute often goes along with an Achievement.
objectiveAchievement :: Lens' Objective (Maybe AchievementInfo) Source #
An optional Achievement that is to be registered globally when this objective is completed.
data CompletionBuckets Source #
CompletionBuckets | |
|
Instances
data ObjectiveCompletion Source #
ObjectiveCompletion | |
|
Instances
listAllObjectives :: CompletionBuckets -> [Objective] Source #
Concatenates all incomplete and completed objectives.
setIncomplete :: ([Objective] -> [Objective]) -> ObjectiveCompletion -> ObjectiveCompletion Source #
extractIncomplete :: ObjectiveCompletion -> (ObjectiveCompletion, [Objective]) Source #
Returns the ObjectiveCompletion with the "incomplete" goals extracted to a separate tuple member. This is intended as input to a "fold".