91 lines
2.2 KiB
Haskell
91 lines
2.2 KiB
Haskell
{- |
|
|
Module : Dodge.Default
|
|
Description : Instances of data structures
|
|
|
|
This module contains prototypical data structures.
|
|
-}
|
|
module Dodge.Default (
|
|
module Dodge.Default,
|
|
module Dodge.Default.Item,
|
|
module Dodge.Default.LightSource,
|
|
module Dodge.Default.Wall,
|
|
module Dodge.Default.Creature,
|
|
module Dodge.Default.Terminal,
|
|
) where
|
|
|
|
import Control.Lens
|
|
import Dodge.Data.World
|
|
import Dodge.Default.Creature
|
|
import Dodge.Default.Item
|
|
import Dodge.Default.LightSource
|
|
import Dodge.Default.Terminal
|
|
import Dodge.Default.Wall
|
|
import Dodge.SoundLogic
|
|
import Geometry
|
|
import Picture
|
|
|
|
defaultEquipment :: Item
|
|
defaultEquipment =
|
|
defaultItem
|
|
& itInvColor .~ yellow
|
|
& itUse .~ defaultEquipUse
|
|
|
|
defaultFlIt :: FloorItem
|
|
defaultFlIt = FlIt{_flItRot = 0, _flIt = defaultConsumable, _flItPos = V2 0 0, _flItID = 0}
|
|
|
|
defaultMachine :: Machine
|
|
defaultMachine =
|
|
Machine
|
|
{ _mcID = 0
|
|
, _mcWallIDs = mempty
|
|
, _mcColor = white
|
|
, _mcPos = V2 0 0
|
|
, _mcDir = 0
|
|
, _mcHP = 1000
|
|
, _mcMaterial = Electronics
|
|
, _mcDamage = []
|
|
, _mcType = McStatic
|
|
, _mcName = ""
|
|
, _mcMounts = mempty
|
|
, _mcCloseSound = Nothing
|
|
, _mcWidth = 10
|
|
}
|
|
|
|
defaultButton :: Button
|
|
defaultButton =
|
|
Button
|
|
{ _btPict = DefaultDrawButton (dark red)
|
|
, _btPos = V2 0 0
|
|
, _btRot = 0
|
|
, _btEvent = ButtonPress BtNoLabel ButtonDoNothing click1S NoWorldEffect
|
|
, _btID = 0
|
|
, _btText = "Button"
|
|
, _btState = BtOff
|
|
, _btTermMID = Nothing
|
|
, _btName = ""
|
|
, _btColor = red
|
|
}
|
|
|
|
defaultPP :: PressPlate
|
|
defaultPP =
|
|
PressPlate
|
|
{ _ppPict = setDepth 1 . color (dim . dim $ bright blue) $ circleSolid 5
|
|
, _ppPos = V2 0 0
|
|
, _ppRot = 0
|
|
, _ppEvent = PressPlateId
|
|
, _ppID = -1
|
|
, _ppText = "Pressure plate"
|
|
}
|
|
|
|
upHammer :: HammerType
|
|
upHammer = HasHammer HammerUp
|
|
|
|
defaultProximitySensor :: Sensor
|
|
defaultProximitySensor =
|
|
ProximitySensor
|
|
{ _proxStatus = NotClose
|
|
, _proxDist = 40
|
|
, _proxRequirement = RequireImpossible
|
|
, _sensToggle = False
|
|
}
|