Simplify creature impulse chain

This commit is contained in:
2025-10-18 14:34:05 +01:00
parent ebc4b9d715
commit b43168ae33
4 changed files with 44 additions and 50 deletions
+5 -1
View File
@@ -1,5 +1,6 @@
module Dodge.Humanoid where
import Dodge.Creature.Impulse
import Linear
import Data.Maybe
import Dodge.Creature.Action
@@ -180,7 +181,10 @@ updateHumanoid cr = case cr ^?! crType of
-- ]
humanoidAIList :: [World -> Creature -> Creature] -> Creature -> World -> World
humanoidAIList = impulsiveAIBefore . chainCreatureUpdates
humanoidAIList l cr w = followImpulses cid $
w & cWorld . lWorld . creatures . ix cid %~ chainCreatureUpdates l w
where
cid = cr ^. crID
chooseMovementPistol :: Creature -> World -> Action
chooseMovementPistol cr w =