Skip to content

Commit

Permalink
docstring for grantAchievement (#1785)
Browse files Browse the repository at this point in the history
  • Loading branch information
kostmo authored Mar 6, 2024
1 parent 936b30d commit 3f2a8fd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/swarm-engine/Swarm/Game/Step/Util/Command.hs
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,8 @@ onTarget rid act = do
then deleteRobot rid
else robotMap . ix rid .= tgt'

-- | Enforces validity of the robot's privileged status to receive
-- an achievement.
grantAchievementForRobot ::
(HasRobotStepState sig m, Has (Lift IO) sig m) =>
GameplayAchievement ->
Expand All @@ -174,6 +176,8 @@ checkGameModeAchievementValidity a = do
where
ValidityConditions _ gameplayModeRequired = getValidityRequirements a

-- | NOTE: When possible, one should use the
-- 'grantAchievementForRobot' function instead of this one.
grantAchievement ::
(Has (State GameState) sig m, Has (Lift IO) sig m) =>
GameplayAchievement ->
Expand Down

0 comments on commit 3f2a8fd

Please sign in to comment.