Delete some reified action/impulse stuff

This commit is contained in:
2025-10-15 20:37:22 +01:00
parent 4d12d6cf2b
commit fe95bf381b
5 changed files with 5 additions and 58 deletions
-1
View File
@@ -130,7 +130,6 @@ performAction cr w ac = case ac of
tcr <- w ^? cWorld . lWorld . creatures . ix i
return $ ([TurnTo (tcr ^. crPos . _xy +.+ rotateV (_crDir tcr) p)], Nothing)
UseSelf f -> performAction cr w $ doCrAc f cr
UseAheadPos f -> performAction cr w (doP2Ac f (cr ^. crPos . _xy +.+ 20 *.* unitVectorAtAngle (_crDir cr)))
UseMvTargetPos f -> performAction cr w $ doMP2Ac f $ _mvToPoint $ _crIntention cr
ArbitraryAction f -> performAction cr w (doCrWdAc f cr w)
DoImpulsesAlongside sideImp mainAc -> case performAction cr w mainAc of
-7
View File
@@ -62,18 +62,11 @@ followImpulse cr w imp = case imp of
DropItem -> undefined
ChangeStrategy strat -> crup $ cr & crActionPlan . apStrategy .~ strat
AddGoal gl -> crup $ cr & crActionPlan . apGoal .:~ gl
ArbitraryImpulseFunction f -> crup $ doWdCrCr f w cr
ArbitraryImpulse f -> followImpulse cr w (doCrWdImp f cr w)
ArbitraryImpulseEffect f -> (doCrWdWd f cr, cr)
-- ImpulseUseTargetCID f -> fromMaybe (crup cr) $ do
-- i <- cr ^? crIntention . targetCr . _Just
-- tcr <- w ^? cWorld . lWorld . creatures . ix i
-- return $ followImpulse cr w (doIntImp f $ _crID tcr)
ImpulseUseTarget f -> fromMaybe (crup cr) $ do
i <- cr ^? crIntention . targetCr . _Just
tcr <- w ^? cWorld . lWorld . creatures . ix i
return $ followImpulse cr w (doCrImp f tcr)
ImpulseUseAheadPos f -> followImpulse cr w (doP2Imp f (cr ^. crPos . _xy +.+ 20 *.* unitVectorAtAngle (_crDir cr)))
MvForward -> crup $ crMvForward speed (w ^. cWorld . lWorld) cr
MvTurnToward p ->
crup $