Partial refactor of bullet weapon effect chain
This commit is contained in:
@@ -4,6 +4,7 @@ module Dodge.Default.Item (
|
||||
module Dodge.Default.Item.Effect,
|
||||
) where
|
||||
|
||||
import qualified Data.IntMap.Strict as IM
|
||||
import Control.Lens
|
||||
import qualified Data.Map.Strict as M
|
||||
import Dodge.Data.Item
|
||||
@@ -41,10 +42,13 @@ defaultLeftItem = defaultHeldItem & itUse .~ defaultLeftUse
|
||||
defaultCraftItem :: Item
|
||||
defaultCraftItem = defaultHeldItem & itUse .~ CraftUse
|
||||
|
||||
singleAmmo :: a -> IM.IntMap a
|
||||
singleAmmo x = IM.insert 0 x mempty
|
||||
|
||||
defaultBulletWeapon :: Item
|
||||
defaultBulletWeapon =
|
||||
defaultWeapon
|
||||
& itUse . heldAmmoTypes .~ [BulletAmmo]
|
||||
& itUse . heldAmmoTypes .~ singleAmmo BulletAmmo
|
||||
-- & itUse . heldUse .~ HeldUseAmmoParams -- useAmmoParams
|
||||
& itType . iyModules . at ModBulletCollision ?~ EMPTYMODULE
|
||||
-- & itType . iyModules . at ModBulletPayload ?~ EMPTYMODULE
|
||||
|
||||
Reference in New Issue
Block a user