Continue reload removal
This commit is contained in:
@@ -4,7 +4,6 @@ module Dodge.Creature.ReaderUpdate (
|
||||
targetYouWhenCognizant,
|
||||
overrideMeleeCloseTarget,
|
||||
watchUpdateStrat,
|
||||
reloadOverride,
|
||||
overrideInternal,
|
||||
searchIfDamaged,
|
||||
goToTarget,
|
||||
@@ -24,7 +23,7 @@ import LensHelp
|
||||
import Data.Bifunctor
|
||||
import Data.Maybe
|
||||
import Dodge.Base
|
||||
import Dodge.Creature.Volition
|
||||
--import Dodge.Creature.Volition
|
||||
import Dodge.Data.CreatureEffect
|
||||
import Dodge.Data.World
|
||||
import Dodge.Zoning.Creature
|
||||
@@ -170,22 +169,6 @@ doStrategyActions cr = case cr ^? crActionPlan . apStrategy of
|
||||
& crActionPlan . apStrategy .~ strat
|
||||
_ -> cr
|
||||
|
||||
reloadOverride :: Creature -> Creature
|
||||
reloadOverride cr = fromMaybe cr $ do
|
||||
guard $ cr ^. crStance . posture == Aiming
|
||||
itRef <- cr ^? crManipulation . manObject . inInventory . ispItem
|
||||
guard $ cr ^? crInv . ix (itRef + 1) . itUse . amagLoadStatus . iaLoaded == Just 0
|
||||
return $ cr & crActionPlan . apStrategy .~ StrategyActions Reload reloadActions
|
||||
where
|
||||
reloadActions =
|
||||
[ holsterWeapon
|
||||
, 1
|
||||
`WaitThen` DoActionWhileInterrupt
|
||||
NoAction
|
||||
(WdCrBlfromCrBl CrIsReloading)
|
||||
(DoImpulses [ChangeStrategy WatchAndWait])
|
||||
]
|
||||
|
||||
overrideInternal :: (Creature -> Bool) -> (Creature -> Creature) -> Creature -> Creature
|
||||
overrideInternal test update cr
|
||||
| test cr = update cr
|
||||
|
||||
Reference in New Issue
Block a user