Allow for terminals to be deactivated
This commit is contained in:
@@ -51,12 +51,11 @@ doWdWd we = case we of
|
||||
loc <- invIndents (cr ^. crInv) ^? ix invid . _2
|
||||
return $ heldEffectMuzzles loc cr w
|
||||
|
||||
accessTerminal :: Maybe Int -> World -> World
|
||||
accessTerminal mtmid w = fromMaybe w $ do
|
||||
tmid <- mtmid
|
||||
accessTerminal :: Int -> World -> World
|
||||
accessTerminal tid w = fromMaybe w $ do -- should possibly check the terminal actually exists
|
||||
return $
|
||||
w & hud . hudElement . subInventory .~ DisplayTerminal tmid
|
||||
& cWorld . lWorld . terminals . ix tmid %~ tryToBoot
|
||||
w & hud . hudElement . subInventory .~ DisplayTerminal tid
|
||||
& cWorld . lWorld . terminals . ix tid %~ tryToBoot
|
||||
where
|
||||
tryToBoot tm = case _tmStatus tm of
|
||||
TerminalTextInput{} -> tm
|
||||
|
||||
Reference in New Issue
Block a user