Cleanup constructors FooUse -> UseFoo
This commit is contained in:
@@ -79,27 +79,9 @@ lockInvFor i f it cr =
|
||||
-- pos = addZ 0 $ _crPos cr +.+ (_crRad cr + 15) *.* unitVectorAtAngle dir
|
||||
-- ps = replicateM 20 randOnUnitSphere & evalState $ _randGen w
|
||||
|
||||
-- TODO create a trigger that does different things on first and continued
|
||||
-- fire.
|
||||
--ammoCheckI :: ChainEffect
|
||||
--ammoCheckI eff itm cr w = fromMaybe (failsound w) $ do
|
||||
-- atype <- itm ^? ldtValue . itUse . heldAmmoTypes . ix 0
|
||||
-- leftitms <- itm ^? ldtLeft
|
||||
-- mag <- lookup (AmmoInLink 0 atype) leftitms
|
||||
-- x <- mag ^? ldtValue . itUse . amagLoadStatus . iaLoaded
|
||||
-- guard $ x > 0
|
||||
-- return $ eff itm cr w -- & cWorld . lWorld . creatures . ix (_crID cr) %~ crCancelReloading
|
||||
-- where
|
||||
-- failsound = case w ^? input . mouseButtons . ix SDL.ButtonLeft of
|
||||
-- Just 0 -> soundStart (CrWeaponSound (_crID cr) 0) (_crPos cr) click1S Nothing
|
||||
-- _ -> soundContinue (CrWeaponSound (_crID cr) 0) (_crPos cr) click1S Nothing
|
||||
|
||||
itUseCharge :: Int -> Item -> Item
|
||||
itUseCharge x = itUse . leftConsumption . arLoaded %~ (max 0 . subtract x)
|
||||
|
||||
--itUseAmmo :: Int -> Item -> Item
|
||||
--itUseAmmo x = itUse . heldConsumption . laSource . _InternalSource . iaLoaded %~ (max 0 . subtract x)
|
||||
|
||||
--{- | Fires at an increasing rate.
|
||||
--Has different effect after first fire.
|
||||
--Applies ammo check and use cooldown check.
|
||||
|
||||
Reference in New Issue
Block a user