Commit before making hotkeys attach to item ids, not inv ids
This commit is contained in:
@@ -69,6 +69,7 @@ itemBaseName = \case
|
||||
|
||||
showAttachItem :: AttachType -> String
|
||||
showAttachItem t = case t of
|
||||
UNDERBARRELSLOT -> "UNDERBARRELSLOT"
|
||||
ZOOMSCOPE -> "ZOOMSCOPE"
|
||||
BULLETSYNTH -> "BSYNTH"
|
||||
REMOTESCREEN -> "REM.SCREEN"
|
||||
|
||||
@@ -62,8 +62,12 @@ itemToBreakLists ::
|
||||
([(ItemStructuralFunction, ComposeLinkType)], [(ItemStructuralFunction, ComposeLinkType)])
|
||||
itemToBreakLists itm itmf = case (itm ^. itType, itmf) of
|
||||
(HELD TORCH, _) -> (getAmmoLinks itm, [])
|
||||
(ATTACH UNDERBARRELSLOT, _) -> ([(UnderBarrelPlatformSF, UnderBarrelPlatformLink)], [])
|
||||
(_, HeldPlatformSF) ->
|
||||
( getAmmoLinks itm
|
||||
<> extraWeaponLinksBelow itm
|
||||
--( extraWeaponLinksBelow itm
|
||||
-- <>getAmmoLinks itm
|
||||
, [(WeaponTargetingSF, WeaponTargetingLink), (WeaponScopeSF, WeaponScopeLink)]
|
||||
<> getAutoSpringLinks itm
|
||||
<> extraWeaponLinks itm
|
||||
@@ -113,6 +117,12 @@ extraWeaponLinks itm = case itm ^. itType of
|
||||
where
|
||||
launcherlinks = [(ProjectileStabiliserSF,ProjectileStabiliserLink)]
|
||||
|
||||
extraWeaponLinksBelow :: Item -> [(ItemStructuralFunction, ComposeLinkType)]
|
||||
extraWeaponLinksBelow itm
|
||||
| Just TwoHandUnder <- itm ^? itUse . heldAim . aimStance
|
||||
= [(UnderBarrelSlotSF,UnderBarrelSlotLink)]
|
||||
| otherwise = []
|
||||
|
||||
getAmmoLinks :: Item -> [(ItemStructuralFunction, ComposeLinkType)]
|
||||
getAmmoLinks itm =
|
||||
map
|
||||
@@ -123,7 +133,7 @@ itemToFunction :: Item -> ItemStructuralFunction
|
||||
itemToFunction itm = case itm ^. itType of
|
||||
HELD LASER -> WeaponTargetingSF
|
||||
HELD{} -> case itm ^? itUseCondition of
|
||||
Just MustBeHeld -> HeldPlatformSF
|
||||
Just UseableWhenAimed -> HeldPlatformSF
|
||||
--Just MustBeHeld -> UnloadedWeaponSF
|
||||
_ -> GadgetPlatformSF
|
||||
_
|
||||
@@ -139,7 +149,7 @@ itemToFunction itm = case itm ^. itType of
|
||||
ATTACH ZOOMSCOPE -> WeaponScopeSF
|
||||
ATTACH HOMINGMODULE -> AmmoTargetingSF LauncherAmmo
|
||||
ATTACH AUGMENTEDHUD -> AugmentedHUDSF
|
||||
-- BULLETMOD BulletModTrajectory{} -> AmmoTargetingSF BulletAmmo
|
||||
ATTACH UNDERBARRELSLOT -> UnderBarrelSlotSF
|
||||
BULLETMOD BulletModPayload{} -> AmmoPayloadSF BulletAmmo
|
||||
BULLETMOD BulletModEffect{} -> AmmoEffectSF BulletAmmo
|
||||
TARGETING{} -> WeaponTargetingSF
|
||||
@@ -154,6 +164,7 @@ structureToPotentialFunction ::
|
||||
structureToPotentialFunction ldt = case ldt ^. ldtValue . _1 . itType of
|
||||
ATTACH GIMBAL -> S.singleton ProjectileStabiliserSF
|
||||
ATTACH GYROSCOPE -> S.singleton ProjectileStabiliserSF
|
||||
HELD GLAUNCHER -> S.singleton UnderBarrelPlatformSF
|
||||
_ -> S.singleton (ldt ^. ldtValue . _2)
|
||||
|
||||
baseCI :: Item -> ComposedItem
|
||||
|
||||
@@ -29,6 +29,8 @@ itemInvColor ci = case ci ^. _2 of
|
||||
AmmoEffectSF{} -> aquamarine
|
||||
FunctionChangeSF -> yellow
|
||||
ProjectileStabiliserSF -> white
|
||||
UnderBarrelPlatformSF -> white
|
||||
UnderBarrelSlotSF -> white
|
||||
|
||||
--ammoTypeColor :: AmmoType -> Color
|
||||
--ammoTypeColor = \case
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
module Dodge.Item.Scope (
|
||||
underBarrelSlot,
|
||||
gimbal,
|
||||
gyroscope,
|
||||
stickyMod,
|
||||
@@ -84,5 +85,8 @@ gimbal = makeAttach GIMBAL
|
||||
gyroscope :: Item
|
||||
gyroscope = makeAttach GYROSCOPE
|
||||
|
||||
underBarrelSlot :: Item
|
||||
underBarrelSlot = makeAttach UNDERBARRELSLOT
|
||||
|
||||
smokeReducer :: Item
|
||||
smokeReducer = makeAttach SMOKEREDUCER
|
||||
|
||||
Reference in New Issue
Block a user