Add in "linear" lWorld to separate time reversable worlds
This commit is contained in:
@@ -186,7 +186,7 @@ getSensor f tm w =
|
||||
maybe
|
||||
[]
|
||||
(makeTermPara . map toUpper . show . f)
|
||||
(w ^? cWorld . machines . ix (_tmMachineID tm) . mcType . _McSensor)
|
||||
(w ^? cWorld . lWorld . machines . ix (_tmMachineID tm) . mcType . _McSensor)
|
||||
|
||||
toggleCommand :: TerminalCommand
|
||||
toggleCommand =
|
||||
@@ -212,14 +212,14 @@ sensorCommand =
|
||||
disconnectTerminal :: Terminal -> World -> World
|
||||
disconnectTerminal tm w =
|
||||
w
|
||||
& cWorld . terminals . ix (_tmID tm) . tmStatus .~ TerminalOff
|
||||
& cWorld . lWorld . terminals . ix (_tmID tm) . tmStatus .~ TerminalOff
|
||||
& exitTerminalSubInv
|
||||
& cWorld . terminals . ix (_tmID tm) . tmFutureLines
|
||||
& cWorld . lWorld . terminals . ix (_tmID tm) . tmFutureLines
|
||||
.~ [TerminalLineTerminalEffect 0 TmTmClearDisplayedLines]
|
||||
|
||||
exitTerminalSubInv :: World -> World
|
||||
exitTerminalSubInv w = case w ^? cWorld . hud . hudElement . subInventory . termID of
|
||||
Just _ -> w & cWorld . hud . hudElement . subInventory .~ NoSubInventory
|
||||
exitTerminalSubInv w = case w ^? cWorld . lWorld . hud . hudElement . subInventory . termID of
|
||||
Just _ -> w & cWorld . lWorld . hud . hudElement . subInventory .~ NoSubInventory
|
||||
_ -> w
|
||||
|
||||
damageCodeCommand :: TerminalCommand
|
||||
@@ -233,7 +233,7 @@ damageCodeCommand =
|
||||
|
||||
infoClearInput :: Terminal -> [TerminalLine] -> World -> World
|
||||
infoClearInput tm tls =
|
||||
cWorld . terminals . ix (_tmID tm)
|
||||
cWorld . lWorld . terminals . ix (_tmID tm)
|
||||
%~ ( (tmInput .~ TerminalInput T.empty True (0, 0))
|
||||
. (tmFutureLines ++.~ tls)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user