Improve bee crit update
This commit is contained in:
@@ -187,6 +187,7 @@ updateCalmBee cr cid w
|
|||||||
& tocr . crActionPlan . apAction .~ NoAction
|
& tocr . crActionPlan . apAction .~ NoAction
|
||||||
| Just (tcr,_) <- gettarg = w
|
| Just (tcr,_) <- gettarg = w
|
||||||
& tocr . crActionPlan . apAction .~ PathTo (tcr ^. crPos . _xy) NoAction
|
& tocr . crActionPlan . apAction .~ PathTo (tcr ^. crPos . _xy) NoAction
|
||||||
|
| Just (HarvestFrom{}) <- cr ^? crActionPlan . apStrategy = startsearch
|
||||||
| Just (SearchTimed 0) <- cr ^? crActionPlan . apStrategy = starthivereturn
|
| Just (SearchTimed 0) <- cr ^? crActionPlan . apStrategy = starthivereturn
|
||||||
| Just PathTo{} <- cr ^? crActionPlan . apAction = w
|
| Just PathTo{} <- cr ^? crActionPlan . apAction = w
|
||||||
& tocr . crActionPlan . apStrategy . searchTimer %~ (max 0 . subtract 1)
|
& tocr . crActionPlan . apStrategy . searchTimer %~ (max 0 . subtract 1)
|
||||||
|
|||||||
@@ -48,7 +48,8 @@ isBee cr = case cr ^. crType of
|
|||||||
_ -> False
|
_ -> False
|
||||||
|
|
||||||
testStringInit :: Universe -> [String]
|
testStringInit :: Universe -> [String]
|
||||||
testStringInit u = u ^.. tocrs . each . filtered isBee . crActionPlan . apStrategy . to show
|
testStringInit _ = mempty
|
||||||
|
--u = u ^.. tocrs . each . filtered isBee . crActionPlan . apStrategy . to show
|
||||||
-- u ^.. tocrs . ix 1 . crPos . _xy . to show
|
-- u ^.. tocrs . ix 1 . crPos . _xy . to show
|
||||||
-- <> u ^.. tocrs . ix 1 . crType . slimeCompression . to show
|
-- <> u ^.. tocrs . ix 1 . crType . slimeCompression . to show
|
||||||
-- <> u ^.. tocrs . ix 1 . crType . slimeCompression . to norm . to show
|
-- <> u ^.. tocrs . ix 1 . crType . slimeCompression . to norm . to show
|
||||||
|
|||||||
Reference in New Issue
Block a user