Fold aiming parameters into item use datatype

This commit is contained in:
2021-11-27 18:10:05 +00:00
parent 8639b2d428
commit 652af6b0a9
24 changed files with 135 additions and 155 deletions
+7 -7
View File
@@ -51,17 +51,17 @@ launcher = defaultGun
}
, _itUse = ruseRate 20 aRocketWithItemParams upHammer
[ ammoCheckI
, useTimeCheckI
, useTimeCheck
, withSoundStart tap4S
, useAmmo 1
]
& useAim . aimSpeed .~ 0.2
& useAim . aimRange .~ 0.5
& useAim . aimStance .~ TwoHandTwist
, _wpSpread = 0.02
, _wpRange = 20
, _itFloorPict = launcherPic
, _itAimingSpeed = 0.2
, _itAimingRange = 0.5
, _itEffect = NoItEffect
, _itAimStance = TwoHandTwist
}
launcherPic :: Item -> SPic
@@ -251,13 +251,13 @@ remoteLauncher = defaultGun
[ ammoCheckI
, hammerCheckI
]
& useAim . aimSpeed .~ 0.2
& useAim . aimRange .~ 0.5
& useAim . aimStance .~ TwoHandTwist
, _wpSpread = 0.02
, _wpRange = 20
, _itFloorPict = launcherPic
, _itAimingSpeed = 0.2
, _itAimingRange = 0.5
, _itAttachment = ItScope (V2 0 0) 0 1 True
, _itAimStance = TwoHandTwist
}
fireRemoteLauncher :: Creature -> World -> World