Remove a usage of StrategyActions
This commit is contained in:
@@ -149,19 +149,12 @@ goToTarget w cr = case cr ^? crIntention . mvToPoint . _Just of
|
||||
Just p -> cr & crActionPlan . apAction .~ [PathTo p]
|
||||
_ -> viewTarget w cr
|
||||
|
||||
--lookAroundSelf :: Action
|
||||
--lookAroundSelf = UseSelf CrTurnAround
|
||||
|
||||
viewTarget :: World -> Creature -> Creature
|
||||
viewTarget w cr = case cr ^? crIntention . viewPoint . _Just of
|
||||
Just p
|
||||
| hasLOSIndirect p (cr ^. crPos . _xy) w ->
|
||||
cr
|
||||
& crActionPlan . apAction
|
||||
.~ [TurnToPoint p]
|
||||
-- %~ replaceNullWith
|
||||
-- ( TurnToPoint p
|
||||
-- )
|
||||
& crActionPlan . apAction .~ [TurnToPoint p]
|
||||
& crIntention . viewPoint .~ Nothing
|
||||
& crActionPlan . apStrategy .~ Investigate
|
||||
| otherwise ->
|
||||
|
||||
Reference in New Issue
Block a user