Reify press plates

This commit is contained in:
2022-07-23 22:21:13 +01:00
parent 5de837c8cf
commit 262ac237cd
6 changed files with 43 additions and 15 deletions
+4 -9
View File
@@ -76,7 +76,9 @@ module Dodge.Data
, module Dodge.Data.Gust
, module Dodge.Data.Projectile
, module Dodge.Data.Modification
, module Dodge.Data.PressPlate
) where
import Dodge.Data.PressPlate
import Dodge.Data.Modification
import Dodge.Data.Projectile
import Dodge.Data.Gust
@@ -351,15 +353,8 @@ data TerminalLine
{_tlPause :: Int
,_tlEffect :: Terminal -> World -> World
}
data PressPlate = PressPlate
{ _ppPict :: Picture
, _ppPos :: Point2
, _ppRot :: Float
, _ppEvent :: PressPlate -> World -> World
, _ppID :: Int
, _ppText :: String
}
data FloorItem = FlIt { _flIt :: Item , _flItPos :: Point2 , _flItRot :: Float, _flItID :: Int}
deriving (Eq,Ord,Show,Read)
data IntID a = IntID Int a
@@ -370,6 +365,7 @@ data WorldBeams = WorldBeams
,_positronBeams :: [Beam]
,_electronBeams :: [Beam]
}
deriving (Eq,Ord,Show,Read)
{- Objects without ids.
Update themselves, perhaps with side effects. -}
@@ -688,7 +684,6 @@ makeLenses ''World
makeLenses ''FloorItem
makeLenses ''Prop
makeLenses ''Particle
makeLenses ''PressPlate
makeLenses ''Door
makeLenses ''Terminal
makeLenses ''Machine