Safe Haskell | None |
---|---|
Language | Haskell2010 |
Saving and restoring server game state.
- type ChanSave a = MVar (Maybe a)
- saveToChan :: ChanSave a -> a -> IO ()
- wrapInSaves :: Binary a => COps -> (a -> FilePath) -> (ChanSave a -> IO ()) -> IO ()
- restoreGame :: Binary a => COps -> FilePath -> IO (Maybe a)
- saveNameCli :: FactionId -> String
- saveNameSer :: String
- loopSave :: Binary a => COps -> (a -> FilePath) -> ChanSave a -> IO ()
Documentation
saveToChan :: ChanSave a -> a -> 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.
saveNameCli :: FactionId -> String Source #
saveNameSer :: String Source #