Distinguish between selected item and root-selected item

This commit is contained in:
2024-09-21 21:59:53 +01:00
parent 2154abfb1d
commit 31b5db6e9e
33 changed files with 313 additions and 281 deletions
+9 -9
View File
@@ -146,10 +146,10 @@ updateHumanoid cr = case cr ^?! crType . humanoidAI of
defaultImpulsive
[ sentinelExtraWatchUpdate
[
( const $ not . crWeaponReady
, \_ _ -> StrategyActions Reload reloadActions
)
,
-- ( const $ not . crWeaponReady
-- , \_ _ -> StrategyActions Reload reloadActions
-- )
-- ,
( const $ not . crSafeDistFromTarg 150
, \_ _ ->
StrategyActions
@@ -172,11 +172,11 @@ updateHumanoid cr = case cr ^?! crType . humanoidAI of
InanimateAI -> id
where
drawwp = DoActionIfElse NoAction (WdCrBlfromCrBl CrIsAiming) (DoActionThen drawWeapon (WaitThen 50 NoAction))
reloadActions =
[ holsterWeapon
--, WaitThen 1 $ DoActionWhileInterrupt NoAction (WdCrBlfromCrBl CrIsReloading) (DoImpulses [ChangeStrategy WatchAndWait])
, WaitThen 1 $ (DoImpulses [ChangeStrategy WatchAndWait])
]
-- reloadActions =
-- [ holsterWeapon
-- --, WaitThen 1 $ DoActionWhileInterrupt NoAction (WdCrBlfromCrBl CrIsReloading) (DoImpulses [ChangeStrategy WatchAndWait])
-- , WaitThen 1 $ (DoImpulses [ChangeStrategy WatchAndWait])
-- ]
humanoidAIList ::
[World -> Creature -> Creature] ->