This commit is contained in:
2025-10-12 21:13:06 +01:00
parent 408b39f160
commit 8b44538048
11 changed files with 23 additions and 137 deletions
-2
View File
@@ -42,7 +42,6 @@ data PSType
| PutProp Prop
| PutTerminal {_unputTerminal :: Terminal}
| PutFlIt {_putItem :: Item}
| PutPPlate PressPlate
| PutBlock {_putBlock :: Block, _putWall :: Wall, _putPoly :: [Point2]}
| PutCoord Point2
| PutMod Modification
@@ -74,7 +73,6 @@ instance ShortShow PSType where
shortShow PutProp {} = "PutProp"
shortShow PutTerminal {} = "PutTerminal"
shortShow PutFlIt {} = "PutFlIt"
shortShow PutPPlate {} = "PutPPlate"
shortShow PutBlock {} = "PutBlock"
shortShow PutCoord {} = "PutCoord"
shortShow PutMod {} = "PutMod"
-3
View File
@@ -30,7 +30,6 @@ module Dodge.Data.LWorld (
module Dodge.Data.Magnet,
module Dodge.Data.Modification,
-- module Dodge.Data.PathGraph,
module Dodge.Data.PressPlate,
module Dodge.Data.Projectile,
module Dodge.Data.Prop,
module Dodge.Data.RadarBlip,
@@ -77,7 +76,6 @@ import Dodge.Data.LinearShockwave
import Dodge.Data.Machine
import Dodge.Data.Magnet
import Dodge.Data.Modification
import Dodge.Data.PressPlate
import Dodge.Data.Projectile
import Dodge.Data.Prop
import Dodge.Data.RadarBlip
@@ -132,7 +130,6 @@ data LWorld = LWorld
, _modifications :: IM.IntMap Modification
, _worldEvents :: [WdWd]
, _delayedEvents :: [(Int, WdWd)]
, _pressPlates :: IM.IntMap PressPlate
, _buttons :: IM.IntMap Button
, _foreShapes :: IM.IntMap ForegroundShape
, _lightSources :: IM.IntMap LightSource
-31
View File
@@ -1,31 +0,0 @@
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TemplateHaskell #-}
module Dodge.Data.PressPlate where
import Control.Lens
import Data.Aeson
import Data.Aeson.TH
import Geometry.Data
import Picture
data PressPlateEvent
= PressPlateId
| PPLevelReset
deriving (Eq, Ord, Show, Read) --Generic, Flat)
data PressPlate = PressPlate
{ _ppPict :: Picture
, _ppPos :: Point2
, _ppRot :: Float
, _ppEvent :: PressPlateEvent
, _ppID :: Int
, _ppText :: String
}
deriving (Eq, Ord, Show, Read) --Generic, Flat)
makeLenses ''PressPlate
deriveJSON defaultOptions ''PressPlateEvent
deriveJSON defaultOptions ''PressPlate