Cleanup
This commit is contained in:
@@ -54,7 +54,7 @@ data Creature = Creature
|
||||
, _crManipulation :: Manipulation
|
||||
, _crInvCapacity :: Int
|
||||
, _crInvLock :: Bool
|
||||
, _crEquipment :: M.Map EquipPosition Int
|
||||
, _crEquipment :: M.Map EquipSite Int
|
||||
, _crState :: CreatureState
|
||||
, _crCorpse :: CreatureCorpse --Creature -> Corpse -> SPic
|
||||
, _crMaterial :: Material
|
||||
|
||||
@@ -8,16 +8,17 @@ module Dodge.Data.Equipment.Misc where
|
||||
import Data.Aeson
|
||||
import Data.Aeson.TH
|
||||
|
||||
data EquipSite
|
||||
data EquipType
|
||||
= GoesOnHead
|
||||
| GoesOnChest
|
||||
| GoesOnBack
|
||||
| GoesOnWrist
|
||||
| GoesOnLegs
|
||||
deriving (Eq,Ord,Show,Read)
|
||||
--deriving (Eq, Ord, Show, Read) --Generic, Flat)
|
||||
deriving (Eq, Ord, Show, Read)
|
||||
|
||||
data EquipPosition
|
||||
--deriving (Eq, Ord, Show, Read) --Generic, Flat)
|
||||
|
||||
data EquipSite
|
||||
= OnHead
|
||||
| OnChest
|
||||
| OnBack
|
||||
@@ -25,9 +26,11 @@ data EquipPosition
|
||||
| OnRightWrist
|
||||
| OnLegs
|
||||
| OnSpecial
|
||||
deriving (Eq, Ord,Show,Read)
|
||||
--deriving (Eq, Ord, Show, Read) --Generic, Flat)
|
||||
data Hotkey = HotkeyQ
|
||||
deriving (Eq, Ord, Show, Read)
|
||||
|
||||
--deriving (Eq, Ord, Show, Read) --Generic, Flat)
|
||||
data Hotkey
|
||||
= HotkeyQ
|
||||
| HotkeyE
|
||||
| Hotkey1
|
||||
| Hotkey2
|
||||
@@ -39,13 +42,16 @@ data Hotkey = HotkeyQ
|
||||
| Hotkey8
|
||||
| Hotkey9
|
||||
| Hotkey0
|
||||
deriving (Eq, Show, Read, Ord, Bounded, Enum) --Generic, Flat)
|
||||
|
||||
deriving (Eq, Show, Read, Ord, Bounded, Enum) --Generic, Flat)
|
||||
|
||||
deriveJSON defaultOptions ''EquipType
|
||||
deriveJSON defaultOptions ''EquipSite
|
||||
deriveJSON defaultOptions ''EquipPosition
|
||||
deriveJSON defaultOptions ''Hotkey
|
||||
instance ToJSONKey EquipPosition
|
||||
instance FromJSONKey EquipPosition
|
||||
|
||||
instance ToJSONKey EquipSite
|
||||
|
||||
instance FromJSONKey EquipSite
|
||||
|
||||
instance ToJSONKey Hotkey
|
||||
|
||||
instance FromJSONKey Hotkey
|
||||
|
||||
@@ -102,7 +102,7 @@ data EquipItemType
|
||||
| FLAMESHIELD
|
||||
| FRONTARMOUR
|
||||
| WRISTARMOUR
|
||||
| INVISIBILITYEQUIPMENT EquipSite
|
||||
| INVISIBILITYEQUIPMENT EquipType
|
||||
| BRAINHAT
|
||||
| HAT
|
||||
| HEADLAMP
|
||||
|
||||
@@ -18,9 +18,6 @@ data ItEffect = ItEffect
|
||||
|
||||
data ItInvEffect
|
||||
= NoInvEffect
|
||||
-- | ChargeIfEquipped
|
||||
-- | ChargeIfInInventory
|
||||
-- | SetCharge Int
|
||||
| EffectRootNotroot ItInvEffect ItInvEffect
|
||||
| CreateShieldWall
|
||||
| RemoveShieldWall
|
||||
|
||||
@@ -32,7 +32,7 @@ data ItemLocation
|
||||
, _ilIsRoot :: Bool
|
||||
, _ilIsSelected :: Bool
|
||||
, _ilIsAttached :: Bool
|
||||
, _ilEquipPosition :: Maybe EquipPosition
|
||||
, _ilEquipSite :: Maybe EquipSite
|
||||
}
|
||||
| OnTurret {_ilTuID :: Int}
|
||||
| OnFloor {_ilFlID :: NewInt FloorInt}
|
||||
|
||||
@@ -18,7 +18,7 @@ data EquipEffect = EquipEffect
|
||||
{ _eeUse :: Euse --Item -> Creature -> World -> World
|
||||
, _eeOnEquip :: ItmCrWdWd --Item -> Creature -> World -> World
|
||||
, _eeOnRemove :: ItmCrWdWd --Item -> Creature -> World -> World
|
||||
, _eeSite :: EquipSite
|
||||
, _eeType :: EquipType
|
||||
, _eeParams :: EquipParams
|
||||
, _eeViewDist :: Maybe Float
|
||||
, _eeAttachPos :: Point3
|
||||
|
||||
@@ -18,23 +18,23 @@ data RightButtonOptions
|
||||
data EquipmentAllocation
|
||||
= DoNotMoveEquipment
|
||||
| PutOnEquipment
|
||||
{ _allocNewPos :: EquipPosition
|
||||
{ _allocNewPos :: EquipSite
|
||||
}
|
||||
| MoveEquipment
|
||||
{ _allocNewPos :: EquipPosition
|
||||
, _allocOldPos :: EquipPosition
|
||||
{ _allocNewPos :: EquipSite
|
||||
, _allocOldPos :: EquipSite
|
||||
}
|
||||
| SwapEquipment
|
||||
{ _allocNewPos :: EquipPosition
|
||||
, _allocOldPos :: EquipPosition
|
||||
{ _allocNewPos :: EquipSite
|
||||
, _allocOldPos :: EquipSite
|
||||
, _allocSwapID :: Int
|
||||
}
|
||||
| ReplaceEquipment
|
||||
{ _allocNewPos :: EquipPosition
|
||||
{ _allocNewPos :: EquipSite
|
||||
, _allocRemoveID :: Int
|
||||
}
|
||||
| RemoveEquipment
|
||||
{ _allocOldPos :: EquipPosition
|
||||
{ _allocOldPos :: EquipSite
|
||||
}
|
||||
--deriving (Eq, Ord, Show, Read) --Generic, Flat)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user