LambdaHack-0.11.0.1: A game engine library for tactical squad ASCII roguelike dungeon crawlers

Safe Haskell | None
Language | Haskell2010

Game.LambdaHack.Server.BroadcastAtomic

Contents

- Internal operations

Description

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)
- cmdItemsFromIids :: [ItemId] -> State -> State -> [UpdAtomic]
- hearUpdAtomic :: MonadStateRead m => UpdAtomic -> m (Bool, Maybe Point)
- hearSfxAtomic :: MonadServer m => SfxAtomic -> m (Maybe (HearMsg, Bool, Point))
- 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

cmdItemsFromIids :: [ItemId] -> State -> State -> [UpdAtomic] Source #

hearUpdAtomic :: MonadStateRead m => UpdAtomic -> m (Bool, Maybe Point) Source #

Messages for some unseen atomic commands.

hearSfxAtomic :: MonadServer m => SfxAtomic -> m (Maybe (HearMsg, Bool, Point)) 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 #