Implement modules changing shell payloads

This commit is contained in:
2024-12-24 21:13:58 +00:00
parent e82ef26b3e
commit 81fd2131e0
18 changed files with 82 additions and 18 deletions
+3 -1
View File
@@ -7,6 +7,7 @@ module Dodge.HeldUse (
mcUseHeld,
) where
import Control.Applicative
import Dodge.Item.Weapon.Bullet
import Color
import Control.Monad
@@ -610,7 +611,8 @@ createProjectile magtree muz itmtree cr = fromMaybe failsound $ do
magid <- magtree ^? ldtValue . itLocation . ilInvID
ammoitem <- cr ^? crInv . ix magid
let homing = determineProjectileTracking magtree itmtree
aparams <- ammoitem ^? itConsumables . magParams . ampPayload
aparams <- ((magtree ^? ldtLeft) >>= lookup AmmoPayloadLink >>= (^? ldtValue . itType . ibtAttach . shellPayload))
<|> ammoitem ^? itConsumables . magParams . ampPayload
return $
createShell homing aparams muz cr
. startthesound