Safe Haskell | None |
---|---|
Language | Haskell2010 |
The monad for writing to the game state and related operations.
- class MonadStateRead m => MonadStateWrite m where
- putState :: MonadStateWrite m => State -> m ()
- updateLevel :: MonadStateWrite m => LevelId -> (Level -> Level) -> m ()
- updateActor :: MonadStateWrite m => ActorId -> (Actor -> Actor) -> m ()
- updateFaction :: MonadStateWrite m => FactionId -> (Faction -> Faction) -> m ()
- insertItemContainer :: MonadStateWrite m => ItemId -> ItemQuant -> Container -> m ()
- insertItemActor :: MonadStateWrite m => ItemId -> ItemQuant -> ActorId -> CStore -> m ()
- deleteItemContainer :: MonadStateWrite m => ItemId -> ItemQuant -> Container -> m ()
- deleteItemActor :: MonadStateWrite m => ItemId -> ItemQuant -> ActorId -> CStore -> m ()
- updateFloor :: (ItemFloor -> ItemFloor) -> Level -> Level
- updateActorMap :: (ActorMap -> ActorMap) -> Level -> Level
- moveActorMap :: MonadStateWrite m => ActorId -> Actor -> Actor -> m ()
- updateTile :: (TileMap -> TileMap) -> Level -> Level
- updateSmell :: (SmellMap -> SmellMap) -> Level -> Level
Documentation
class MonadStateRead m => MonadStateWrite m where Source #
modifyState :: (State -> State) -> m () Source #
putState :: MonadStateWrite m => State -> m () Source #
updateLevel :: MonadStateWrite m => LevelId -> (Level -> Level) -> m () Source #
Update a given level data within state.
updateActor :: MonadStateWrite m => ActorId -> (Actor -> Actor) -> m () Source #
updateFaction :: MonadStateWrite m => FactionId -> (Faction -> Faction) -> m () Source #
insertItemContainer :: MonadStateWrite m => ItemId -> ItemQuant -> Container -> m () Source #
insertItemActor :: MonadStateWrite m => ItemId -> ItemQuant -> ActorId -> CStore -> m () Source #
deleteItemContainer :: MonadStateWrite m => ItemId -> ItemQuant -> Container -> m () Source #
deleteItemActor :: MonadStateWrite m => ItemId -> ItemQuant -> ActorId -> CStore -> m () Source #
updateFloor :: (ItemFloor -> ItemFloor) -> Level -> Level Source #
Update the items on the ground map.
updateActorMap :: (ActorMap -> ActorMap) -> Level -> Level Source #
Update the actors on the ground map.
moveActorMap :: MonadStateWrite m => ActorId -> Actor -> Actor -> m () Source #