Partial refactor of bullet weapon effect chain

This commit is contained in:
2024-09-16 13:05:59 +01:00
parent 6f372109d9
commit abc0dd1106
23 changed files with 655 additions and 510 deletions
+1 -1
View File
@@ -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