Continue refactor of reloading
This commit is contained in:
@@ -22,7 +22,7 @@ import Control.Lens
|
||||
--import Control.Monad
|
||||
|
||||
rewindGun :: Item
|
||||
rewindGun = defaultGun
|
||||
rewindGun = defaultLeftItem
|
||||
{ _itInvColor = cyan
|
||||
, _itConsumption = ChargeableAmmo
|
||||
{ _wpMaxCharge = 250
|
||||
@@ -63,9 +63,8 @@ useRewindGun _ _ w = case _rewindWorlds w of
|
||||
|
||||
-- needs to shift this item to the current inventory slot
|
||||
shrinkGun :: Item
|
||||
shrinkGun = defaultGun
|
||||
{ _itConsumption = defaultAmmo
|
||||
, _itUse = defaultlUse {_lUse = hammerCheckL useShrinkGun}
|
||||
shrinkGun = defaultLeftItem
|
||||
{_itUse = defaultlUse {_lUse = hammerCheckL useShrinkGun}
|
||||
& useHammer .~ upHammer
|
||||
-- , _itFloorPict = shrinkGunPic
|
||||
, _itAttachment = AttachBool True
|
||||
@@ -89,9 +88,8 @@ useShrinkGun it cr w = if _atBool $ _itAttachment it
|
||||
( (itAttachment . atBool .~ isInUse) . (itCurseStatus .~ cstatus) )
|
||||
|
||||
blinkGun :: Item
|
||||
blinkGun = defaultGun
|
||||
blinkGun = defaultLeftItem
|
||||
{ _itInvColor = cyan
|
||||
, _itConsumption = defaultAmmo
|
||||
, _itUse = defaultlUse
|
||||
& lUse .~ hammerCheckL (shootL $ const blinkAction)
|
||||
& useHammer .~ upHammer
|
||||
@@ -107,20 +105,20 @@ unsafeBlinkGun = blinkGun
|
||||
& itUse . eqEq . eqViewDist ?~ 400
|
||||
|
||||
effectGun :: String -> (Creature -> World -> World) -> Item
|
||||
effectGun name eff = defaultGun
|
||||
effectGun name eff = defaultWeapon
|
||||
{ _itUse = defaultrUse
|
||||
& rUse .~ const eff
|
||||
& useMods .~ [hammerCheckI]
|
||||
}
|
||||
& itType . iyBase .~ EFFGUN name
|
||||
autoEffectGun :: String -> (Creature -> World -> World) -> Item
|
||||
autoEffectGun name eff = defaultGun
|
||||
autoEffectGun name eff = defaultWeapon
|
||||
{ _itUse = defaultrUse {_rUse = const eff}
|
||||
}
|
||||
& itType . iyBase .~ AUTOEFFGUN name
|
||||
forceFieldGun :: Item
|
||||
forceFieldGun = defaultGun
|
||||
{ _itConsumption = defaultAmmo & laType .~ ForceFieldAmmo forceField
|
||||
forceFieldGun = defaultWeapon
|
||||
{ _itConsumption = defaultLoadable & laAmmoType .~ ForceFieldAmmo forceField
|
||||
, _itUse = ruseInstant useForceFieldGun (HasHammer HammerUp)
|
||||
[ hammerCheckI , ammoCheckI , useAmmoAmount 1]
|
||||
-- , _itFloorPict = \_ -> (,) emptySH $ onLayer FlItLayer $ polygon $ map toV2 [(-4,-4),(-4,4),(4,4),(4,0),(0,0),(0,-4)]
|
||||
|
||||
Reference in New Issue
Block a user