Partially successful change of terminals to external entities
This commit is contained in:
+1
-20
@@ -146,7 +146,7 @@ invSelPos w = splitgap + (foldl' (+) 0 . fst $ IM.split invsel (augmentedInvSize
|
||||
| otherwise = 1
|
||||
|
||||
updateTerminal :: World -> World
|
||||
updateTerminal = checkTermDist . updateTerminalLine
|
||||
updateTerminal = checkTermDist
|
||||
|
||||
checkTermDist :: World -> World
|
||||
checkTermDist w = case w ^? hud . hudElement . subInventory . termID of
|
||||
@@ -155,25 +155,6 @@ checkTermDist w = case w ^? hud . hudElement . subInventory . termID of
|
||||
if dist btpos (_crPos $ you w) < 40 then Just w else Nothing
|
||||
Nothing -> w
|
||||
|
||||
updateTerminalLine :: World -> World
|
||||
updateTerminalLine w = case w ^? hud . hudElement . subInventory . termParams . termFutureLines . ix 0 of
|
||||
Nothing -> w
|
||||
Just tl | _tlPause tl > 0 -> w & pointTermParams . termFutureLines . ix 0 . tlPause -~ 1
|
||||
Just (TerminalLineDisplay _ f) -> w & pointTermParams %~
|
||||
( ( termFutureLines %~ tail )
|
||||
. ( termDisplayedLines .:~ f )
|
||||
)
|
||||
Just (TerminalLineEffect _ eff) -> w
|
||||
& pointTermParams . termFutureLines %~ tail
|
||||
& eff (_subInventory . _hudElement $ _hud w)
|
||||
Just (TerminalLineInput _) -> w & pointTermParams %~
|
||||
( ( termFutureLines %~ tail )
|
||||
-- . ( termScrollCommands .~ scrollc )
|
||||
-- . ( termWriteCommands .~ writec )
|
||||
. ( termInput ?~ T.empty ) )
|
||||
where
|
||||
pointTermParams = hud . hudElement . subInventory . termParams
|
||||
|
||||
-- this looks ugly...
|
||||
updateCloseObjects :: World -> World
|
||||
updateCloseObjects w = w & closeObjects .~ unionBy closeObjEq oldCloseFiltered currentClose
|
||||
|
||||
Reference in New Issue
Block a user