Move AmmoType, going towards no need for Aeson
This commit is contained in:
@@ -45,10 +45,10 @@ digraph {
|
|||||||
,label="HELD {_ibtHeld = FLAMESPITTER}"];
|
,label="HELD {_ibtHeld = FLAMESPITTER}"];
|
||||||
57 [shape=box
|
57 [shape=box
|
||||||
,label="HELD {_ibtHeld = BLOWTORCH}"];
|
,label="HELD {_ibtHeld = BLOWTORCH}"];
|
||||||
59 [shape=box
|
60 [shape=box
|
||||||
,label="HELD {_ibtHeld = FLAMETHROWER}"];
|
|
||||||
61 [shape=box
|
|
||||||
,label="HELD {_ibtHeld = FLAMEWALL}"];
|
,label="HELD {_ibtHeld = FLAMEWALL}"];
|
||||||
|
61 [shape=box
|
||||||
|
,label="HELD {_ibtHeld = FLAMETHROWER}"];
|
||||||
63 [shape=box
|
63 [shape=box
|
||||||
,label="HELD {_ibtHeld = FLAMETORRENT}"];
|
,label="HELD {_ibtHeld = FLAMETORRENT}"];
|
||||||
65 [shape=box
|
65 [shape=box
|
||||||
@@ -109,7 +109,7 @@ digraph {
|
|||||||
52 [shape=point];
|
52 [shape=point];
|
||||||
56 [shape=point];
|
56 [shape=point];
|
||||||
58 [shape=point];
|
58 [shape=point];
|
||||||
60 [shape=point];
|
59 [shape=point];
|
||||||
62 [shape=point];
|
62 [shape=point];
|
||||||
64 [shape=point];
|
64 [shape=point];
|
||||||
68 [shape=point];
|
68 [shape=point];
|
||||||
@@ -235,14 +235,14 @@ digraph {
|
|||||||
,arrowhead=onone
|
,arrowhead=onone
|
||||||
,headport=w];
|
,headport=w];
|
||||||
56 -> 57 [xlabel="",tailport=e];
|
56 -> 57 [xlabel="",tailport=e];
|
||||||
58 -> 59 [xlabel="",tailport=e];
|
58 -> 13 [xlabel="",tailport=e];
|
||||||
59 -> 60 [xlabel=1
|
59 -> 60 [xlabel="",tailport=e];
|
||||||
|
61 -> 59 [xlabel=1
|
||||||
,arrowhead=onone
|
,arrowhead=onone
|
||||||
,headport=w];
|
,headport=w];
|
||||||
59 -> 62 [xlabel=1
|
61 -> 62 [xlabel=1
|
||||||
,arrowhead=onone
|
,arrowhead=onone
|
||||||
,headport=w];
|
,headport=w];
|
||||||
60 -> 61 [xlabel="",tailport=e];
|
|
||||||
62 -> 63 [xlabel="",tailport=e];
|
62 -> 63 [xlabel="",tailport=e];
|
||||||
64 -> 65 [xlabel="",tailport=e];
|
64 -> 65 [xlabel="",tailport=e];
|
||||||
68 -> 69 [xlabel="",tailport=e];
|
68 -> 69 [xlabel="",tailport=e];
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -5,6 +5,7 @@
|
|||||||
|
|
||||||
module Dodge.Data.ComposedItem where
|
module Dodge.Data.ComposedItem where
|
||||||
|
|
||||||
|
import Dodge.Data.AmmoType
|
||||||
import Dodge.Data.DoubleTree
|
import Dodge.Data.DoubleTree
|
||||||
import Control.Lens
|
import Control.Lens
|
||||||
import Data.Aeson
|
import Data.Aeson
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ module Dodge.Data.Item (
|
|||||||
) where
|
) where
|
||||||
|
|
||||||
import Geometry.Data
|
import Geometry.Data
|
||||||
import qualified Data.IntMap.Strict as IM
|
--import qualified Data.IntMap.Strict as IM
|
||||||
import Control.Lens
|
import Control.Lens
|
||||||
import Data.Aeson
|
import Data.Aeson
|
||||||
import Data.Aeson.TH
|
import Data.Aeson.TH
|
||||||
@@ -34,7 +34,7 @@ data Consumables
|
|||||||
| AmmoMag
|
| AmmoMag
|
||||||
{ _magLoadStatus :: ReloadStatus
|
{ _magLoadStatus :: ReloadStatus
|
||||||
, _magParams :: AmmoParams
|
, _magParams :: AmmoParams
|
||||||
, _magType :: AmmoType
|
-- , _magType :: AmmoType
|
||||||
}
|
}
|
||||||
deriving (Eq, Show, Read)
|
deriving (Eq, Show, Read)
|
||||||
|
|
||||||
@@ -47,7 +47,7 @@ data Item = Item
|
|||||||
, _itLocation :: ItemLocation
|
, _itLocation :: ItemLocation
|
||||||
, _itEffect :: ItEffect
|
, _itEffect :: ItEffect
|
||||||
, _itTargeting :: ItemTargeting
|
, _itTargeting :: ItemTargeting
|
||||||
, _itAmmoSlots :: IM.IntMap AmmoType
|
-- , _itAmmoSlots :: IM.IntMap AmmoType
|
||||||
, _itParams :: ItemParams
|
, _itParams :: ItemParams
|
||||||
, _itScroll :: ItemScroll
|
, _itScroll :: ItemScroll
|
||||||
, _itTimeLastUsed :: Int
|
, _itTimeLastUsed :: Int
|
||||||
|
|||||||
@@ -21,16 +21,6 @@ data ProjectileUpdate
|
|||||||
| RemoteDirectionPU {_pjuStart :: Int, _pjuEnd :: Int}
|
| RemoteDirectionPU {_pjuStart :: Int, _pjuEnd :: Int}
|
||||||
deriving (Show, Eq, Ord, Read) --Generic, Flat)
|
deriving (Show, Eq, Ord, Read) --Generic, Flat)
|
||||||
|
|
||||||
data AmmoType
|
|
||||||
= LauncherAmmo
|
|
||||||
| BulletAmmo
|
|
||||||
| BeltBulletAmmo
|
|
||||||
| ElectricalAmmo
|
|
||||||
| DroneAmmo
|
|
||||||
| GasAmmo
|
|
||||||
| PrintMaterial
|
|
||||||
| ExplosivePutty
|
|
||||||
deriving (Eq, Ord, Show, Read) --Generic, Flat)
|
|
||||||
|
|
||||||
data ForceFieldType = DefaultForceField
|
data ForceFieldType = DefaultForceField
|
||||||
deriving (Eq, Ord, Show, Read) --Generic, Flat)
|
deriving (Eq, Ord, Show, Read) --Generic, Flat)
|
||||||
@@ -42,9 +32,9 @@ data GasCreate = CreatePoisonGas | CreateFlame
|
|||||||
deriving (Eq, Ord, Show, Enum, Bounded, Read) --Generic, Flat)
|
deriving (Eq, Ord, Show, Enum, Bounded, Read) --Generic, Flat)
|
||||||
|
|
||||||
makeLenses ''ProjectileUpdate
|
makeLenses ''ProjectileUpdate
|
||||||
makeLenses ''AmmoType
|
--makeLenses ''AmmoType
|
||||||
deriveJSON defaultOptions ''GasFuel
|
deriveJSON defaultOptions ''GasFuel
|
||||||
deriveJSON defaultOptions ''ProjectileUpdate
|
deriveJSON defaultOptions ''ProjectileUpdate
|
||||||
deriveJSON defaultOptions ''GasCreate
|
deriveJSON defaultOptions ''GasCreate
|
||||||
deriveJSON defaultOptions ''ForceFieldType
|
deriveJSON defaultOptions ''ForceFieldType
|
||||||
deriveJSON defaultOptions ''AmmoType
|
--deriveJSON defaultOptions ''AmmoType
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
module Dodge.Default.Item (
|
module Dodge.Default.Item (
|
||||||
defaultHeldItem,
|
defaultHeldItem,
|
||||||
singleAmmo,
|
-- singleAmmo,
|
||||||
defaultBulletWeapon,
|
defaultBulletWeapon,
|
||||||
-- defaultLeftItem,
|
-- defaultLeftItem,
|
||||||
defaultCraftItem,
|
defaultCraftItem,
|
||||||
@@ -8,7 +8,7 @@ module Dodge.Default.Item (
|
|||||||
) where
|
) where
|
||||||
|
|
||||||
import Control.Lens
|
import Control.Lens
|
||||||
import qualified Data.IntMap.Strict as IM
|
--import qualified Data.IntMap.Strict as IM
|
||||||
import Dodge.Data.Item
|
import Dodge.Data.Item
|
||||||
import Dodge.Default.Item.Use
|
import Dodge.Default.Item.Use
|
||||||
--import Geometry.Data
|
--import Geometry.Data
|
||||||
@@ -21,7 +21,7 @@ defaultHeldItem =
|
|||||||
, _itEffect = defaultItEffect
|
, _itEffect = defaultItEffect
|
||||||
, _itID = 0 -- should this return an error ? const $ error "itID not correctly initialised" ?
|
, _itID = 0 -- should this return an error ? const $ error "itID not correctly initialised" ?
|
||||||
, _itTargeting = NoItTargeting
|
, _itTargeting = NoItTargeting
|
||||||
, _itAmmoSlots = mempty
|
-- , _itAmmoSlots = mempty
|
||||||
, _itLocation = InVoid
|
, _itLocation = InVoid
|
||||||
, _itUse = UseHeld
|
, _itUse = UseHeld
|
||||||
, _itParams = NoParams
|
, _itParams = NoParams
|
||||||
@@ -36,13 +36,13 @@ defaultHeldItem =
|
|||||||
defaultCraftItem :: Item
|
defaultCraftItem :: Item
|
||||||
defaultCraftItem = defaultHeldItem & itUse .~ UseNothing
|
defaultCraftItem = defaultHeldItem & itUse .~ UseNothing
|
||||||
|
|
||||||
singleAmmo :: a -> IM.IntMap a
|
--singleAmmo :: a -> IM.IntMap a
|
||||||
singleAmmo x = IM.insert 0 x mempty
|
--singleAmmo x = IM.insert 0 x mempty
|
||||||
|
|
||||||
defaultBulletWeapon :: Item
|
defaultBulletWeapon :: Item
|
||||||
defaultBulletWeapon =
|
defaultBulletWeapon =
|
||||||
defaultHeldItem
|
defaultHeldItem
|
||||||
& itAmmoSlots .~ singleAmmo BulletAmmo
|
-- & itAmmoSlots .~ singleAmmo BulletAmmo
|
||||||
-- & itUse . heldMuzzles .~
|
-- & itUse . heldMuzzles .~
|
||||||
-- [Muzzle (V2 15 0) 0 0.01 0 BasicFlare MuzzleShootBullet (UseExactly 1) 0]
|
-- [Muzzle (V2 15 0) 0 0.01 0 BasicFlare MuzzleShootBullet (UseExactly 1) 0]
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ tinMag =
|
|||||||
& itConsumables
|
& itConsumables
|
||||||
.~ AmmoMag
|
.~ AmmoMag
|
||||||
{ _magParams = BulletParams defaultBullet
|
{ _magParams = BulletParams defaultBullet
|
||||||
, _magType = BulletAmmo
|
-- , _magType = BulletAmmo
|
||||||
, _magLoadStatus =
|
, _magLoadStatus =
|
||||||
ReloadStatus
|
ReloadStatus
|
||||||
{ _iaMax = 15
|
{ _iaMax = 15
|
||||||
@@ -48,7 +48,7 @@ beltMag :: Item
|
|||||||
beltMag = tinMag & itType . ibtAmmoMag .~ BELTMAG
|
beltMag = tinMag & itType . ibtAmmoMag .~ BELTMAG
|
||||||
& itConsumables . magLoadStatus . iaLoaded .~ 10000
|
& itConsumables . magLoadStatus . iaLoaded .~ 10000
|
||||||
& itConsumables . magLoadStatus . iaMax .~ 20000
|
& itConsumables . magLoadStatus . iaMax .~ 20000
|
||||||
& itConsumables . magType .~ BeltBulletAmmo
|
-- & itConsumables . magType .~ BeltBulletAmmo
|
||||||
|
|
||||||
megaShellMag :: Item
|
megaShellMag :: Item
|
||||||
megaShellMag = shellMag
|
megaShellMag = shellMag
|
||||||
@@ -70,7 +70,7 @@ shellMag =
|
|||||||
{ _iaMax = 1
|
{ _iaMax = 1
|
||||||
, _iaLoaded = 1
|
, _iaLoaded = 1
|
||||||
}
|
}
|
||||||
, _magType = LauncherAmmo
|
-- , _magType = LauncherAmmo
|
||||||
}
|
}
|
||||||
|
|
||||||
megaBattery :: Item
|
megaBattery :: Item
|
||||||
@@ -91,7 +91,7 @@ battery =
|
|||||||
& itConsumables
|
& itConsumables
|
||||||
.~ AmmoMag
|
.~ AmmoMag
|
||||||
{ _magParams = NoAmmoParams
|
{ _magParams = NoAmmoParams
|
||||||
, _magType = ElectricalAmmo
|
-- , _magType = ElectricalAmmo
|
||||||
, _magLoadStatus =
|
, _magLoadStatus =
|
||||||
ReloadStatus
|
ReloadStatus
|
||||||
{ _iaMax = 10 ^ (9 :: Int)
|
{ _iaMax = 10 ^ (9 :: Int)
|
||||||
@@ -106,7 +106,7 @@ chemFuelPouch =
|
|||||||
& itConsumables
|
& itConsumables
|
||||||
.~ AmmoMag
|
.~ AmmoMag
|
||||||
{ _magParams = GasParams ChemFuel
|
{ _magParams = GasParams ChemFuel
|
||||||
, _magType = GasAmmo
|
-- , _magType = GasAmmo
|
||||||
, _magLoadStatus =
|
, _magLoadStatus =
|
||||||
ReloadStatus
|
ReloadStatus
|
||||||
{ _iaMax = 1000
|
{ _iaMax = 1000
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ maybeWarmupStatus :: Item -> Maybe String
|
|||||||
maybeWarmupStatus it = case useDelay it ^? warmMax of
|
maybeWarmupStatus it = case useDelay it ^? warmMax of
|
||||||
Nothing -> Nothing
|
Nothing -> Nothing
|
||||||
--Just m -> case m - (_warmTime . _heldDelay $ _itUse it) of
|
--Just m -> case m - (_warmTime . _heldDelay $ _itUse it) of
|
||||||
Just m -> case m - (_wTime $ _itParams it) of
|
Just m -> case m - _wTime (_itParams it) of
|
||||||
x
|
x
|
||||||
| x <= 1 -> Just "*WARM"
|
| x <= 1 -> Just "*WARM"
|
||||||
| otherwise ->
|
| otherwise ->
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ batteryPack =
|
|||||||
& itConsumables
|
& itConsumables
|
||||||
.~ AmmoMag
|
.~ AmmoMag
|
||||||
{ _magParams = NoAmmoParams
|
{ _magParams = NoAmmoParams
|
||||||
, _magType = ElectricalAmmo
|
-- , _magType = ElectricalAmmo
|
||||||
, _magLoadStatus =
|
, _magLoadStatus =
|
||||||
ReloadStatus
|
ReloadStatus
|
||||||
{ _iaMax = 10000000
|
{ _iaMax = 10000000
|
||||||
@@ -80,7 +80,7 @@ fuelPack =
|
|||||||
& itConsumables
|
& itConsumables
|
||||||
.~ AmmoMag
|
.~ AmmoMag
|
||||||
{ _magParams = GasParams ChemFuel
|
{ _magParams = GasParams ChemFuel
|
||||||
, _magType = GasAmmo
|
-- , _magType = GasAmmo
|
||||||
, _magLoadStatus =
|
, _magLoadStatus =
|
||||||
ReloadStatus
|
ReloadStatus
|
||||||
{ _iaMax = 100000
|
{ _iaMax = 100000
|
||||||
@@ -97,7 +97,7 @@ bulletBeltPack =
|
|||||||
& itConsumables
|
& itConsumables
|
||||||
.~ AmmoMag
|
.~ AmmoMag
|
||||||
{ _magParams = BulletParams defaultBullet
|
{ _magParams = BulletParams defaultBullet
|
||||||
, _magType = BeltBulletAmmo
|
-- , _magType = BeltBulletAmmo
|
||||||
, _magLoadStatus =
|
, _magLoadStatus =
|
||||||
ReloadStatus
|
ReloadStatus
|
||||||
{ _iaMax = 10000000
|
{ _iaMax = 10000000
|
||||||
@@ -115,7 +115,7 @@ bulletBeltBracer =
|
|||||||
& itConsumables
|
& itConsumables
|
||||||
.~ AmmoMag
|
.~ AmmoMag
|
||||||
{ _magParams = BulletParams defaultBullet
|
{ _magParams = BulletParams defaultBullet
|
||||||
, _magType = BeltBulletAmmo
|
-- , _magType = BeltBulletAmmo
|
||||||
, _magLoadStatus =
|
, _magLoadStatus =
|
||||||
ReloadStatus
|
ReloadStatus
|
||||||
{ _iaMax = 100000
|
{ _iaMax = 100000
|
||||||
|
|||||||
@@ -7,6 +7,9 @@ module Dodge.Item.Grammar (
|
|||||||
allInvLocs,
|
allInvLocs,
|
||||||
) where
|
) where
|
||||||
|
|
||||||
|
import Dodge.Item.MagAmmoType
|
||||||
|
import Dodge.Data.AmmoType
|
||||||
|
import Dodge.Item.AmmoSlots
|
||||||
import Dodge.Data.TriggerType
|
import Dodge.Data.TriggerType
|
||||||
import Dodge.BaseTriggerType
|
import Dodge.BaseTriggerType
|
||||||
import Dodge.Data.AimStance
|
import Dodge.Data.AimStance
|
||||||
@@ -87,7 +90,7 @@ itemToBreakLists itm itmf = case (itm ^. itType, itmf) of
|
|||||||
, [(TriggerSF, TriggerLink), (WeaponTargetingSF, WeaponTargetingLink), (WeaponScopeSF, WeaponScopeLink)]
|
, [(TriggerSF, TriggerLink), (WeaponTargetingSF, WeaponTargetingLink), (WeaponScopeSF, WeaponScopeLink)]
|
||||||
)
|
)
|
||||||
(_, AmmoMagSF{}) -> fromMaybe ([], []) $ do
|
(_, AmmoMagSF{}) -> fromMaybe ([], []) $ do
|
||||||
atype <- itm ^? itConsumables . magType
|
atype <- magAmmoType itm
|
||||||
let screenanddet = case atype of
|
let screenanddet = case atype of
|
||||||
LauncherAmmo ->
|
LauncherAmmo ->
|
||||||
[ (RemoteScreenSF, RemoteScreenLink)
|
[ (RemoteScreenSF, RemoteScreenLink)
|
||||||
@@ -138,7 +141,7 @@ getAmmoLinks :: Item -> [(ItemStructuralFunction, ComposeLinkType)]
|
|||||||
getAmmoLinks itm =
|
getAmmoLinks itm =
|
||||||
map
|
map
|
||||||
(\(i, a) -> (AmmoMagSF a, AmmoInLink i a))
|
(\(i, a) -> (AmmoMagSF a, AmmoInLink i a))
|
||||||
(IM.toList $ itm ^. itAmmoSlots)
|
(IM.toList $ itemAmmoSlots itm)
|
||||||
|
|
||||||
itemToFunction :: Item -> ItemStructuralFunction
|
itemToFunction :: Item -> ItemStructuralFunction
|
||||||
itemToFunction itm = case itm ^. itType of
|
itemToFunction itm = case itm ^. itType of
|
||||||
@@ -152,10 +155,10 @@ itemToFunction itm = case itm ^. itType of
|
|||||||
--Just MustBeHeld -> UnloadedWeaponSF
|
--Just MustBeHeld -> UnloadedWeaponSF
|
||||||
_ -> GadgetPlatformSF
|
_ -> GadgetPlatformSF
|
||||||
_
|
_
|
||||||
| Just amtype <- itm ^? itConsumables . magType
|
| Just amtype <- magAmmoType itm-- ^? itConsumables . magType
|
||||||
, Just _ <- itm ^? itLocation . ilEquipSite . _Just ->
|
, Just _ <- itm ^? itLocation . ilEquipSite . _Just ->
|
||||||
AmmoMagSF amtype
|
AmmoMagSF amtype
|
||||||
AMMOMAG{} -> maybe NoSF AmmoMagSF $ itm ^? itConsumables . magType
|
AMMOMAG{} -> maybe NoSF AmmoMagSF $ magAmmoType itm -- ^? itConsumables . magType
|
||||||
ATTACH REMOTESCREEN -> RemoteScreenSF
|
ATTACH REMOTESCREEN -> RemoteScreenSF
|
||||||
ATTACH JOYSTICK -> JoystickSF
|
ATTACH JOYSTICK -> JoystickSF
|
||||||
ATTACH REMOTEDETONATOR -> RemoteDetonatorSF
|
ATTACH REMOTEDETONATOR -> RemoteDetonatorSF
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ teslaGun =
|
|||||||
-- & itUse . heldMuzzles . ix 0 . mzFlareType .~ TeslaGunFlare
|
-- & itUse . heldMuzzles . ix 0 . mzFlareType .~ TeslaGunFlare
|
||||||
-- & itUse . heldMuzzles . ix 0 . mzEffect .~ MuzzleTesla
|
-- & itUse . heldMuzzles . ix 0 . mzEffect .~ MuzzleTesla
|
||||||
& itType .~ HELD TESLAGUN
|
& itType .~ HELD TESLAGUN
|
||||||
& itAmmoSlots .~ singleAmmo ElectricalAmmo
|
-- & itAmmoSlots .~ singleAmmo ElectricalAmmo
|
||||||
|
|
||||||
teslaParams :: ItemParams
|
teslaParams :: ItemParams
|
||||||
teslaParams =
|
teslaParams =
|
||||||
@@ -42,7 +42,7 @@ laser :: Item
|
|||||||
laser =
|
laser =
|
||||||
defaultHeldItem
|
defaultHeldItem
|
||||||
-- & itUse . heldParams .~ BeamShooterParams-- Nothing
|
-- & itUse . heldParams .~ BeamShooterParams-- Nothing
|
||||||
& itAmmoSlots .~ singleAmmo ElectricalAmmo
|
-- & itAmmoSlots .~ singleAmmo ElectricalAmmo
|
||||||
-- & itUse . heldDelay .~ NoDelay
|
-- & itUse . heldDelay .~ NoDelay
|
||||||
-- & itUse . heldMuzzles . ix 0 . mzPos .~ V2 6 0
|
-- & itUse . heldMuzzles . ix 0 . mzPos .~ V2 6 0
|
||||||
-- & itUse . heldMuzzles . ix 0 . mzInaccuracy .~ 0
|
-- & itUse . heldMuzzles . ix 0 . mzInaccuracy .~ 0
|
||||||
@@ -61,7 +61,7 @@ tractorGun :: Item
|
|||||||
tractorGun =
|
tractorGun =
|
||||||
defaultHeldItem
|
defaultHeldItem
|
||||||
-- & itUse . heldParams .~ BeamShooterParams
|
-- & itUse . heldParams .~ BeamShooterParams
|
||||||
& itAmmoSlots .~ singleAmmo ElectricalAmmo
|
-- & itAmmoSlots .~ singleAmmo ElectricalAmmo
|
||||||
-- & itUse . heldMuzzles . ix 0 . mzPos .~ V2 30 0
|
-- & itUse . heldMuzzles . ix 0 . mzPos .~ V2 30 0
|
||||||
-- & itUse . heldMuzzles . ix 0 . mzInaccuracy .~ 0
|
-- & itUse . heldMuzzles . ix 0 . mzInaccuracy .~ 0
|
||||||
-- & itUse . heldMuzzles . ix 0 . mzFlareType .~ NoFlare
|
-- & itUse . heldMuzzles . ix 0 . mzFlareType .~ NoFlare
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ module Dodge.Item.Held.Cane (
|
|||||||
|
|
||||||
import Dodge.Data.Item
|
import Dodge.Data.Item
|
||||||
import Dodge.Default
|
import Dodge.Default
|
||||||
import qualified Data.IntMap.Strict as IM
|
--import qualified Data.IntMap.Strict as IM
|
||||||
import LensHelp
|
import LensHelp
|
||||||
|
|
||||||
defaultBangCane :: Item
|
defaultBangCane :: Item
|
||||||
@@ -32,7 +32,7 @@ volleyGun i =
|
|||||||
-- <*> ZipList [0..i-1]
|
-- <*> ZipList [0..i-1]
|
||||||
-- )
|
-- )
|
||||||
& itType .~ HELD (VOLLEYGUN i)
|
& itType .~ HELD (VOLLEYGUN i)
|
||||||
& itAmmoSlots .~ IM.fromList (zip [0..i-1] $ repeat BulletAmmo)
|
-- & itAmmoSlots .~ IM.fromList (zip [0..i-1] $ repeat BulletAmmo)
|
||||||
-- & itUse . heldUseEffect .~ RandomiseMuzzleFrames i
|
-- & itUse . heldUseEffect .~ RandomiseMuzzleFrames i
|
||||||
|
|
||||||
rifle :: Item
|
rifle :: Item
|
||||||
@@ -42,7 +42,7 @@ rifle = defaultBangCane & itType .~ HELD RIFLE
|
|||||||
alteRifle :: Item
|
alteRifle :: Item
|
||||||
alteRifle = rifle
|
alteRifle = rifle
|
||||||
& itType .~ HELD ALTERIFLE
|
& itType .~ HELD ALTERIFLE
|
||||||
& itAmmoSlots .~ IM.fromList (zip [0..1] $ repeat BulletAmmo)
|
-- & itAmmoSlots .~ IM.fromList (zip [0..1] $ repeat BulletAmmo)
|
||||||
& itParams .~ AlteRifleSwitch 0
|
& itParams .~ AlteRifleSwitch 0
|
||||||
|
|
||||||
autoRifle :: Item
|
autoRifle :: Item
|
||||||
@@ -63,7 +63,7 @@ miniGunX i =
|
|||||||
-- & itUse . heldDelay .~ WarmUpNoDelay{
|
-- & itUse . heldDelay .~ WarmUpNoDelay{
|
||||||
-- --_warmTime = 0,
|
-- --_warmTime = 0,
|
||||||
-- _warmMax = 100, _warmSound = crankSlowS}
|
-- _warmMax = 100, _warmSound = crankSlowS}
|
||||||
& itAmmoSlots .~ singleAmmo BeltBulletAmmo
|
-- & itAmmoSlots .~ singleAmmo BeltBulletAmmo
|
||||||
-- & itUse . heldMuzzles
|
-- & itUse . heldMuzzles
|
||||||
-- .~ replicate i
|
-- .~ replicate i
|
||||||
-- (Muzzle (V2 30 0) 0 0.05 0 MiniGunFlare MuzzleShootBullet (UseExactly 1) 0)
|
-- (Muzzle (V2 30 0) 0 0.05 0 MiniGunFlare MuzzleShootBullet (UseExactly 1) 0)
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import Control.Lens
|
|||||||
import Dodge.Data.Item
|
import Dodge.Data.Item
|
||||||
import Dodge.Default.Item
|
import Dodge.Default.Item
|
||||||
--import Geometry.Data
|
--import Geometry.Data
|
||||||
import qualified IntMapHelp as IM
|
--import qualified IntMapHelp as IM
|
||||||
|
|
||||||
rLauncher :: Item
|
rLauncher :: Item
|
||||||
rLauncher =
|
rLauncher =
|
||||||
@@ -18,7 +18,7 @@ rLauncher =
|
|||||||
-- & itUse . heldMuzzles . ix 0 . mzInaccuracy .~ 0
|
-- & itUse . heldMuzzles . ix 0 . mzInaccuracy .~ 0
|
||||||
-- & itUse . heldMuzzles . ix 0 . mzEffect .~ MuzzleRLauncher
|
-- & itUse . heldMuzzles . ix 0 . mzEffect .~ MuzzleRLauncher
|
||||||
-- & itUse . heldMuzzles . ix 0 . mzPos .~ V2 20 0
|
-- & itUse . heldMuzzles . ix 0 . mzPos .~ V2 20 0
|
||||||
& itAmmoSlots .~ singleAmmo LauncherAmmo
|
-- & itAmmoSlots .~ singleAmmo LauncherAmmo
|
||||||
& itType .~ HELD RLAUNCHER
|
& itType .~ HELD RLAUNCHER
|
||||||
|
|
||||||
gLauncher :: Item
|
gLauncher :: Item
|
||||||
@@ -40,6 +40,6 @@ rLauncherX i =
|
|||||||
-- <*> pure (UseExactly 1)
|
-- <*> pure (UseExactly 1)
|
||||||
-- <*> pure 0
|
-- <*> pure 0
|
||||||
-- )
|
-- )
|
||||||
& itAmmoSlots .~ IM.fromList [(j, LauncherAmmo) | j <- [0 .. i -1]]
|
-- & itAmmoSlots .~ IM.fromList [(j, LauncherAmmo) | j <- [0 .. i -1]]
|
||||||
where
|
-- where
|
||||||
-- angles = take i [0, 2 * pi / fromIntegral i ..]
|
-- angles = take i [0, 2 * pi / fromIntegral i ..]
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ poisonSprayer :: Item
|
|||||||
poisonSprayer =
|
poisonSprayer =
|
||||||
flameThrower
|
flameThrower
|
||||||
& itType .~ HELD POISONSPRAYER
|
& itType .~ HELD POISONSPRAYER
|
||||||
& itAmmoSlots .~ singleAmmo GasAmmo
|
-- & itAmmoSlots .~ singleAmmo GasAmmo
|
||||||
|
|
||||||
flameSpitter :: Item
|
flameSpitter :: Item
|
||||||
flameSpitter =
|
flameSpitter =
|
||||||
@@ -77,8 +77,8 @@ flameThrower =
|
|||||||
-- (UseExactly 1)
|
-- (UseExactly 1)
|
||||||
-- 0
|
-- 0
|
||||||
-- ]
|
-- ]
|
||||||
& itAmmoSlots .~ singleAmmo GasAmmo
|
-- & itAmmoSlots .~ singleAmmo GasAmmo
|
||||||
& itType .~ HELD FLAMETHROWER
|
-- & itType .~ HELD FLAMETHROWER
|
||||||
-- & itUse . heldParams .~ GasSprayParams
|
-- & itUse . heldParams .~ GasSprayParams
|
||||||
-- { _weaponInvLock = 0
|
-- { _weaponInvLock = 0
|
||||||
---- , _weaponRepeat = mempty
|
---- , _weaponRepeat = mempty
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ torch =
|
|||||||
defaultHeldItem
|
defaultHeldItem
|
||||||
& itType .~ HELD TORCH
|
& itType .~ HELD TORCH
|
||||||
-- & itUse . heldMuzzles . ix 0 . mzPos . _x .~ 10
|
-- & itUse . heldMuzzles . ix 0 . mzPos . _x .~ 10
|
||||||
& itAmmoSlots .~ singleAmmo ElectricalAmmo
|
-- & itAmmoSlots .~ singleAmmo ElectricalAmmo
|
||||||
|
|
||||||
-- | Sends out pulses that display walls.
|
-- | Sends out pulses that display walls.
|
||||||
detector :: Detector -> Item
|
detector :: Detector -> Item
|
||||||
@@ -37,7 +37,7 @@ detector dt =
|
|||||||
defaultHeldItem
|
defaultHeldItem
|
||||||
& itUseCondition .~ UseableAnytime
|
& itUseCondition .~ UseableAnytime
|
||||||
-- & itUse . heldDelay . rateMax .~ 20
|
-- & itUse . heldDelay . rateMax .~ 20
|
||||||
& itAmmoSlots .~ singleAmmo ElectricalAmmo
|
-- & itAmmoSlots .~ singleAmmo ElectricalAmmo
|
||||||
& itType .~ DETECTOR dt
|
& itType .~ DETECTOR dt
|
||||||
-- & itUse . heldMuzzles . ix 0 . mzEffect .~ MuzzleDetector
|
-- & itUse . heldMuzzles . ix 0 . mzEffect .~ MuzzleDetector
|
||||||
-- & itUse . heldMuzzles . ix 0 . mzAmmoPerShot .~ UseExactly 100
|
-- & itUse . heldMuzzles . ix 0 . mzAmmoPerShot .~ UseExactly 100
|
||||||
@@ -47,7 +47,7 @@ blinker =
|
|||||||
defaultHeldItem
|
defaultHeldItem
|
||||||
& itUseCondition .~ UseableAnytime
|
& itUseCondition .~ UseableAnytime
|
||||||
-- & itUse . heldDelay . rateMax .~ 20
|
-- & itUse . heldDelay . rateMax .~ 20
|
||||||
& itAmmoSlots .~ singleAmmo ElectricalAmmo
|
-- & itAmmoSlots .~ singleAmmo ElectricalAmmo
|
||||||
-- & itUse . heldMuzzles . ix 0 . mzEffect .~ MuzzleBlink
|
-- & itUse . heldMuzzles . ix 0 . mzEffect .~ MuzzleBlink
|
||||||
-- & itUse . heldMuzzles . ix 0 . mzAmmoPerShot .~ UseExactly 10000000
|
-- & itUse . heldMuzzles . ix 0 . mzAmmoPerShot .~ UseExactly 10000000
|
||||||
& itType .~ HELD BLINKER
|
& itType .~ HELD BLINKER
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ shatterGun =
|
|||||||
defaultHeldItem
|
defaultHeldItem
|
||||||
& itType .~ HELD SHATTERGUN
|
& itType .~ HELD SHATTERGUN
|
||||||
-- & itUse . heldDelay . rateMax .~ 10
|
-- & itUse . heldDelay . rateMax .~ 10
|
||||||
& itAmmoSlots .~ singleAmmo ElectricalAmmo
|
-- & itAmmoSlots .~ singleAmmo ElectricalAmmo
|
||||||
-- & itUse . heldMuzzles . ix 0 . mzPos .~ V2 30 0
|
-- & itUse . heldMuzzles . ix 0 . mzPos .~ V2 30 0
|
||||||
-- & itUse . heldMuzzles . ix 0 . mzInaccuracy .~ 0
|
-- & itUse . heldMuzzles . ix 0 . mzInaccuracy .~ 0
|
||||||
-- & itUse . heldMuzzles . ix 0 . mzEffect .~ MuzzleShatter
|
-- & itUse . heldMuzzles . ix 0 . mzEffect .~ MuzzleShatter
|
||||||
|
|||||||
Reference in New Issue
Block a user