Reinstate HammerTrigger (no weapons use it currently)

This commit is contained in:
2025-07-29 10:47:09 +01:00
parent 3ced7e4034
commit fa377171a4
25 changed files with 68 additions and 70 deletions
+9 -9
View File
@@ -41,16 +41,16 @@ itemAboveAttachables (itm,sf) = case (itm ^. itType, sf) of
<> extraWeaponLinks itm
(DETECTOR {}, _) -> [ARHUDSF,TriggerSF,MapperSF]
--(CRAFT TRANSFORMER, _) -> [LaserWeaponSF]
(HELD LASER, _) -> [TransformerSF]
(LASER, _) -> [TransformerSF]
(MAPPER, _) -> [ARHUDSF]
(_, GadgetPlatformSF) -> [TriggerSF, WeaponTargetingSF, WeaponScopeSF]
_ -> []
itemBelowAttachables :: CItem -> [ItemSF]
itemBelowAttachables (itm,sf) = case (itm ^. itType, sf) of
(HELD LASER, WeaponTargetingSF) -> getAmmoLinks itm
(HELD LASER, LaserWeaponSF) -> [PulseBallSF] <> getAmmoLinks itm
(HELD LASER, PulseBallSF) -> [PulseBallSF]
(LASER, WeaponTargetingSF) -> getAmmoLinks itm
(LASER, LaserWeaponSF) -> [PulseBallSF] <> getAmmoLinks itm
(LASER, PulseBallSF) -> [PulseBallSF]
--(HELD LASER, _) -> [PulseBallSF]
(HELD TORCH, _) -> getAmmoLinks itm
(ATTACH CAPACITOR, _) -> [AmmoMagSF 0 ElectricalAmmo]
@@ -83,7 +83,7 @@ itemBelowAttachables (itm,sf) = case (itm ^. itType, sf) of
getAutoSpringLinks :: Item -> [ItemSF]
getAutoSpringLinks itm = case baseItemTriggerType itm of
HammerTrigger _ -> [MakeAutoSF]
SemiAutoTrigger _ -> [MakeAutoSF]
_ -> []
extraWeaponLinks :: Item -> [ItemSF]
@@ -109,7 +109,7 @@ itemToFunction itm = case itm ^. itType of
MAPPER -> MapperSF
ITEMSCAN -> ToggleSF
INTROSCAN {} -> IntroScanSF
HELD LASER -> WeaponTargetingSF
LASER -> WeaponTargetingSF
HELD TORCH -> TorchSF
HELD{} -> case itUseCondition itm of
UseableWhenAimed -> HeldPlatformSF
@@ -146,7 +146,7 @@ treeToPotentialFunction ldt = case ldt ^. dtValue . _1 . itType of
ATTACH GYROSCOPE -> S.singleton ProjectileStabiliserSF
HELD GLAUNCHER -> S.singleton UnderBarrelPlatformSF
HELD BURSTRIFLE -> S.singleton UnderBarrelPlatformSF
HELD LASER | sf == WeaponTargetingSF -> S.fromList [WeaponTargetingSF,LaserWeaponSF]
LASER | sf == WeaponTargetingSF -> S.fromList [WeaponTargetingSF,LaserWeaponSF]
-- following limits items to ten ammo slots
_ | AmmoMagSF _ x <- ldt ^. dtValue . _2 -> S.fromList [AmmoMagSF i x | i <- [0..9]]
ATTACH CAPACITOR -> S.fromList [CapacitorSF,PulseBallSF]
@@ -167,7 +167,7 @@ leftIsParentCombine ltree rtree = do
& dtValue %~ f
updateLeftParentSF :: ItemType -> ItemSF -> ItemSF -> ItemSF
updateLeftParentSF (HELD LASER) WeaponTargetingSF TransformerSF = LaserWeaponSF
updateLeftParentSF LASER WeaponTargetingSF TransformerSF = LaserWeaponSF
updateLeftParentSF _ psf _ = psf
rightIsParentCombine :: DTComb CItem
@@ -178,7 +178,7 @@ rightIsParentCombine ltree rtree = do
& dtValue %~ f
updateRightParentSF :: ItemType -> ItemSF -> ItemSF -> ItemSF
updateRightParentSF (HELD LASER) LaserWeaponSF CapacitorSF = PulseLaserSF
updateRightParentSF LASER LaserWeaponSF CapacitorSF = PulseLaserSF
updateRightParentSF _ psf _ = psf
leftChildList :: DTree CItem -> [ItemSF]