Safe Haskell | None |
---|---|
Language | Haskell2010 |
Sending atomic commands to clients and executing them on the server.
See https://github.com/LambdaHack/LambdaHack/wiki/Client-server-architecture.
Synopsis
- handleAndBroadcast :: (MonadServerAtomic m, MonadServerComm m) => PosAtomic -> [UpdAtomic] -> CmdAtomic -> m ()
- sendPer :: (MonadServerAtomic m, MonadServerComm m) => FactionId -> LevelId -> Perception -> Perception -> Perception -> m ()
- handleCmdAtomicServer :: MonadServerAtomic m => UpdAtomic -> m (PosAtomic, [UpdAtomic], Bool)
- hearUpdAtomic :: MonadStateRead m => [(ActorId, Actor)] -> UpdAtomic -> m (Maybe [ActorId])
- hearSfxAtomic :: MonadServer m => [(ActorId, Actor)] -> SfxAtomic -> m (Maybe (HearMsg, [ActorId]))
- filterHear :: MonadStateRead m => Point -> [(ActorId, Actor)] -> m [ActorId]
- atomicForget :: FactionId -> LevelId -> Perception -> State -> [UpdAtomic]
- atomicRemember :: LevelId -> Perception -> State -> State -> [UpdAtomic]
Documentation
handleAndBroadcast :: (MonadServerAtomic m, MonadServerComm m) => PosAtomic -> [UpdAtomic] -> CmdAtomic -> m () Source #
Send an atomic action to all clients that can see it.
sendPer :: (MonadServerAtomic m, MonadServerComm m) => FactionId -> LevelId -> Perception -> Perception -> Perception -> m () Source #
handleCmdAtomicServer :: MonadServerAtomic m => UpdAtomic -> m (PosAtomic, [UpdAtomic], Bool) Source #
Internal operations
hearUpdAtomic :: MonadStateRead m => [(ActorId, Actor)] -> UpdAtomic -> m (Maybe [ActorId]) Source #
Messages for some unseen atomic commands.
hearSfxAtomic :: MonadServer m => [(ActorId, Actor)] -> SfxAtomic -> m (Maybe (HearMsg, [ActorId])) Source #
Messages for some unseen sfx.
filterHear :: MonadStateRead m => Point -> [(ActorId, Actor)] -> m [ActorId] Source #
atomicForget :: FactionId -> LevelId -> Perception -> State -> [UpdAtomic] Source #
atomicRemember :: LevelId -> Perception -> State -> State -> [UpdAtomic] Source #