More nesting of fields in CWorld

This commit is contained in:
2022-08-19 11:41:07 +01:00
parent 3b7841677a
commit 2e34481ab1
9 changed files with 58 additions and 40 deletions
+9 -3
View File
@@ -173,7 +173,6 @@ data CWorld = CWorld
, _decorations :: IM.IntMap Picture
, _foregroundShapes :: IM.IntMap ForegroundShape
, _corpses :: IM.IntMap Corpse
, _clickMousePos :: Point2
, _pathGraph :: Gr Point2 PathEdge
, _pnZoning :: IM.IntMap (IM.IntMap [(Int, Point2)]) --Zoning IM.IntMap Creature
, _peZoning :: IM.IntMap (IM.IntMap [(Int, Int, PathEdge)]) --Zoning IM.IntMap Creature
@@ -184,12 +183,17 @@ data CWorld = CWorld
, _seenLocations :: IM.IntMap (WdP2, String)
, _selLocation :: Int
, _distortions :: [Distortion]
, _maybeWorld :: Maybe' CWorld
, _cwTime :: CWTime
, _cwGen :: CWGen
}
data CWTime = CWTime
{ _maybeWorld :: Maybe' CWorld
, _rewindWorlds :: [CWorld]
, _worldClock :: Int
, _deathDelay :: Maybe Int
, _cwGen :: CWGen
}
data CWGen = CWGen
{ _cwgParams :: GenParams
@@ -211,10 +215,12 @@ deriveJSON defaultOptions ''CWorld
deriveJSON defaultOptions ''WorldBeams
deriveJSON defaultOptions ''CWCam
deriveJSON defaultOptions ''CWGen
deriveJSON defaultOptions ''CWTime
makeLenses ''CWorld
makeLenses ''WorldBeams
makeLenses ''CWCam
makeLenses ''CWGen
makeLenses ''CWTime
-- $($(derive [d|
-- instance Deriving (Store CWorld)
-- |]))
+1
View File
@@ -39,6 +39,7 @@ data World = World
, _lrLine :: (Point2, Point2)
, _lSelect :: Point2
, _rSelect :: Point2
, _clickMousePos :: Point2
, _backspaceTimer :: Int
, _timeFlow :: TimeFlowStatus
, _rbOptions :: RightButtonOptions