Make launcherX use multiple ammo sources

This commit is contained in:
2024-06-28 22:40:24 +01:00
parent 009a6cd30f
commit 32cb2b2e80
17 changed files with 220 additions and 342 deletions
-3
View File
@@ -56,11 +56,8 @@ updateBulVel bt = case _buTrajectory bt of
where
t = _buTimer bt
-- should be made safe?
-- should be renamed to shootBullet or something
shootBullet :: [Item] -> Item -> Creature -> World -> World
shootBullet ams it cr w = fromMaybe (error "cannot find bullet ammo when expected to") $ do
invid <- it ^? itLocation . ipInvID
thebullet <- ams ^? ix 0 . itUse . amagParams . ampBullet
return $ w & cWorld . lWorld . instantBullets
.:~ ( thebullet