50 lines
1.4 KiB
Haskell
50 lines
1.4 KiB
Haskell
{-# LANGUAGE DeriveGeneric #-}
|
|
{-# LANGUAGE DeriveAnyClass #-}
|
|
{-# LANGUAGE StrictData #-}
|
|
{-# LANGUAGE TemplateHaskell #-}
|
|
|
|
module Dodge.Data.Item.Use.Consumption.LoadAction where
|
|
|
|
import Control.Lens
|
|
import Data.Aeson
|
|
import Data.Aeson.TH
|
|
--import Sound.Data
|
|
|
|
data Manipulation -- should be ManipulatedObject?
|
|
-- = InvSel {_isel :: SelPos}
|
|
= Manipulator {_manObject :: ManipulatedObject
|
|
}
|
|
| Brute
|
|
deriving (Eq, Ord, Show, Read) --Generic, Flat)
|
|
|
|
data ManipulatedObject
|
|
= InInventory {_inInventory :: InventoryManipulation}
|
|
| SelNothing
|
|
| InNearby {_inNearby :: NearbyManipulation}
|
|
deriving (Eq, Ord, Show, Read) --Generic, Flat)
|
|
|
|
data NearbyManipulation
|
|
= SortNearby
|
|
| SelCloseObject {_ispCloseObject :: Int}
|
|
deriving (Eq, Ord, Show, Read) --Generic, Flat)
|
|
|
|
data InventoryManipulation
|
|
= SortInventory
|
|
| SelItem { _ispItem :: Int, _iselAction :: InvSelAction}
|
|
deriving (Eq, Ord, Show, Read) --Generic, Flat)
|
|
|
|
data InvSelAction
|
|
= NoInvSelAction
|
|
deriving (Eq, Ord, Show, Read) --Generic, Flat)
|
|
|
|
makeLenses ''ManipulatedObject
|
|
makeLenses ''Manipulation
|
|
makeLenses ''InventoryManipulation
|
|
makeLenses ''NearbyManipulation
|
|
makeLenses ''InvSelAction
|
|
deriveJSON defaultOptions ''InvSelAction
|
|
deriveJSON defaultOptions ''InventoryManipulation
|
|
deriveJSON defaultOptions ''NearbyManipulation
|
|
deriveJSON defaultOptions ''ManipulatedObject
|
|
deriveJSON defaultOptions ''Manipulation
|