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

Safe Haskell | None
Language | Haskell2010

Game.LambdaHack.Server.ItemM

Contents

- Internal operations

Description

Server operations for items.

Synopsis

- registerItem :: MonadServerAtomic m => Bool -> ItemFullKit -> ItemKnown -> Container -> m ItemId
- moveStashIfNeeded :: MonadStateRead m => Container -> m [UpdAtomic]
- randomResetTimeout :: MonadServerAtomic m => Int -> ItemId -> ItemFull -> [ItemTimer] -> Container -> m ()
- embedItemOnPos :: MonadServerAtomic m => LevelId -> Point -> ContentId TileKind -> m ()
- prepareItemKind :: MonadServerAtomic m => Int -> AbsDepth -> Freqs ItemKind -> m (Frequency (GroupName ItemKind, ContentId ItemKind, ItemKind))
- rollItemAspect :: MonadServerAtomic m => Frequency (GroupName ItemKind, ContentId ItemKind, ItemKind) -> AbsDepth -> m NewItem
- rollAndRegisterItem :: MonadServerAtomic m => Bool -> AbsDepth -> Frequency (GroupName ItemKind, ContentId ItemKind, ItemKind) -> Container -> Maybe Int -> m (Maybe (ItemId, ItemFullKit))
- placeItemsInDungeon :: MonadServerAtomic m => EnumMap LevelId (EnumMap FactionId Point) -> m ()
- embedItemsInDungeon :: MonadServerAtomic m => m ()
- mapActorCStore_ :: MonadServer m => CStore -> (ItemId -> ItemQuant -> m ()) -> Actor -> m ()
- onlyRegisterItem :: MonadServerAtomic m => ItemKnown -> m ItemId
- computeRndTimeout :: Time -> ItemFull -> Rnd (Maybe ItemTimer)
- createCaveItem :: MonadServerAtomic m => Point -> LevelId -> m ()
- createEmbedItem :: MonadServerAtomic m => LevelId -> Point -> GroupName ItemKind -> m ()

# Documentation

registerItem :: MonadServerAtomic m => Bool -> ItemFullKit -> ItemKnown -> Container -> m ItemId Source #

moveStashIfNeeded :: MonadStateRead m => Container -> m [UpdAtomic] Source #

randomResetTimeout :: MonadServerAtomic m => Int -> ItemId -> ItemFull -> [ItemTimer] -> Container -> m () Source #

embedItemOnPos :: MonadServerAtomic m => LevelId -> Point -> ContentId TileKind -> m () Source #

prepareItemKind :: MonadServerAtomic m => Int -> AbsDepth -> Freqs ItemKind -> m (Frequency (GroupName ItemKind, ContentId ItemKind, ItemKind)) Source #

rollItemAspect :: MonadServerAtomic m => Frequency (GroupName ItemKind, ContentId ItemKind, ItemKind) -> AbsDepth -> m NewItem Source #

rollAndRegisterItem :: MonadServerAtomic m => Bool -> AbsDepth -> Frequency (GroupName ItemKind, ContentId ItemKind, ItemKind) -> Container -> Maybe Int -> m (Maybe (ItemId, ItemFullKit)) Source #

placeItemsInDungeon :: MonadServerAtomic m => EnumMap LevelId (EnumMap FactionId Point) -> m () Source #

embedItemsInDungeon :: MonadServerAtomic m => m () Source #

mapActorCStore_ :: MonadServer m => CStore -> (ItemId -> ItemQuant -> m ()) -> Actor -> m () Source #

Mapping over actor's items from a give store.

# Internal operations

onlyRegisterItem :: MonadServerAtomic m => ItemKnown -> m ItemId Source #

computeRndTimeout :: Time -> ItemFull -> Rnd (Maybe ItemTimer) Source #

createCaveItem :: MonadServerAtomic m => Point -> LevelId -> m () Source #

createEmbedItem :: MonadServerAtomic m => LevelId -> Point -> GroupName ItemKind -> m () Source #