Make ammo magazines into own item type
This commit is contained in:
+1
-1
@@ -61,7 +61,7 @@ updateBulVel bt = case _buTrajectory bt of
|
||||
shootBullet :: Item -> Creature -> World -> World
|
||||
shootBullet it cr w = fromMaybe (error "cannot find bullet ammo when expected to") $ do
|
||||
invid <- it ^? itLocation . ipInvID
|
||||
thebullet <- cr ^? crInv . ix (invid + 1) . itUse . attachParams . ammoParams . ampBullet
|
||||
thebullet <- cr ^? crInv . ix (invid + 1) . itUse . amagParams . ampBullet
|
||||
return $ w & cWorld . lWorld . instantBullets
|
||||
.:~ ( thebullet
|
||||
& buPos .~ _crPos cr
|
||||
|
||||
Reference in New Issue
Block a user