Safe Haskell | None |
---|---|
Language | Haskell2010 |
Game.LambdaHack.Definition.Defs
Description
Basic types for content definitions.
Synopsis
- type X = Int
- type Y = Int
- data GroupName a
- toGroupName :: Text -> GroupName a
- fromGroupName :: GroupName a -> Text
- type Freqs a = [(GroupName a, Int)]
- type Rarity = [(Double, Int)]
- linearInterpolation :: Int -> Int -> Rarity -> Int
- data ContentId c
- toContentId :: Word16 -> ContentId c
- fromContentId :: ContentId c -> Word16
- contentIdIndex :: ContentId k -> Int
- data CStore
- ppCStore :: CStore -> (Text, Text)
- ppCStoreIn :: CStore -> Text
- verbCStore :: CStore -> Text
- data SLore
- data ItemDialogMode
- ppSLore :: SLore -> Text
- headingSLore :: SLore -> Text
- ppItemDialogMode :: ItemDialogMode -> (Text, Text)
- ppItemDialogModeIn :: ItemDialogMode -> Text
- ppItemDialogModeFrom :: ItemDialogMode -> Text
Documentation
Instances
Eq (GroupName a) Source # | |
Ord (GroupName a) Source # | |
Defined in Game.LambdaHack.Definition.Defs Methods compare :: GroupName a -> GroupName a -> Ordering Source # (<) :: GroupName a -> GroupName a -> Bool Source # (<=) :: GroupName a -> GroupName a -> Bool Source # (>) :: GroupName a -> GroupName a -> Bool Source # (>=) :: GroupName a -> GroupName a -> Bool Source # | |
Show (GroupName a) Source # | |
IsString (GroupName a) Source # | |
Defined in Game.LambdaHack.Definition.Defs Methods fromString :: String -> GroupName a Source # | |
Generic (GroupName a) Source # | |
Binary (GroupName a) Source # | |
NFData (GroupName a) Source # | |
Defined in Game.LambdaHack.Definition.Defs | |
Hashable (GroupName a) Source # | |
Defined in Game.LambdaHack.Definition.Defs | |
type Rep (GroupName a) Source # | |
Defined in Game.LambdaHack.Definition.Defs |
toGroupName :: Text -> GroupName a Source #
fromGroupName :: GroupName a -> Text Source #
type Freqs a = [(GroupName a, Int)] Source #
For each group that the kind belongs to, denoted by a GroupName
in the first component of a pair, the second component of a pair shows
how common the kind is within the group.
Content identifiers for the content type c
.
Instances
toContentId :: Word16 -> ContentId c Source #
fromContentId :: ContentId c -> Word16 Source #
contentIdIndex :: ContentId k -> Int Source #
Actor's item stores.
Instances
ppCStoreIn :: CStore -> Text Source #
verbCStore :: CStore -> Text Source #
Item slot and lore categories.
Instances
data ItemDialogMode Source #
Constructors
MStore CStore | a leader's store |
MOrgans | leader's organs |
MOwned | all party's items |
MSkills | not items, but determined by leader's items |
MLore SLore | not party's items, but all known generalized items |
MPlaces | not items at all, but definitely a lore |
Instances
headingSLore :: SLore -> Text Source #
ppItemDialogMode :: ItemDialogMode -> (Text, Text) Source #