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

Safe Haskell | None
Language | Haskell2010

Game.LambdaHack.Definition.Flavour

Contents

- The `Flavour` type
- Constructors
- Accessors
- Assorted
- Internal operations

Description

The appearance of in-game items, as communicated to the player.

Synopsis

- data Flavour
- zipPlain :: [Color] -> [Flavour]
- zipFancy :: [Color] -> [Flavour]
- zipLiquid :: [Color] -> [Flavour]
- zipGlassPlain :: [Color] -> [Flavour]
- zipGlassFancy :: [Color] -> [Flavour]
- zipStory :: [Color] -> [Flavour]
- dummyFlavour :: Flavour
- stdFlavList :: [Flavour]
- flavourToColor :: Flavour -> Color
- flavourToName :: Flavour -> Text
- colorToPlainName :: Color -> Text
- colorToFancyName :: Color -> Text
- colorToTeamName :: Color -> Text
- data FancyName
- colorToLiquidName :: Color -> Text
- colorToGlassPlainName :: Color -> Text
- colorToGlassFancyName :: Color -> Text

# The `Flavour` type

data Flavour Source #

The type of item flavours.

#### Instances

Instances details

Binary Flavour Source # |
Instance details Defined in Game.LambdaHack.Definition.Flavour Methods put :: Flavour -> Put Source # get :: Get Flavour Source # putList :: [Flavour] -> Put Source #
Enum Flavour Source # |

Instance details

Defined in Game.LambdaHack.Definition.Flavour

Methods

succ :: Flavour -> Flavour Source #

pred :: Flavour -> Flavour Source #

toEnum :: Int -> Flavour Source #

fromEnum :: Flavour -> Int Source #

enumFrom :: Flavour -> [Flavour] Source #

enumFromThen :: Flavour -> Flavour -> [Flavour] Source #

enumFromTo :: Flavour -> Flavour -> [Flavour] Source #

enumFromThenTo :: Flavour -> Flavour -> Flavour -> [Flavour] Source #

Generic Flavour Source # |

Instance details

Defined in Game.LambdaHack.Definition.Flavour

Associated Types

type Rep Flavour |

Instance details

Defined in Game.LambdaHack.Definition.Flavour

