Speed up slime rad change

This commit is contained in:
2026-05-08 10:50:36 +01:00
parent ad998fb622
commit 34d8425520
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -301,8 +301,8 @@ setSlimeDir cid cr w = do
doSlimeRadChange :: Creature -> Creature
doSlimeRadChange = crType . slimeSlimeChange %~ f
where
f x | x > 100 = x - 100
| x < -100 = x + 100
f x | x > 1000 = x - 1000
| x < -1000 = x + 1000
| otherwise = 0
splitSlimeCrit' :: Point2 -> Point2 -> Int -> Creature -> World -> Maybe World
+2 -2
View File
@@ -58,8 +58,8 @@ crs :: Universe -> [Creature]
crs u = u ^.. uvWorld . cWorld . lWorld . creatures . each
testStringInit :: Universe -> [String]
testStringInit u = [show . getSum $ foldMap (Sum . crslime) (crs u)]
--u = u ^.. tocrs . each . filtered isBee . crActionPlan . apStrategy . to show
testStringInit u = -- [show . getSum $ foldMap (Sum . crslime) (crs u)]
u ^.. tocrs . each . crType . slimeSlimeChange . 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 norm . to show