45 lines
1.1 KiB
Haskell
45 lines
1.1 KiB
Haskell
{-# LANGUAGE DeriveGeneric #-}
|
|
{-# LANGUAGE DeriveAnyClass #-}
|
|
{-# LANGUAGE StrictData #-}
|
|
{-# LANGUAGE TemplateHaskell #-}
|
|
|
|
module Dodge.Data.RightButtonOptions where
|
|
|
|
import Control.Lens
|
|
import Data.Aeson
|
|
import Data.Aeson.TH
|
|
import Dodge.Data.Equipment.Misc
|
|
|
|
data RightButtonOptions
|
|
= NoRightButtonOptions
|
|
| EquipOptions { _opSel :: Int }
|
|
--deriving (Eq, Ord, Show, Read) --Generic, Flat)
|
|
|
|
data EquipmentAllocation
|
|
= DoNotMoveEquipment
|
|
| PutOnEquipment
|
|
{ _allocNewPos :: EquipPosition
|
|
}
|
|
| MoveEquipment
|
|
{ _allocNewPos :: EquipPosition
|
|
, _allocOldPos :: EquipPosition
|
|
}
|
|
| SwapEquipment
|
|
{ _allocNewPos :: EquipPosition
|
|
, _allocOldPos :: EquipPosition
|
|
, _allocSwapID :: Int
|
|
}
|
|
| ReplaceEquipment
|
|
{ _allocNewPos :: EquipPosition
|
|
, _allocRemoveID :: Int
|
|
}
|
|
| RemoveEquipment
|
|
{ _allocOldPos :: EquipPosition
|
|
}
|
|
--deriving (Eq, Ord, Show, Read) --Generic, Flat)
|
|
|
|
makeLenses ''RightButtonOptions
|
|
makeLenses ''EquipmentAllocation
|
|
deriveJSON defaultOptions ''EquipmentAllocation
|
|
deriveJSON defaultOptions ''RightButtonOptions
|