License | BSD-3-Clause |
---|---|
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Utilities for working with procedurally generated worlds.
Synopsis
- type Seed = Int
- extractEntities :: TTerm g a -> Set Entity
- findOffset :: Integer -> ((Coords -> (t, Erasable (Last e))) -> Bool) -> WorldFun t e -> WorldFun t e
- findPatchWith :: [Text] -> WorldFun t Entity -> WorldFun t Entity
- findTreeOffset :: WorldFun t Entity -> WorldFun t Entity
- findGoodOrigin :: WorldFun t Entity -> WorldFun t Entity
Documentation
extractEntities :: TTerm g a -> Set Entity Source #
Extract a list of all entities mentioned in a given world DSL term.
findOffset :: Integer -> ((Coords -> (t, Erasable (Last e))) -> Bool) -> WorldFun t e -> WorldFun t e Source #
Offset a world by a multiple of the skip
in such a way that it
satisfies the given predicate.
findPatchWith :: [Text] -> WorldFun t Entity -> WorldFun t Entity Source #
Offset the world so the base starts in a 32x32 patch containing at least one of each of a list of required entities.