Commit before rethinking item ammo containers
This commit is contained in:
@@ -8,15 +8,17 @@ module Dodge.Default.Item (
|
||||
module Dodge.Default.Item.Use,
|
||||
) where
|
||||
|
||||
import qualified Data.IntMap.Strict as IM
|
||||
import Control.Lens
|
||||
import qualified Data.IntMap.Strict as IM
|
||||
import Dodge.Data.Item
|
||||
import Dodge.Default.Item.Use
|
||||
import Geometry.Data
|
||||
|
||||
defaultHeldItem :: Item
|
||||
defaultHeldItem = Item
|
||||
defaultHeldItem =
|
||||
Item
|
||||
{ _itType = HELD PISTOL
|
||||
, _itConsumables = NoConsumables
|
||||
, _itEffect = defaultItEffect
|
||||
, _itID = 0 -- should this return an error ? const $ error "itID not correctly initialised" ?
|
||||
, _itTargeting = NoItTargeting
|
||||
@@ -36,7 +38,8 @@ singleAmmo :: a -> IM.IntMap a
|
||||
singleAmmo x = IM.insert 0 x mempty
|
||||
|
||||
defaultBulletWeapon :: Item
|
||||
defaultBulletWeapon = defaultHeldItem
|
||||
defaultBulletWeapon =
|
||||
defaultHeldItem
|
||||
& itAmmoSlots .~ singleAmmo BulletAmmo
|
||||
& itUse . heldAim . aimMuzzles .~ [Muzzle (V2 15 0) 0 0.01 0 PistolFlare MuzzleShootBullet (UseExactly 1)]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user