Allow for selection of equipment position
This commit is contained in:
+43
-1
@@ -121,6 +121,7 @@ data World = World
|
||||
, _lightSources :: IM.IntMap LightSource
|
||||
, _tempLightSources :: [TempLightSource]
|
||||
, _closeObjects :: [Either FloorItem Button]
|
||||
, _rbOptions :: RightButtonOptions
|
||||
, _seenLocations :: IM.IntMap (World -> Point2,String)
|
||||
, _selLocation :: Int
|
||||
, _sideEffects :: Universe -> IO Universe
|
||||
@@ -139,6 +140,44 @@ data HUDElement = DisplayInventory {_subInventory :: SubInventory}
|
||||
| DisplayCarte
|
||||
-- deriving (Eq,Ord,Show)
|
||||
|
||||
data RightButtonOptions
|
||||
= NoRightButtonOptions
|
||||
| EquipOptions
|
||||
{_opEquip :: [EquipPosition]
|
||||
,_opSel :: Int
|
||||
,_opCurInvPos :: Int
|
||||
,_opAllocateEquipment :: AllocateEquipment
|
||||
,_opActivateEquipment :: ActivateEquipment
|
||||
}
|
||||
|
||||
data ActivateEquipment
|
||||
= ActivateEquipment {_activateEquipment :: Int }
|
||||
| DeactivateEquipment {_deactivateEquipment :: Int}
|
||||
| ActivateDeactivateEquipment {_activateEquipment :: Int ,_deactivateEquipment :: Int}
|
||||
| NoChangeActivateEquipment
|
||||
|
||||
data AllocateEquipment
|
||||
= DoNotMoveEquipment
|
||||
| PutOnEquipment
|
||||
{ _allocNewPos :: EquipPosition
|
||||
}
|
||||
| MoveEquipment
|
||||
{ _allocNewPos :: EquipPosition
|
||||
, _allocOldPos :: EquipPosition
|
||||
}
|
||||
| SwapEquipment
|
||||
{ _allocNewPos :: EquipPosition
|
||||
, _allocOldPos :: EquipPosition
|
||||
, _allocSwapID :: Int
|
||||
}
|
||||
| ReplaceEquipment
|
||||
{ _allocNewPos :: EquipPosition
|
||||
, _allocRemoveID :: Int
|
||||
}
|
||||
| RemoveEquipment
|
||||
{ _allocOldPos :: EquipPosition
|
||||
}
|
||||
|
||||
data SubInventory
|
||||
= NoSubInventory
|
||||
| TweakInventory
|
||||
@@ -372,6 +411,7 @@ data ItemUse
|
||||
, _useMods :: [(Item -> Creature -> World -> World) -> Item -> Creature -> World -> World]
|
||||
, _useHammer :: HammerType
|
||||
, _useAim :: AimParams
|
||||
, _heldScroll :: Float -> Creature -> Item -> Item
|
||||
}
|
||||
| LeftUse
|
||||
{ _lUse :: Item -> Creature -> World -> World
|
||||
@@ -431,7 +471,6 @@ data Item = Item
|
||||
, _itConsumption :: ItemConsumption
|
||||
, _itUse :: ItemUse
|
||||
, _itEquipPict :: Creature -> Item -> SPic
|
||||
, _itScroll :: Float -> Creature -> Item -> Item
|
||||
, _itType :: CombineType
|
||||
, _itAttachment :: ItAttachment
|
||||
, _itID :: Maybe Int
|
||||
@@ -1318,3 +1357,6 @@ makeLenses ''BeamType
|
||||
makeLenses ''WorldBeams
|
||||
makeLenses ''ArcStep
|
||||
makeLenses ''CreatureStatistics
|
||||
makeLenses ''RightButtonOptions
|
||||
makeLenses ''AllocateEquipment
|
||||
makeLenses ''ActivateEquipment
|
||||
|
||||
Reference in New Issue
Block a user