Commit before improving item targeting
This commit is contained in:
+18
-1
@@ -320,7 +320,7 @@ data FloorItem = FlIt { _flIt :: Item , _flItPos :: Point2 , _flItRot :: Float,
|
||||
data ItemPos
|
||||
= InInv { _itCrId :: Int , _itInvId :: Int }
|
||||
| OnFloor { _itFlID :: Int }
|
||||
data ItemUse
|
||||
data ItemUse
|
||||
= RightUse
|
||||
{ _rUse :: Item -> Creature -> World -> World
|
||||
, _useDelay :: UseDelay
|
||||
@@ -377,6 +377,13 @@ data Item = Item
|
||||
, _itModules :: M.Map ModuleSlot ItemModule
|
||||
, _itScope :: Scope
|
||||
}
|
||||
data Targeting
|
||||
= NoTargeting
|
||||
| Targeting
|
||||
{ _tgPos :: Maybe Point2
|
||||
, _tgUpdate :: Item -> Creature -> World -> Maybe Point2
|
||||
, _tgDraw :: Item -> Creature -> World -> Picture
|
||||
}
|
||||
data ModuleSlot
|
||||
= ModBullet
|
||||
| ModRifleMag
|
||||
@@ -620,6 +627,15 @@ data Prop
|
||||
, _prDraw :: Prop -> SPic
|
||||
, _prToggle :: Bool
|
||||
}
|
||||
| RemoteShell
|
||||
{ _pjPos :: Point2
|
||||
, _pjStartPos :: Point2
|
||||
, _pjVel :: Point2
|
||||
, _prDraw :: Prop -> SPic
|
||||
, _pjID :: Int
|
||||
, _pjUpdate :: Prop -> World -> World
|
||||
, _pjPayload :: Point2 -> World -> World
|
||||
}
|
||||
| Shell
|
||||
{ _pjPos :: Point2
|
||||
, _pjStartPos :: Point2
|
||||
@@ -933,3 +949,4 @@ makeLenses ''Magnet
|
||||
makeLenses ''Gust
|
||||
makeLenses ''GunBarrels
|
||||
makeLenses ''ItemModule
|
||||
makeLenses ''Targeting
|
||||
|
||||
Reference in New Issue
Block a user