Safe Haskell | None |
---|---|
Language | Haskell2010 |
Server operations common to many modules.
Synopsis
- revealItems :: MonadServerAtomic m => FactionId -> m ()
- moveStores :: MonadServerAtomic m => Bool -> ActorId -> CStore -> CStore -> m ()
- generalMoveItem :: MonadStateRead m => Bool -> ItemId -> Int -> Container -> Container -> m [UpdAtomic]
- deduceQuits :: MonadServerAtomic m => FactionId -> Status -> m ()
- deduceKilled :: MonadServerAtomic m => ActorId -> m ()
- electLeader :: MonadServerAtomic m => FactionId -> LevelId -> ActorId -> m ()
- setFreshLeader :: MonadServerAtomic m => FactionId -> ActorId -> m ()
- updatePer :: MonadServerAtomic m => FactionId -> LevelId -> m ()
- recomputeCachePer :: MonadServer m => FactionId -> LevelId -> m Perception
- projectFail :: MonadServerAtomic m => ActorId -> ActorId -> Point -> Int -> Bool -> ItemId -> CStore -> Bool -> m (Maybe ReqFailure)
- addActorFromGroup :: MonadServerAtomic m => GroupName ItemKind -> FactionId -> Point -> LevelId -> Time -> m (Maybe ActorId)
- registerActor :: MonadServerAtomic m => Bool -> ItemKnown -> ItemFullKit -> FactionId -> Point -> LevelId -> Time -> m ActorId
- discoverIfMinorEffects :: MonadServerAtomic m => Container -> ItemId -> ContentId ItemKind -> m ()
- pickWeaponServer :: MonadServer m => ActorId -> m (Maybe (ItemId, CStore))
- currentSkillsServer :: MonadServer m => ActorId -> m Skills
- allGroupItems :: MonadServerAtomic m => CStore -> GroupName ItemKind -> ActorId -> m [(ItemId, ItemQuant)]
- addCondition :: MonadServerAtomic m => GroupName ItemKind -> ActorId -> m ()
- removeConditionSingle :: MonadServerAtomic m => GroupName ItemKind -> ActorId -> m Int
- addSleep :: MonadServerAtomic m => ActorId -> m ()
- removeSleepSingle :: MonadServerAtomic m => ActorId -> m ()
- addKillToAnalytics :: MonadServerAtomic m => ActorId -> KillHow -> FactionId -> ItemId -> m ()
- containerMoveItem :: MonadStateRead m => Bool -> ItemId -> Int -> Container -> Container -> m [UpdAtomic]
- quitF :: MonadServerAtomic m => Status -> FactionId -> m ()
- keepArenaFact :: Faction -> Bool
- anyActorsAlive :: MonadServer m => FactionId -> ActorId -> m Bool
- projectBla :: MonadServerAtomic m => ActorId -> ActorId -> Point -> [Point] -> ItemId -> CStore -> Bool -> m ()
- addProjectile :: MonadServerAtomic m => ActorId -> Point -> [Point] -> ItemId -> ItemQuant -> LevelId -> FactionId -> Time -> m ()
- addActorIid :: MonadServerAtomic m => ItemId -> ItemFull -> Bool -> FactionId -> Point -> LevelId -> (Actor -> Actor) -> m ActorId
- getCacheLucid :: MonadServer m => LevelId -> m FovLucid
- getCacheTotal :: MonadServer m => FactionId -> LevelId -> m CacheBeforeLucid
Documentation
revealItems :: MonadServerAtomic m => FactionId -> m () Source #
moveStores :: MonadServerAtomic m => Bool -> ActorId -> CStore -> CStore -> m () Source #
generalMoveItem :: MonadStateRead m => Bool -> ItemId -> Int -> Container -> Container -> m [UpdAtomic] Source #
Generate the atomic updates that jointly perform a given item move.
deduceQuits :: MonadServerAtomic m => FactionId -> Status -> m () Source #
deduceKilled :: MonadServerAtomic m => ActorId -> m () Source #
electLeader :: MonadServerAtomic m => FactionId -> LevelId -> ActorId -> m () Source #
setFreshLeader :: MonadServerAtomic m => FactionId -> ActorId -> m () Source #
recomputeCachePer :: MonadServer m => FactionId -> LevelId -> m Perception Source #
:: MonadServerAtomic m | |
=> ActorId | actor causing the projection |
-> ActorId | actor projecting the item (is on current lvl) |
-> Point | target position of the projectile |
-> Int | digital line parameter |
-> Bool | whether to start at the source position |
-> ItemId | the item to be projected |
-> CStore | whether the items comes from floor or inventory |
-> Bool | whether the item is a blast |
-> m (Maybe ReqFailure) |
addActorFromGroup :: MonadServerAtomic m => GroupName ItemKind -> FactionId -> Point -> LevelId -> Time -> m (Maybe ActorId) Source #
registerActor :: MonadServerAtomic m => Bool -> ItemKnown -> ItemFullKit -> FactionId -> Point -> LevelId -> Time -> m ActorId Source #
discoverIfMinorEffects :: MonadServerAtomic m => Container -> ItemId -> ContentId ItemKind -> m () Source #
pickWeaponServer :: MonadServer m => ActorId -> m (Maybe (ItemId, CStore)) Source #
currentSkillsServer :: MonadServer m => ActorId -> m Skills Source #
allGroupItems :: MonadServerAtomic m => CStore -> GroupName ItemKind -> ActorId -> m [(ItemId, ItemQuant)] Source #
addCondition :: MonadServerAtomic m => GroupName ItemKind -> ActorId -> m () Source #
removeConditionSingle :: MonadServerAtomic m => GroupName ItemKind -> ActorId -> m Int Source #
addSleep :: MonadServerAtomic m => ActorId -> m () Source #
removeSleepSingle :: MonadServerAtomic m => ActorId -> m () Source #
addKillToAnalytics :: MonadServerAtomic m => ActorId -> KillHow -> FactionId -> ItemId -> m () Source #
Internal operations
containerMoveItem :: MonadStateRead m => Bool -> ItemId -> Int -> Container -> Container -> m [UpdAtomic] Source #
keepArenaFact :: Faction -> Bool Source #
Tell whether a faction that we know is still in game, keeps arena. Keeping arena means, if the faction is still in game, it always has a leader in the dungeon somewhere. So, leaderless factions and spawner factions do not keep an arena, even though the latter usually has a leader for most of the game.
anyActorsAlive :: MonadServer m => FactionId -> ActorId -> m Bool Source #
:: MonadServerAtomic m | |
=> ActorId | actor causing the projection |
-> ActorId | actor projecting the item (is on current lvl) |
-> Point | starting point of the projectile |
-> [Point] | rest of the trajectory of the projectile |
-> ItemId | the item to be projected |
-> CStore | whether the items comes from floor or inventory |
-> Bool | whether the item is a blast |
-> m () |
addProjectile :: MonadServerAtomic m => ActorId -> Point -> [Point] -> ItemId -> ItemQuant -> LevelId -> FactionId -> Time -> m () Source #
addActorIid :: MonadServerAtomic m => ItemId -> ItemFull -> Bool -> FactionId -> Point -> LevelId -> (Actor -> Actor) -> m ActorId Source #
getCacheLucid :: MonadServer m => LevelId -> m FovLucid Source #
getCacheTotal :: MonadServer m => FactionId -> LevelId -> m CacheBeforeLucid Source #