41 lines
1.0 KiB
Haskell
41 lines
1.0 KiB
Haskell
{-# LANGUAGE DeriveAnyClass #-}
|
|
{-# LANGUAGE DeriveGeneric #-}
|
|
{-# LANGUAGE StrictData #-}
|
|
{-# LANGUAGE TemplateHaskell #-}
|
|
|
|
module Dodge.Data.RightButtonOptions where
|
|
|
|
import Control.Lens
|
|
import Data.Aeson
|
|
import Data.Aeson.TH
|
|
import Dodge.Data.Equipment.Misc
|
|
import Dodge.Data.Item.Location
|
|
import NewInt
|
|
|
|
data RightButtonState
|
|
= NoRightButtonState
|
|
| EquipOptions {_opSel :: Int}
|
|
|
|
data EquipmentAllocation
|
|
= DoNotMoveEquipment
|
|
| PutOnEquipment {_allocNewPos :: EquipSite}
|
|
| MoveEquipment
|
|
{ _allocNewPos :: EquipSite
|
|
, _allocOldPos :: EquipSite
|
|
}
|
|
| SwapEquipment
|
|
{ _allocNewPos :: EquipSite
|
|
, _allocOldPos :: EquipSite
|
|
, _allocSwapID :: NewInt ItmInt
|
|
}
|
|
| ReplaceEquipment
|
|
{ _allocNewPos :: EquipSite
|
|
, _allocRemoveID :: NewInt ItmInt
|
|
}
|
|
| RemoveEquipment {_allocOldPos :: EquipSite}
|
|
|
|
makeLenses ''RightButtonState
|
|
makeLenses ''EquipmentAllocation
|
|
deriveJSON defaultOptions ''EquipmentAllocation
|
|
deriveJSON defaultOptions ''RightButtonState
|