Continue to refactor item datatypes, add a shape to rockets

This commit is contained in:
2021-11-27 22:05:12 +00:00
parent 652af6b0a9
commit fe02739621
15 changed files with 135 additions and 78 deletions
+4 -9
View File
@@ -1,7 +1,6 @@
module Dodge.Default.Weapon
where
import Dodge.Data
import Dodge.Item.Weapon.ExtraEffect
import Dodge.Item.Weapon.InventoryDisplay
import Dodge.Item.Draw
import Picture
@@ -29,7 +28,7 @@ ruseRate :: Int
-> ItemUse
ruseRate i f ht usemods = RightUse
{ _rUse = f
, _useDelay = DelayRate
, _useDelay = FixedRate
{ _rateMax = i
, _rateTime = 0
}
@@ -54,7 +53,7 @@ ruseInstant f ht usemods = RightUse
defaultrUse :: ItemUse
defaultrUse = RightUse
{ _rUse = \_ _ -> id
, _useDelay = DelayRate {_rateMax = 8, _rateTime = 0}
, _useDelay = FixedRate {_rateMax = 8, _rateTime = 0}
, _useMods = []
, _useHammer = HasHammer HammerUp
, _useAim = defaultAimParams
@@ -62,7 +61,7 @@ defaultrUse = RightUse
defaultlUse :: ItemUse
defaultlUse = LeftUse
{ _lUse = \_ _ -> id
, _useDelay = DelayRate {_rateMax = 8, _rateTime = 0}
, _useDelay = FixedRate {_rateMax = 8, _rateTime = 0}
, _useHammer = NoHammer
}
@@ -86,10 +85,6 @@ defaultGun = Weapon
, _itCurseStatus = Uncursed
, _itIdentity = Pistol
, _wpAmmo = defaultAmmo
, _wpMaxWarmUp = 0
, _wpCurWarmUp = 0
, _wpMaxCoolDown = 0
, _wpCurCoolDown = 0
, _itUse = defaultrUse
, _wpSpread = 0.02
, _wpRange = 20
@@ -102,7 +97,7 @@ defaultGun = Weapon
, _itScroll = \_ _ -> id
, _itAttachment = NoItAttachment
, _itID = Nothing
, _itEffect = wpRecock
, _itEffect = NoItEffect
, _itInvDisplay = basicWeaponDisplay
, _itInvColor = white
, _itTargeting = Nothing