Partial refactor of bullet weapon effect chain
This commit is contained in:
+1
-1
@@ -62,7 +62,7 @@ shootBullet :: LabelDoubleTree ComposeLinkType Item -> Creature -> World -> Worl
|
||||
shootBullet itm cr w = fromMaybe (error "cannot find bullet ammo when expected to") $ do
|
||||
atype <- itm ^? ldtValue . itUse . heldAmmoTypes . ix 0
|
||||
leftitms <- itm ^? ldtLeft
|
||||
mag <- lookup (AmmoInLink atype) leftitms
|
||||
mag <- lookup (AmmoInLink 0 atype) leftitms
|
||||
thebullet <- mag ^? ldtValue . itUse . amagParams . ampBullet
|
||||
return $ w & cWorld . lWorld . instantBullets
|
||||
.:~ ( thebullet
|
||||
|
||||
Reference in New Issue
Block a user