type Rep Flavour = D1 ('MetaData "Flavour" "Game.LambdaHack.Definition.Flavour" "LambdaHack-0.11.0.1-BLuOaw8nuizISmzkanqI8h" 'False) (C1 ('MetaCons "Flavour" 'PrefixI 'True) (S1 ('MetaSel ('Just "fancyName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 FancyName) :*: S1 ('MetaSel ('Just "baseColor") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Color)))

Methods

from :: Flavour -> Rep Flavour x Source #

to :: Rep Flavour x -> Flavour Source #

Show Flavour Source # |
Instance details Defined in Game.LambdaHack.Definition.Flavour Methods showsPrec :: Int -> Flavour -> ShowS Source # show :: Flavour -> String Source # showList :: [Flavour] -> ShowS Source #
Eq Flavour Source # |
Instance details Defined in Game.LambdaHack.Definition.Flavour Methods (==) :: Flavour -> Flavour -> Bool Source # (/=) :: Flavour -> Flavour -> Bool Source #
Ord Flavour Source # |
Instance details Defined in Game.LambdaHack.Definition.Flavour Methods compare :: Flavour -> Flavour -> Ordering Source # (<) :: Flavour -> Flavour -> Bool Source # (<=) :: Flavour -> Flavour -> Bool Source # (>) :: Flavour -> Flavour -> Bool Source # (>=) :: Flavour -> Flavour -> Bool Source # max :: Flavour -> Flavour -> Flavour Source # min :: Flavour -> Flavour -> Flavour Source #
type Rep Flavour Source # |

Instance details

Defined in Game.LambdaHack.Definition.Flavour

type Rep Flavour = D1 ('MetaData "Flavour" "Game.LambdaHack.Definition.Flavour" "LambdaHack-0.11.0.1-BLuOaw8nuizISmzkanqI8h" 'False) (C1 ('MetaCons "Flavour" 'PrefixI 'True) (S1 ('MetaSel ('Just "fancyName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 FancyName) :*: S1 ('MetaSel ('Just "baseColor") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Color)))

# Constructors

zipPlain :: [Color] -> [Flavour] Source #

Turn a colour set into a flavour set.

zipFancy :: [Color] -> [Flavour] Source #

Turn a colour set into a flavour set.

zipLiquid :: [Color] -> [Flavour] Source #

Turn a colour set into a flavour set.

zipGlassPlain :: [Color] -> [Flavour] Source #

Turn a colour set into a flavour set.

zipGlassFancy :: [Color] -> [Flavour] Source #

Turn a colour set into a flavour set.

zipStory :: [Color] -> [Flavour] Source #

Turn a colour set into a flavour set.

dummyFlavour :: Flavour Source #

stdFlavList :: [Flavour] Source #

# Accessors

flavourToColor :: Flavour -> Color Source #

Get the underlying base colour of a flavour.

flavourToName :: Flavour -> Text Source #

Construct the full name of a flavour.

# Assorted

colorToPlainName :: Color -> Text Source #

Human-readable names for item colors. The plain set.

colorToFancyName :: Color -> Text Source #

Human-readable names for item colors. The fancy set.

colorToTeamName :: Color -> Text Source #

Simple names for team colors (bright colours preferred).

# Internal operations

data FancyName Source #

#### Instances

Instances details

Bounded FancyName Source # |
Instance details Defined in Game.LambdaHack.Definition.Flavour Methods minBound :: FancyName Source # maxBound :: FancyName Source #
Enum FancyName Source # |

Instance details

Defined in Game.LambdaHack.Definition.Flavour

Methods

succ :: FancyName -> FancyName Source #

pred :: FancyName -> FancyName Source #

toEnum :: Int -> FancyName Source #

fromEnum :: FancyName -> Int Source #

enumFrom :: FancyName -> [FancyName] Source #

enumFromThen :: FancyName -> FancyName -> [FancyName] Source #

enumFromTo :: FancyName -> FancyName -> [FancyName] Source #

enumFromThenTo :: FancyName -> FancyName -> FancyName -> [FancyName] Source #

Generic FancyName Source # |

Instance details

Defined in Game.LambdaHack.Definition.Flavour

Associated Types

type Rep FancyName |

Instance details

Defined in Game.LambdaHack.Definition.Flavour

type Rep FancyName = D1 ('MetaData "FancyName" "Game.LambdaHack.Definition.Flavour" "LambdaHack-0.11.0.1-BLuOaw8nuizISmzkanqI8h" 'False) ((C1 ('MetaCons "Plain" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Fancy" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Liquid" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "GlassPlain" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "GlassFancy" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Story" 'PrefixI 'False) (U1 :: Type -> Type))))

Methods

from :: FancyName -> Rep FancyName x Source #

to :: Rep FancyName x -> FancyName Source #

Show FancyName Source # |
Instance details Defined in Game.LambdaHack.Definition.Flavour Methods showsPrec :: Int -> FancyName -> ShowS Source # show :: FancyName -> String Source # showList :: [FancyName] -> ShowS Source #
Eq FancyName Source # |
Instance details Defined in Game.LambdaHack.Definition.Flavour Methods (==) :: FancyName -> FancyName -> Bool Source # (/=) :: FancyName -> FancyName -> Bool Source #
Ord FancyName Source # |

Instance details

Defined in Game.LambdaHack.Definition.Flavour

Methods

compare :: FancyName -> FancyName -> Ordering Source #

(<) :: FancyName -> FancyName -> Bool Source #

(<=) :: FancyName -> FancyName -> Bool Source #

(>) :: FancyName -> FancyName -> Bool Source #

(>=) :: FancyName -> FancyName -> Bool Source #

max :: FancyName -> FancyName -> FancyName Source #

min :: FancyName -> FancyName -> FancyName Source #

type Rep FancyName Source # |

Instance details

Defined in Game.LambdaHack.Definition.Flavour

type Rep FancyName = D1 ('MetaData "FancyName" "Game.LambdaHack.Definition.Flavour" "LambdaHack-0.11.0.1-BLuOaw8nuizISmzkanqI8h" 'False) ((C1 ('MetaCons "Plain" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Fancy" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Liquid" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "GlassPlain" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "GlassFancy" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Story" 'PrefixI 'False) (U1 :: Type -> Type))))

colorToLiquidName :: Color -> Text Source #

Human-readable names for item colors. The liquid set.

colorToGlassPlainName :: Color -> Text Source #

Human-readable names for item colors. The plain glass set.

colorToGlassFancyName :: Color -> Text Source #

Human-readable names for item colors. The fancy glass set.