Files
loop/src/Dodge/Item/Scope.hs
T

165 lines
3.6 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 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}
targetingScope :: TargetingType -> Item
targetingScope tt = defaultHeldItem
& itType .~ TARGETING tt
& itUse .~ UseNothing
& itTargeting .~ ItTargeting
{ _itTgPos = Nothing
, _itTgID = Nothing
, _itTgActive = False
}
homingModule :: Item
homingModule = makeAttach HOMINGMODULE
stickyMod :: Item
stickyMod =
defaultHeldItem
& itType .~ STICKYMOD
& itUse .~ UseNothing
introScan :: IntroScanType -> Item
introScan t =
defaultHeldItem
& itType .~ INTROSCAN t
& itUse .~ UseNothing
itemScan :: Item
itemScan =
defaultHeldItem
& itType .~ ITEMSCAN
& itUse .~ UseNothing
& itEffect . ieOnDrop .~ ItemCancelExamineInventory
mapper :: Item
mapper =
defaultHeldItem
& itType .~ MAPPER
& itUse .~ UseMapper mempty mempty
dropper :: InventoryPathing -> Item
dropper x =
defaultHeldItem
& itType .~ DROPPER x
& itUse .~ UseInt 0
clicker :: InventoryPathing -> Item
clicker x =
defaultHeldItem
& itType .~ CLICKER x
& itUse .~ UseInt 0
copier :: InventoryPathing -> Item
copier x =
defaultHeldItem
& itType .~ COPIER x
& itUse .~ UseValue (Left 0)
& itScroll .~ ItemScrollInt 0
& itEffect . ieInv .~ ItemCopierUpdate
nulgate :: Item
nulgate =
defaultHeldItem
& itType .~ NULGATE
& itUse .~ UseNothing
& itScroll .~ ItemScrollIntRange 2 0
unigate :: Item
unigate =
defaultHeldItem
& itType .~ UNIGATE
& itUse .~ UseNothing
& itScroll .~ ItemScrollIntRange 4 0
bingate :: Item
bingate =
defaultHeldItem
& itType .~ BINGATE
& itUse .~ UseNothing
& itScroll .~ ItemScrollIntRange 16 0
bulletModule :: BulletMod -> Item
bulletModule bm =
defaultHeldItem
& itType .~ BULLETMOD bm
& itUse .~ UseBulletMod {_ubMod = bm}
shellModule :: Payload -> Item
shellModule p = defaultHeldItem
& itType .~ ATTACH (SHELLPAYLOAD p)
& itUse .~ UseNothing
--bulletTargetingModule :: BulletTrajectoryType -> Item
--bulletTargetingModule = bulletModule . BulletModTrajectory
bulletPayloadModule :: BulletPayload -> Item
bulletPayloadModule = bulletModule . BulletModPayload
arHUD :: Item
arHUD = defaultHeldItem
& itType .~ ARHUD
& itUse .~ UseNothing
remoteScreen :: Item
remoteScreen = makeAttach REMOTESCREEN
-- & itUse . uaParams .~ APLinkProjectile Nothing
& itUse . uaParams .~ APProjectiles []
remoteDetonator :: Item
remoteDetonator = makeAttach REMOTEDETONATOR
-- & itUse .~ UseHammer HammerUp
& itUse . uaParams .~ APProjectiles []
joystick :: Item
joystick = makeAttach JOYSTICK
-- & itUse . uaParams .~ APLinkProjectile Nothing
gimbal :: Item
gimbal = makeAttach GIMBAL
gyroscope :: Item
gyroscope = makeAttach GYROSCOPE
underBarrelSlot :: Item
underBarrelSlot = makeAttach UNDERBARRELSLOT
smokeReducer :: Item
smokeReducer = makeAttach SMOKEREDUCER