Partially refactor ammo extraction, work on pulse rifle
This commit is contained in:
@@ -49,6 +49,7 @@ itemBelowAttachables :: CItem -> [ItemSF]
|
||||
itemBelowAttachables (itm,sf) = case (itm ^. itType, sf) of
|
||||
(HELD LASER, _) -> getAmmoLinks itm <> [PulseBallSF]
|
||||
(HELD TORCH, _) -> getAmmoLinks itm
|
||||
(ATTACH CAPACITOR, _) -> [AmmoMagSF 0 ElectricalAmmo]
|
||||
(ATTACH UNDERBARRELSLOT, _) -> [UnderBarrelPlatformSF]
|
||||
(_, HeldPlatformSF) -> getAmmoLinks itm <> extraWeaponLinksBelow itm
|
||||
(_, UnderBarrelPlatformSF) -> getAmmoLinks itm
|
||||
@@ -129,7 +130,7 @@ itemToFunction itm = case itm ^. itType of
|
||||
ATTACH SHELLPAYLOAD{} -> AmmoPayloadSF LauncherAmmo
|
||||
DROPPER{} -> GadgetPlatformSF
|
||||
CLICKER{} -> GadgetPlatformSF
|
||||
CRAFT CAPACITOR -> CapacitorSF
|
||||
ATTACH CAPACITOR -> CapacitorSF
|
||||
_ -> NoSF
|
||||
|
||||
treeToPotentialFunction :: DTree CItem -> S.Set ItemSF
|
||||
@@ -142,7 +143,7 @@ treeToPotentialFunction ldt = case ldt ^. dtValue . _1 . itType of
|
||||
HELD LASER -> S.fromList [WeaponTargetingSF,LaserWeaponSF]
|
||||
-- following limits items to ten ammo slots
|
||||
_ | AmmoMagSF _ x <- ldt ^. dtValue . _2 -> S.fromList [AmmoMagSF i x | i <- [0..9]]
|
||||
CRAFT CAPACITOR -> S.fromList [CapacitorSF,PulseBallSF]
|
||||
ATTACH CAPACITOR -> S.fromList [CapacitorSF,PulseBallSF]
|
||||
_ -> S.singleton (ldt ^. dtValue . _2)
|
||||
|
||||
baseCI :: Item -> CItem
|
||||
|
||||
Reference in New Issue
Block a user