Move towards removing functionality associated with ItemLinks
This commit is contained in:
@@ -99,7 +99,7 @@ hammerCheck f pt loc cr w = case itemTriggerType loc of
|
||||
& randGen .~ gen
|
||||
HammerTrigger t
|
||||
| w ^. cWorld . lWorld . lClock - t > timelastused
|
||||
, isNothing $ lookup MakeAutoLink (tree ^. ldtRight)
|
||||
-- , isNothing $ lookup MakeAutoLink (tree ^. ldtRight)
|
||||
, pt == InitialPress ->
|
||||
f loc cr w
|
||||
AutoTrigger t
|
||||
@@ -675,7 +675,7 @@ loadMuzzle t@(LDT _ l _) mz = fromMaybe (t, Nothing) $ do
|
||||
-- guard $ mz ^? mzFrame == t ^? ldtValue . itUse . heldFrame
|
||||
let as = _mzAmmoSlot mz
|
||||
amamount = _mzAmmoPerShot mz
|
||||
(i, (_, mag)) <- findWithIx (isAmmoIntLink as . fst) l
|
||||
(i, (_, mag)) <- findWithIx (isAmmoIntLink as . (^. _2 . ldtValue . _2)) l
|
||||
availableammo <- mag ^. ldtValue . _1 . itConsumables
|
||||
let usedammo = case amamount of
|
||||
UseUpTo x -> min x availableammo
|
||||
@@ -754,8 +754,8 @@ basicMuzFlare pos dir =
|
||||
. muzFlareAt (V4 10 10 1 3) (pos `v2z` 20) dir
|
||||
. muzFlareAt (V4 10 10 1 3) (pos `v2z` 20) dir
|
||||
|
||||
isAmmoIntLink :: Int -> ItemLink -> Bool
|
||||
isAmmoIntLink i (AmmoInLink j _) = i == j
|
||||
isAmmoIntLink :: Int -> ItemStructuralFunction -> Bool
|
||||
isAmmoIntLink i (AmmoMagSF j _) = i == j
|
||||
isAmmoIntLink _ _ = False
|
||||
|
||||
useLoadedAmmo ::
|
||||
|
||||
Reference in New Issue
Block a user