189 lines
4.0 KiB
Haskell
189 lines
4.0 KiB
Haskell
module Dodge.Item.Scope (
|
|
underBarrelSlot,
|
|
gimbal,
|
|
gyroscope,
|
|
stickyMod,
|
|
shellModule,
|
|
zoomScope,
|
|
targetingScope,
|
|
remoteScreen,
|
|
joystick,
|
|
remoteDetonator,
|
|
homingModule,
|
|
arHUD,
|
|
bulletModule,
|
|
bulletPayloadModule,
|
|
smokeReducer,
|
|
itemScan,
|
|
introScan,
|
|
mapper,
|
|
dropper,
|
|
clicker,
|
|
copier,
|
|
nulgate,
|
|
unigate,
|
|
bingate,
|
|
) where
|
|
|
|
import Control.Lens
|
|
import Dodge.Data.Item
|
|
import Dodge.Default.Item
|
|
|
|
zoomScope :: Item
|
|
zoomScope =
|
|
defHeldItem
|
|
& itType .~ ATTACH ZOOMSCOPE
|
|
& itUse .~ UseScope OpticScope{_opticPos = 0, _opticZoom = 1, _opticDefaultZoom = 0.5}
|
|
|
|
targetingScope :: TargetingType -> Item
|
|
targetingScope tt =
|
|
defHeldItem
|
|
& itType .~ TARGETING tt
|
|
& itUse .~ UseNothing
|
|
& itTargeting
|
|
.~ ItTargeting
|
|
{ _itTgPos = Nothing
|
|
, _itTgID = Nothing
|
|
, _itTgActive = False
|
|
}
|
|
|
|
homingModule :: Item
|
|
homingModule =
|
|
defHeldItem
|
|
& itType .~ ATTACH HOMINGMODULE
|
|
& itUse .~ UseAttach APNothing
|
|
|
|
stickyMod :: Item
|
|
stickyMod =
|
|
defHeldItem
|
|
& itType .~ STICKYMOD
|
|
& itUse .~ UseNothing
|
|
|
|
introScan :: IntroScanType -> Item
|
|
introScan t =
|
|
defHeldItem
|
|
& itType .~ INTROSCAN t
|
|
& itUse .~ UseNothing
|
|
|
|
itemScan :: Item
|
|
itemScan =
|
|
defHeldItem
|
|
& itType .~ ITEMSCAN
|
|
& itUse .~ UseNothing
|
|
|
|
-- & itEffect . ieOnDrop .~ ItemCancelExamineInventory
|
|
|
|
mapper :: Item
|
|
mapper =
|
|
defHeldItem
|
|
& itType .~ MAPPER
|
|
& itUse .~ UseMapper mempty mempty
|
|
|
|
dropper :: InventoryPathing -> Item
|
|
dropper x =
|
|
defHeldItem
|
|
& itType .~ DROPPER x
|
|
& itUse .~ UseInt 0
|
|
|
|
clicker :: InventoryPathing -> Item
|
|
clicker x =
|
|
defHeldItem
|
|
& itType .~ CLICKER x
|
|
& itUse .~ UseInt 0
|
|
|
|
copier :: InventoryPathing -> Item
|
|
copier x =
|
|
defHeldItem
|
|
& itType .~ COPIER x
|
|
& itUse .~ UseValue (Left 0)
|
|
& itScroll .~ ItemScrollInt 0
|
|
|
|
nulgate :: Item
|
|
nulgate =
|
|
defHeldItem
|
|
& itType .~ NULGATE
|
|
& itUse .~ UseNothing
|
|
& itScroll .~ ItemScrollIntRange 2 0
|
|
|
|
unigate :: Item
|
|
unigate =
|
|
defHeldItem
|
|
& itType .~ UNIGATE
|
|
& itUse .~ UseNothing
|
|
& itScroll .~ ItemScrollIntRange 4 0
|
|
|
|
bingate :: Item
|
|
bingate =
|
|
defHeldItem
|
|
& itType .~ BINGATE
|
|
& itUse .~ UseNothing
|
|
& itScroll .~ ItemScrollIntRange 16 0
|
|
|
|
bulletModule :: BulletMod -> Item
|
|
bulletModule bm =
|
|
defHeldItem
|
|
& itType .~ BULLETMOD bm
|
|
& itUse .~ UseBulletMod{_ubMod = bm}
|
|
|
|
shellModule :: Payload -> Item
|
|
shellModule p =
|
|
defHeldItem
|
|
& itType .~ ATTACH (SHELLPAYLOAD p)
|
|
& itUse .~ UseNothing
|
|
|
|
-- bulletTargetingModule :: BulletTrajectoryType -> Item
|
|
-- bulletTargetingModule = bulletModule . BulletModTrajectory
|
|
|
|
bulletPayloadModule :: BulletPayload -> Item
|
|
bulletPayloadModule = bulletModule . BulletModPayload
|
|
|
|
arHUD :: Item
|
|
arHUD =
|
|
defHeldItem
|
|
& itType .~ ARHUD
|
|
& itUse .~ UseNothing
|
|
|
|
remoteScreen :: Item
|
|
remoteScreen =
|
|
defHeldItem
|
|
& itType .~ ATTACH REMOTESCREEN
|
|
& itUse .~ UseAttach (APProjectiles [])
|
|
|
|
remoteDetonator :: Item
|
|
remoteDetonator =
|
|
defHeldItem
|
|
& itType .~ ATTACH REMOTEDETONATOR
|
|
& itUse .~ UseAttach (APProjectiles [])
|
|
|
|
joystick :: Item
|
|
joystick =
|
|
defHeldItem
|
|
& itType .~ ATTACH JOYSTICK
|
|
& itUse .~ UseAttach APNothing
|
|
|
|
-- & itUse . uaParams .~ APLinkProjectile Nothing
|
|
|
|
gimbal :: Item
|
|
gimbal =
|
|
defHeldItem
|
|
& itType .~ ATTACH GIMBAL
|
|
& itUse .~ UseAttach APNothing
|
|
|
|
gyroscope :: Item
|
|
gyroscope =
|
|
defHeldItem
|
|
& itType .~ ATTACH GYROSCOPE
|
|
& itUse .~ UseAttach APNothing
|
|
|
|
underBarrelSlot :: Item
|
|
underBarrelSlot =
|
|
defHeldItem
|
|
& itType .~ ATTACH UNDERBARRELSLOT
|
|
& itUse .~ UseAttach APNothing
|
|
|
|
smokeReducer :: Item
|
|
smokeReducer =
|
|
defHeldItem
|
|
& itType .~ ATTACH SMOKEREDUCER
|
|
& itUse .~ UseAttach APNothing
|