Remove some Aeson processing
This commit is contained in:
@@ -8,8 +8,8 @@ module Dodge.Data.ComposedItem where
|
|||||||
import Dodge.Data.AmmoType
|
import Dodge.Data.AmmoType
|
||||||
import Dodge.Data.DoubleTree
|
import Dodge.Data.DoubleTree
|
||||||
import Control.Lens
|
import Control.Lens
|
||||||
import Data.Aeson
|
--import Data.Aeson
|
||||||
import Data.Aeson.TH
|
--import Data.Aeson.TH
|
||||||
import Dodge.Data.Item
|
import Dodge.Data.Item
|
||||||
import Geometry.Data
|
import Geometry.Data
|
||||||
import Linear.Quaternion (Quaternion (..))
|
import Linear.Quaternion (Quaternion (..))
|
||||||
@@ -91,5 +91,5 @@ makeLenses ''ItemLink
|
|||||||
makeLenses ''LinkTest
|
makeLenses ''LinkTest
|
||||||
makeLenses ''LinkUpdate
|
makeLenses ''LinkUpdate
|
||||||
makeLenses ''ComposeLinkType
|
makeLenses ''ComposeLinkType
|
||||||
deriveJSON defaultOptions ''ItemStructuralFunction
|
--deriveJSON defaultOptions ''ItemStructuralFunction
|
||||||
deriveJSON defaultOptions ''ComposeLinkType
|
--deriveJSON defaultOptions ''ComposeLinkType
|
||||||
|
|||||||
@@ -7,12 +7,9 @@ module Dodge.Data.WorldEffect where
|
|||||||
|
|
||||||
import Dodge.Data.Input
|
import Dodge.Data.Input
|
||||||
import Dodge.Data.LightSource
|
import Dodge.Data.LightSource
|
||||||
import Dodge.Data.ComposedItem
|
|
||||||
import Dodge.Data.DoubleTree
|
|
||||||
import Data.Aeson
|
import Data.Aeson
|
||||||
import Data.Aeson.TH
|
import Data.Aeson.TH
|
||||||
import Dodge.Data.CreatureEffect
|
import Dodge.Data.CreatureEffect
|
||||||
import Dodge.Data.Item
|
|
||||||
import Dodge.Data.SoundOrigin
|
import Dodge.Data.SoundOrigin
|
||||||
import Geometry.Data
|
import Geometry.Data
|
||||||
import Sound.Data
|
import Sound.Data
|
||||||
@@ -32,7 +29,7 @@ data WdWd
|
|||||||
| MakeStartCloudAt Point3
|
| MakeStartCloudAt Point3
|
||||||
| TorqueCr Float Int
|
| TorqueCr Float Int
|
||||||
| WdWdNegateTrig Int
|
| WdWdNegateTrig Int
|
||||||
| WdWdFromItCrixWdWd (LabelDoubleTree ComposeLinkType Item) Int ItCrWdWd
|
-- | WdWdFromItCrixWdWd (LabelDoubleTree ComposeLinkType Item) Int ItCrWdWd
|
||||||
| MakeTempLight LSParam Int
|
| MakeTempLight LSParam Int
|
||||||
| UseInvItem Int PressType
|
| UseInvItem Int PressType
|
||||||
| WdWdBurstFireRepetition Int Int
|
| WdWdBurstFireRepetition Int Int
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ module Dodge.WorldEffect (
|
|||||||
import Dodge.Item.Grammar
|
import Dodge.Item.Grammar
|
||||||
import Dodge.Creature.Impulse.UseItem
|
import Dodge.Creature.Impulse.UseItem
|
||||||
import Dodge.BlBl
|
import Dodge.BlBl
|
||||||
import Dodge.Data.Input
|
--import Dodge.Data.Input
|
||||||
import Dodge.HeldUse
|
import Dodge.HeldUse
|
||||||
import Dodge.Data.ComposedItem
|
import Dodge.Data.ComposedItem
|
||||||
import Dodge.Data.DoubleTree
|
import Dodge.Data.DoubleTree
|
||||||
@@ -38,9 +38,9 @@ doWdWd we = case we of
|
|||||||
TorqueCr x cid -> torqueCr x cid
|
TorqueCr x cid -> torqueCr x cid
|
||||||
SoundStart so p sid mi -> soundStart so p sid mi
|
SoundStart so p sid mi -> soundStart so p sid mi
|
||||||
WdWdNegateTrig trid -> cWorld . lWorld . triggers . ix trid %~ not
|
WdWdNegateTrig trid -> cWorld . lWorld . triggers . ix trid %~ not
|
||||||
WdWdFromItCrixWdWd it crid f -> \w -> fromMaybe w $ do
|
-- WdWdFromItCrixWdWd it crid f -> \w -> fromMaybe w $ do
|
||||||
cr <- w ^? cWorld . lWorld . creatures . ix crid
|
-- cr <- w ^? cWorld . lWorld . creatures . ix crid
|
||||||
return $ doItCrWdWd f it cr w
|
-- return $ doItCrWdWd f it cr w
|
||||||
MakeTempLight _ 0 -> id
|
MakeTempLight _ 0 -> id
|
||||||
MakeTempLight x t -> (cWorld . lWorld . lights .:~ x)
|
MakeTempLight x t -> (cWorld . lWorld . lights .:~ x)
|
||||||
. (cWorld . lWorld . worldEvents .:~ MakeTempLight x (t-1))
|
. (cWorld . lWorld . worldEvents .:~ MakeTempLight x (t-1))
|
||||||
@@ -51,10 +51,10 @@ doWdWd we = case we of
|
|||||||
allInvLocs (cr ^. crInv) ^? ix invid . _2 . locLDT
|
allInvLocs (cr ^. crInv) ^? ix invid . _2 . locLDT
|
||||||
return $ heldEffectMuzzles itree cr w
|
return $ heldEffectMuzzles itree cr w
|
||||||
|
|
||||||
doItCrWdWd :: ItCrWdWd -> LabelDoubleTree ComposeLinkType Item -> Creature -> World -> World
|
--doItCrWdWd :: ItCrWdWd -> LabelDoubleTree ComposeLinkType Item -> Creature -> World -> World
|
||||||
doItCrWdWd icww = case icww of
|
--doItCrWdWd icww = case icww of
|
||||||
ItCrWdItemHeldEffect -> heldEffect InitialPress
|
-- ItCrWdItemHeldEffect -> heldEffect InitialPress
|
||||||
ItCrWdItemHeldEffectNoHammer -> heldEffectNoHammerCheck
|
-- ItCrWdItemHeldEffectNoHammer -> heldEffectNoHammerCheck
|
||||||
|
|
||||||
accessTerminal :: Maybe Int -> World -> World
|
accessTerminal :: Maybe Int -> World -> World
|
||||||
accessTerminal mtmid w = fromMaybe w $ do
|
accessTerminal mtmid w = fromMaybe w $ do
|
||||||
|
|||||||
Reference in New Issue
Block a user