Move from store to flat
This commit is contained in:
@@ -1,8 +1,11 @@
|
||||
{-# LANGUAGE DeriveGeneric #-}
|
||||
{-# LANGUAGE DeriveAnyClass #-}
|
||||
{-# LANGUAGE StrictData #-}
|
||||
{-# LANGUAGE TemplateHaskell #-}
|
||||
|
||||
module Dodge.Data.Machine.Sensor where
|
||||
|
||||
import Flat
|
||||
import LinearHelp
|
||||
import Dodge.Data.GenParams
|
||||
import Color
|
||||
@@ -28,22 +31,19 @@ data Sensor
|
||||
, _proxRequirement :: ProximityRequirement
|
||||
, _sensToggle :: Bool
|
||||
}
|
||||
deriving (Eq, Ord, Show, Read)
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
|
||||
data ProximityRequirement
|
||||
= RequireHealth {_proxReqMinHealth :: Int}
|
||||
| RequireEquipment {_proxReqEquipment :: ItemBaseType}
|
||||
| RequireImpossible
|
||||
deriving (Eq, Ord, Show, Read)
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
|
||||
data CloseToggle = NotClose | IsClose
|
||||
deriving (Eq, Ord, Show, Read)
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
|
||||
makeLenses ''Sensor
|
||||
makeLenses ''ProximityRequirement
|
||||
deriveJSON defaultOptions ''Sensor
|
||||
deriveJSON defaultOptions ''ProximityRequirement
|
||||
deriveJSON defaultOptions ''CloseToggle
|
||||
$($(derive [d| instance Deriving (Store Sensor) |]))
|
||||
$($(derive [d| instance Deriving (Store ProximityRequirement) |]))
|
||||
$($(derive [d| instance Deriving (Store CloseToggle) |]))
|
||||
|
||||
Reference in New Issue
Block a user