Cleanup constructors FooUse -> UseFoo
This commit is contained in:
@@ -229,14 +229,10 @@ itemInvSideEffect cr itm = case _itType itm of
|
||||
-- this probably needs to be set to null when dropped as well?
|
||||
updateItemTargeting :: TargetingType -> Creature -> Item -> World -> World
|
||||
updateItemTargeting tt cr itm w = case tt of
|
||||
_
|
||||
| not isattached ->
|
||||
w
|
||||
& pointItUse . tgPos .~ Nothing
|
||||
& pointItUse . tgActive .~ False
|
||||
TARGETLASER
|
||||
| crIsAiming cr ->
|
||||
w
|
||||
_ | not isattached -> w
|
||||
& pointItUse . tgPos .~ Nothing
|
||||
& pointItUse . tgActive .~ False
|
||||
TARGETLASER | crIsAiming cr -> w
|
||||
& cWorld . lWorld . lasers
|
||||
.:~ LaserStart
|
||||
{ _lpPhaseV = 1
|
||||
@@ -246,19 +242,15 @@ updateItemTargeting tt cr itm w = case tt of
|
||||
, _lpType = TargetingLaser (_itID itm)
|
||||
}
|
||||
TARGETLASER -> w & pointItUse . tgPos .~ Nothing
|
||||
TargetRBPress
|
||||
| rbpressed ->
|
||||
w
|
||||
TargetRBPress | rbpressed -> w
|
||||
& pointItUse . tgPos %~ maybe (Just $ mouseWorldPos (w ^. input) (w ^. wCam)) Just
|
||||
& pointItUse . tgActive .~ True
|
||||
TargetRBPress ->
|
||||
w
|
||||
TargetRBPress -> w
|
||||
& pointItUse . tgPos .~ Nothing
|
||||
& pointItUse . tgActive .~ False
|
||||
TargetRBCreature -> w & pointItUse %~ setRBCreatureTargeting cr w
|
||||
TargetCursor ->
|
||||
w & pointItUse
|
||||
.~ TargetingUse
|
||||
TargetCursor -> w
|
||||
& pointItUse .~ UseTargeting
|
||||
(Just (mouseWorldPos (w ^. input) (w ^. wCam)))
|
||||
Nothing
|
||||
True
|
||||
|
||||
Reference in New Issue
Block a user