swarm-0.5.0.0: 2D resource gathering game with programmable robots
LicenseBSD-3-Clause
Safe HaskellSafe-Inferred
LanguageHaskell2010

Swarm.Game.Achievement.Persistence

Description

Load/save logic for achievements. Each achievement is saved to its own file to better support forward-compatibility.

Synopsis

Documentation

getSwarmAchievementsPath :: Bool -> IO FilePath Source #

Get a path to the directory where achievement records are stored. If the argument is set to True, create the directory if it does not exist.

loadAchievementsInfo :: (Has (Accum (Seq SystemFailure)) sig m, Has (Lift IO) sig m) => m [Attainment] Source #

Load saved info about achievements from XDG data directory. Returns a list of attained achievements.

saveAchievementsInfo :: [Attainment] -> IO () Source #

Save info about achievements to XDG data directory.