Safe Haskell | None |
---|---|
Language | Haskell2010 |
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 -> LevelId -> Freqs ItemKind -> m (Frequency (ContentId ItemKind, ItemKind))
- rollItemAspect :: MonadServerAtomic m => Frequency (ContentId ItemKind, ItemKind) -> LevelId -> m NewItem
- rollAndRegisterItem :: MonadServerAtomic m => Bool -> LevelId -> Frequency (ContentId ItemKind, ItemKind) -> Container -> Maybe Int -> m (Maybe (ItemId, ItemFullKit))
- placeItemsInDungeon :: forall m. 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 -> LevelId -> Freqs ItemKind -> m (Frequency (ContentId ItemKind, ItemKind)) Source #
rollItemAspect :: MonadServerAtomic m => Frequency (ContentId ItemKind, ItemKind) -> LevelId -> m NewItem Source #
rollAndRegisterItem :: MonadServerAtomic m => Bool -> LevelId -> Frequency (ContentId ItemKind, ItemKind) -> Container -> Maybe Int -> m (Maybe (ItemId, ItemFullKit)) Source #
placeItemsInDungeon :: forall m. 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 #
createCaveItem :: MonadServerAtomic m => Point -> LevelId -> m () Source #
createEmbedItem :: MonadServerAtomic m => LevelId -> Point -> GroupName ItemKind -> m () Source #