Remove old ammo code, add magazines to some test loadouts
This commit is contained in:
@@ -174,7 +174,7 @@ 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 . attachParams . ammoAttachParams . iaLoaded == Just 0
|
||||
guard $ cr ^? crInv . ix (itRef + 1) . itUse . attachParams . ammoLoadStatus . iaLoaded == Just 0
|
||||
return $ cr & crActionPlan . apStrategy .~ StrategyActions Reload reloadActions
|
||||
where
|
||||
reloadActions =
|
||||
|
||||
@@ -42,7 +42,7 @@ crIsReloading cr = case cr ^? crManipulation . manObject . inInventory . iselAct
|
||||
crWeaponReady :: Creature -> Bool
|
||||
crWeaponReady cr = fromMaybe False $ do
|
||||
i <- cr ^? crManipulation . manObject . inInventory . ispItem
|
||||
x <- cr ^? crInv . ix (i + 1) . itUse . attachParams . ammoAttachParams . iaLoaded
|
||||
x <- cr ^? crInv . ix (i + 1) . itUse . attachParams . ammoLoadStatus . iaLoaded
|
||||
return (x > 0)
|
||||
|
||||
crCanSeeCr :: Creature -> (World, Creature) -> Bool
|
||||
|
||||
Reference in New Issue
Block a user