Move past/future worlds outside of serialised data structure
This commit is contained in:
@@ -27,33 +27,12 @@ data CWorld = CWorld
|
||||
, _cwCamPos :: CamPos
|
||||
, _cwGen :: CWGen
|
||||
, _cClock :: Int
|
||||
, _pastWorlds :: [LWorld]
|
||||
, _timeFlow :: TimeFlowStatus
|
||||
, _seenWalls :: IS.IntSet
|
||||
, _cwTiles :: [Tile]
|
||||
, _pathGraph :: Gr Point2 PathEdge
|
||||
, _numberFloorVerxs :: Int
|
||||
}
|
||||
|
||||
data TimeFlowStatus
|
||||
= DeathTime
|
||||
{ _deathDelay :: Int }
|
||||
| NormalTimeFlow
|
||||
| ScrollTimeFlow
|
||||
{ _scrollSmoothing :: Int
|
||||
, _reverseAmount :: Int
|
||||
, _futureWorlds :: [LWorld]
|
||||
, _scrollItemLocation :: Int
|
||||
}
|
||||
| RewindLeftClick
|
||||
{ _reverseAmount :: Int
|
||||
, _scrollItemLocation :: Int
|
||||
}
|
||||
| PausedTimeFlow
|
||||
{ _timeFlowCharge :: Int
|
||||
, _scrollItemLocation :: Int
|
||||
}
|
||||
|
||||
data CWGen = CWGen
|
||||
{ _cwgParams :: GenParams
|
||||
, _cwgWorldBounds :: Bounds
|
||||
@@ -67,11 +46,10 @@ data CWGen = CWGen
|
||||
|
||||
makeLenses ''CWorld
|
||||
makeLenses ''CWGen
|
||||
makeLenses ''TimeFlowStatus
|
||||
concat
|
||||
<$> mapM
|
||||
(deriveJSON defaultOptions)
|
||||
[ ''CWGen
|
||||
, ''CWorld
|
||||
, ''TimeFlowStatus
|
||||
-- , ''TimeFlowStatus
|
||||
]
|
||||
|
||||
@@ -34,6 +34,8 @@ data WorldEventFlag = InventoryChange
|
||||
|
||||
data World = World
|
||||
{ _cWorld :: CWorld
|
||||
, _pastWorlds :: [LWorld]
|
||||
, _timeFlow :: TimeFlowStatus
|
||||
, _randGen :: StdGen
|
||||
, _toPlaySounds :: M.Map SoundOrigin Sound
|
||||
, _playingSounds :: M.Map SoundOrigin Sound
|
||||
@@ -50,6 +52,27 @@ data World = World
|
||||
, _gsZoning :: IntMap (IntMap IntSet)
|
||||
}
|
||||
|
||||
data TimeFlowStatus
|
||||
= DeathTime
|
||||
{ _deathDelay :: Int }
|
||||
| NormalTimeFlow
|
||||
| ScrollTimeFlow
|
||||
{ _scrollSmoothing :: Int
|
||||
, _reverseAmount :: Int
|
||||
, _futureWorlds :: [LWorld]
|
||||
, _scrollItemLocation :: Int
|
||||
}
|
||||
| RewindLeftClick
|
||||
{ _reverseAmount :: Int
|
||||
, _scrollItemLocation :: Int
|
||||
}
|
||||
| PausedTimeFlow
|
||||
{ _timeFlowCharge :: Int
|
||||
, _scrollItemLocation :: Int
|
||||
}
|
||||
|
||||
|
||||
-- deriving (Eq, Ord, Show, Read) --Generic, Flat)
|
||||
|
||||
makeLenses ''TimeFlowStatus
|
||||
makeLenses ''World
|
||||
|
||||
Reference in New Issue
Block a user