Stop gibbed/pitted creatures from pushing other creatures

This commit is contained in:
2026-03-26 23:09:23 +00:00
parent 9e42bb4117
commit 8b088425a9
3 changed files with 218 additions and 197 deletions
+18 -17
View File
@@ -34,23 +34,24 @@ import Data.Monoid
import RandomHelp
testStringInit :: Universe -> [String]
testStringInit u = (fmap show $ u ^.. uvWorld . cWorld . lWorld . creatures . each . crWallTouch)
<> fromMaybe [] (do
w1 <- u ^? uvWorld . cWorld . lWorld . walls . ix 18
w2 <- u ^? uvWorld . cWorld . lWorld . walls . ix 61
let
f = uncurry (-) . (^. wlLine)
g = argV . f
h = normalizeV . uncurry (-) . (^. wlLine)
a = angleVV (f w1) (f w2)
return [show $ wlWlCrush w1 w2, show a , show (f w1), show (f w2)
, show $ g w1
, show $ g w2
, show $ h w1
, show $ h w2
, show (norm (h w1 + h w2))
]
)
testStringInit _ = []
-- a (fmap show $ u ^.. uvWorld . cWorld . lWorld . creatures . each . crWallTouch)
-- a <> fromMaybe [] (do
-- a w1 <- u ^? uvWorld . cWorld . lWorld . walls . ix 18
-- a w2 <- u ^? uvWorld . cWorld . lWorld . walls . ix 61
-- a let
-- a f = uncurry (-) . (^. wlLine)
-- a g = argV . f
-- a h = normalizeV . uncurry (-) . (^. wlLine)
-- a a = angleVV (f w1) (f w2)
-- a return [show $ wlWlCrush w1 w2, show a , show (f w1), show (f w2)
-- a , show $ g w1
-- a , show $ g w2
-- a , show $ h w1
-- a , show $ h w2
-- a , show (norm (h w1 + h w2))
-- a ]
-- a )
-- <> (fmap show $ u ^.. uvWorld . cWorld . lWorld . machines . each . mcMaterial)
--testStringInit u = map show (u ^.. uvWorld . cWorld . lWorld . machines . traverse . mcDir)
--testStringInit u = map show