Cleanup defaults

This commit is contained in:
2026-01-02 21:33:00 +00:00
parent 02da762f2f
commit 3cc439b877
20 changed files with 259 additions and 313 deletions
+68 -43
View File
@@ -25,139 +25,164 @@ module Dodge.Item.Scope (
bingate,
) where
import Dodge.Item.Attach
import Control.Lens
import Dodge.Data.Item
import Dodge.Default.Item
zoomScope :: Item
zoomScope = defaultHeldItem
& itType .~ ATTACH ZOOMSCOPE
& itUse .~ UseScope OpticScope{_opticPos = 0, _opticZoom = 1, _opticDefaultZoom = 0.5}
zoomScope =
defHeldItem
& itType .~ ATTACH ZOOMSCOPE
& itUse .~ UseScope OpticScope{_opticPos = 0, _opticZoom = 1, _opticDefaultZoom = 0.5}
targetingScope :: TargetingType -> Item
targetingScope tt = defaultHeldItem
targetingScope tt =
defHeldItem
& itType .~ TARGETING tt
& itUse .~ UseNothing
& itTargeting .~ ItTargeting
{ _itTgPos = Nothing
, _itTgID = Nothing
, _itTgActive = False
}
& itUse .~ UseNothing
& itTargeting
.~ ItTargeting
{ _itTgPos = Nothing
, _itTgID = Nothing
, _itTgActive = False
}
homingModule :: Item
homingModule = makeAttach HOMINGMODULE
homingModule =
defHeldItem
& itType .~ ATTACH HOMINGMODULE
& itUse .~ UseAttach APNothing
stickyMod :: Item
stickyMod =
defaultHeldItem
defHeldItem
& itType .~ STICKYMOD
& itUse .~ UseNothing
introScan :: IntroScanType -> Item
introScan t =
defaultHeldItem
defHeldItem
& itType .~ INTROSCAN t
& itUse .~ UseNothing
itemScan :: Item
itemScan =
defaultHeldItem
defHeldItem
& itType .~ ITEMSCAN
& itUse .~ UseNothing
-- & itEffect . ieOnDrop .~ ItemCancelExamineInventory
mapper :: Item
mapper =
defaultHeldItem
defHeldItem
& itType .~ MAPPER
& itUse .~ UseMapper mempty mempty
dropper :: InventoryPathing -> Item
dropper x =
defaultHeldItem
defHeldItem
& itType .~ DROPPER x
& itUse .~ UseInt 0
clicker :: InventoryPathing -> Item
clicker x =
defaultHeldItem
defHeldItem
& itType .~ CLICKER x
& itUse .~ UseInt 0
copier :: InventoryPathing -> Item
copier x =
defaultHeldItem
defHeldItem
& itType .~ COPIER x
& itUse .~ UseValue (Left 0)
& itScroll .~ ItemScrollInt 0
nulgate :: Item
nulgate =
defaultHeldItem
defHeldItem
& itType .~ NULGATE
& itUse .~ UseNothing
& itScroll .~ ItemScrollIntRange 2 0
unigate :: Item
unigate =
defaultHeldItem
defHeldItem
& itType .~ UNIGATE
& itUse .~ UseNothing
& itScroll .~ ItemScrollIntRange 4 0
bingate :: Item
bingate =
defaultHeldItem
defHeldItem
& itType .~ BINGATE
& itUse .~ UseNothing
& itScroll .~ ItemScrollIntRange 16 0
bulletModule :: BulletMod -> Item
bulletModule bm =
defaultHeldItem
defHeldItem
& itType .~ BULLETMOD bm
& itUse .~ UseBulletMod {_ubMod = bm}
& itUse .~ UseBulletMod{_ubMod = bm}
shellModule :: Payload -> Item
shellModule p = defaultHeldItem
shellModule p =
defHeldItem
& itType .~ ATTACH (SHELLPAYLOAD p)
& itUse .~ UseNothing
--bulletTargetingModule :: BulletTrajectoryType -> Item
--bulletTargetingModule = bulletModule . BulletModTrajectory
-- bulletTargetingModule :: BulletTrajectoryType -> Item
-- bulletTargetingModule = bulletModule . BulletModTrajectory
bulletPayloadModule :: BulletPayload -> Item
bulletPayloadModule = bulletModule . BulletModPayload
arHUD :: Item
arHUD = defaultHeldItem
& itType .~ ARHUD
& itUse .~ UseNothing
arHUD =
defHeldItem
& itType .~ ARHUD
& itUse .~ UseNothing
remoteScreen :: Item
remoteScreen = makeAttach REMOTESCREEN
-- & itUse . uaParams .~ APLinkProjectile Nothing
& itUse . uaParams .~ APProjectiles []
remoteScreen =
defHeldItem
& itType .~ ATTACH REMOTESCREEN
& itUse .~ UseAttach (APProjectiles [])
remoteDetonator :: Item
remoteDetonator = makeAttach REMOTEDETONATOR
-- & itUse .~ UseHammer HammerUp
& itUse . uaParams .~ APProjectiles []
remoteDetonator =
defHeldItem
& itType .~ ATTACH REMOTEDETONATOR
& itUse .~ UseAttach (APProjectiles [])
joystick :: Item
joystick = makeAttach JOYSTICK
-- & itUse . uaParams .~ APLinkProjectile Nothing
joystick =
defHeldItem
& itType .~ ATTACH JOYSTICK
& itUse .~ UseAttach APNothing
-- & itUse . uaParams .~ APLinkProjectile Nothing
gimbal :: Item
gimbal = makeAttach GIMBAL
gimbal =
defHeldItem
& itType .~ ATTACH GIMBAL
& itUse .~ UseAttach APNothing
gyroscope :: Item
gyroscope = makeAttach GYROSCOPE
gyroscope =
defHeldItem
& itType .~ ATTACH GYROSCOPE
& itUse .~ UseAttach APNothing
underBarrelSlot :: Item
underBarrelSlot = makeAttach UNDERBARRELSLOT
underBarrelSlot =
defHeldItem
& itType .~ ATTACH UNDERBARRELSLOT
& itUse .~ UseAttach APNothing
smokeReducer :: Item
smokeReducer = makeAttach SMOKEREDUCER
smokeReducer =
defHeldItem
& itType .~ ATTACH SMOKEREDUCER
& itUse .~ UseAttach APNothing