LambdaHack-0.6.0.0: A game engine library for roguelike dungeon crawlers

Safe HaskellNone
LanguageHaskell2010

Game.LambdaHack.Common.Save

Contents

Description

Saving and restoring server game state.

Synopsis

Documentation

type ChanSave a = MVar (Maybe a) Source #

saveToChan :: ChanSave a -> a -> IO () Source #

wrapInSaves :: Binary a => COps -> (a -> FilePath) -> (ChanSave a -> IO ()) -> IO () Source #

restoreGame :: Binary a => COps -> FilePath -> IO (Maybe a) Source #

Restore a saved game, if it exists. Initialize directory structure and copy over data files, if needed.

Internal operations

loopSave :: Binary a => COps -> (a -> FilePath) -> ChanSave a -> IO () Source #

Repeatedly save a simple serialized version of the current state.