Move AmmoType, going towards no need for Aeson
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
module Dodge.Default.Item (
|
||||
defaultHeldItem,
|
||||
singleAmmo,
|
||||
-- singleAmmo,
|
||||
defaultBulletWeapon,
|
||||
-- defaultLeftItem,
|
||||
defaultCraftItem,
|
||||
@@ -8,7 +8,7 @@ module Dodge.Default.Item (
|
||||
) where
|
||||
|
||||
import Control.Lens
|
||||
import qualified Data.IntMap.Strict as IM
|
||||
--import qualified Data.IntMap.Strict as IM
|
||||
import Dodge.Data.Item
|
||||
import Dodge.Default.Item.Use
|
||||
--import Geometry.Data
|
||||
@@ -21,7 +21,7 @@ defaultHeldItem =
|
||||
, _itEffect = defaultItEffect
|
||||
, _itID = 0 -- should this return an error ? const $ error "itID not correctly initialised" ?
|
||||
, _itTargeting = NoItTargeting
|
||||
, _itAmmoSlots = mempty
|
||||
-- , _itAmmoSlots = mempty
|
||||
, _itLocation = InVoid
|
||||
, _itUse = UseHeld
|
||||
, _itParams = NoParams
|
||||
@@ -36,13 +36,13 @@ defaultHeldItem =
|
||||
defaultCraftItem :: Item
|
||||
defaultCraftItem = defaultHeldItem & itUse .~ UseNothing
|
||||
|
||||
singleAmmo :: a -> IM.IntMap a
|
||||
singleAmmo x = IM.insert 0 x mempty
|
||||
--singleAmmo :: a -> IM.IntMap a
|
||||
--singleAmmo x = IM.insert 0 x mempty
|
||||
|
||||
defaultBulletWeapon :: Item
|
||||
defaultBulletWeapon =
|
||||
defaultHeldItem
|
||||
& itAmmoSlots .~ singleAmmo BulletAmmo
|
||||
-- & itAmmoSlots .~ singleAmmo BulletAmmo
|
||||
-- & itUse . heldMuzzles .~
|
||||
-- [Muzzle (V2 15 0) 0 0.01 0 BasicFlare MuzzleShootBullet (UseExactly 1) 0]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user