Add indexed world modifications, example use in flicker lights
This commit is contained in:
@@ -70,6 +70,7 @@ data World = World
|
||||
, _randGen :: StdGen
|
||||
, _mousePos :: !Point2
|
||||
, _testString :: World -> [String]
|
||||
, _modifications :: IM.IntMap Modification
|
||||
, _yourID :: !Int
|
||||
, _worldEvents :: World -> World
|
||||
, _pressPlates :: IM.IntMap PressPlate
|
||||
@@ -484,6 +485,15 @@ data PjParam = PjParam
|
||||
, _pjMaxParam :: Int
|
||||
, _pjDisplayParam :: Int -> String
|
||||
}
|
||||
data Modification
|
||||
= ModIDTimerPoint3Bool
|
||||
{ _mdID :: Int
|
||||
, _mdExternalID :: Int
|
||||
, _mdUpdate :: Modification -> World -> World
|
||||
, _mdTimer :: Int
|
||||
, _mdPoint3 :: Point3
|
||||
, _mdBool :: Bool
|
||||
}
|
||||
data Prop
|
||||
= Projectile
|
||||
{ _pjPos :: Point2
|
||||
@@ -792,6 +802,7 @@ makeLenses ''FloorItem
|
||||
makeLenses ''Ammo
|
||||
makeLenses ''PjParam
|
||||
makeLenses ''Prop
|
||||
makeLenses ''Modification
|
||||
makeLenses ''Particle
|
||||
makeLenses ''Wall
|
||||
makeLenses ''WallStructure
|
||||
|
||||
Reference in New Issue
Block a user