LambdaHack-0.2.10: A roguelike game engine in early and active development
Game.LambdaHack.Common.Save
Description
Saving and restoring server game state.
Synopsis
type ChanSave a = MVar (Maybe a)
saveToChan :: ChanSave a -> a -> IO ()
wrapInSaves :: Binary a => (a -> FilePath) -> (ChanSave a -> IO ()) -> IO ()
restoreGame :: Binary a => String -> FilePath -> [(FilePath, FilePath)] -> (FilePath -> IO FilePath) -> IO (Maybe a)
Restore a saved game, if it exists. Initialize directory structure and cope over data files, if needed.
delayPrint :: Text -> IO ()