Add in "linear" lWorld to separate time reversable worlds
This commit is contained in:
@@ -23,14 +23,14 @@ flickerMod pl =
|
||||
|
||||
flickerUpdate :: Modification -> World -> World
|
||||
flickerUpdate md w
|
||||
| _mdTimer md > 0 = w & cWorld . modifications . ix mdid . mdTimer -~ 1
|
||||
| _mdTimer md > 0 = w & cWorld . lWorld . modifications . ix mdid . mdTimer -~ 1
|
||||
| otherwise =
|
||||
w & cWorld . lightSources . ix lsid . lsParam . lsCol .~ mdcol
|
||||
& cWorld . modifications . ix mdid
|
||||
w & cWorld . lWorld . lightSources . ix lsid . lsParam . lsCol .~ mdcol
|
||||
& cWorld . lWorld . modifications . ix mdid
|
||||
%~ ((mdTimer .~ newtime) . (mdPoint3 .~ lscol) . (mdBool %~ not))
|
||||
where
|
||||
mdcol = _mdPoint3 md
|
||||
lscol = w ^?! cWorld . lightSources . ix lsid . lsParam . lsCol -- _lsCol $ _lsParam $ _lightSources w IM.! lsid
|
||||
lscol = w ^?! cWorld . lWorld . lightSources . ix lsid . lsParam . lsCol -- _lsCol $ _lsParam $ _lightSources w IM.! lsid
|
||||
lsid = _mdExternalID md
|
||||
mdid = _mdID md
|
||||
timerange
|
||||
|
||||
@@ -31,10 +31,10 @@ putTerminal mc tm =
|
||||
where
|
||||
setids tmpl btpl mcpl w =
|
||||
w
|
||||
& cWorld . terminals . ix tmid . tmButtonID .~ btid
|
||||
& cWorld . terminals . ix tmid . tmMachineID .~ mcid
|
||||
& cWorld . machines . ix mcid . mcMounts . at ObTerminal ?~ tmid
|
||||
& cWorld . buttons . ix btid . btTermMID ?~ tmid
|
||||
& cWorld . lWorld . terminals . ix tmid . tmButtonID .~ btid
|
||||
& cWorld . lWorld . terminals . ix tmid . tmMachineID .~ mcid
|
||||
& cWorld . lWorld . machines . ix mcid . mcMounts . at ObTerminal ?~ tmid
|
||||
& cWorld . lWorld . buttons . ix btid . btTermMID ?~ tmid
|
||||
where
|
||||
tmid = fromJust (_plMID tmpl)
|
||||
btid = fromJust (_plMID btpl)
|
||||
|
||||
Reference in New Issue
Block a user