Cleanup constructors FooUse -> UseFoo

This commit is contained in:
2024-10-03 20:39:41 +01:00
parent 6b4cf596b1
commit 127d85e7ce
10 changed files with 49 additions and 92 deletions
+7 -8
View File
@@ -3,7 +3,6 @@ module Dodge.Item.Scope (
targetingScope,
remoteScreen,
homingModule,
fletchingModule,
bulletTargetingModule,
augmentedHUD,
bulletModule,
@@ -18,24 +17,25 @@ import Dodge.Default.Item
zoomScope :: Item
zoomScope = defaultHeldItem
& itType .~ ATTACH ZOOMSCOPE
& itUse .~ ScopeUse OpticScope{_opticPos = 0, _opticZoom = 1, _opticDefaultZoom = 0.5}
& itUse .~ UseScope OpticScope{_opticPos = 0, _opticZoom = 1, _opticDefaultZoom = 0.5}
targetingScope :: TargetingType -> Item
targetingScope tt = defaultHeldItem
& itType .~ TARGETING tt
& itUse .~ TargetingUse Nothing Nothing False
& itUse .~ UseTargeting
{ _tgPos = Nothing
, _tgID = Nothing
, _tgActive = False
}
homingModule :: Item
homingModule = makeAttach HOMINGMODULE
fletchingModule :: Item
fletchingModule = bulletTargetingModule FlechetteTrajectoryType
bulletModule :: BulletMod -> Item
bulletModule bm =
defaultHeldItem
& itType .~ BULLETMOD bm
& itUse .~ BulletModUse bm
& itUse .~ UseBulletMod {_ubMod = bm}
bulletTargetingModule :: BulletTrajectoryType -> Item
bulletTargetingModule = bulletModule . BulletModTrajectory
@@ -49,4 +49,3 @@ augmentedHUD = makeAttach AUGMENTEDHUD
remoteScreen :: Item
remoteScreen = makeAttach REMOTESCREEN
& itUse . uaParams .~ APLinkProjectile Nothing