Broken: refactor terminals
This commit is contained in:
@@ -24,10 +24,7 @@ propLSThen :: PropUpdate
|
||||
-> Placement
|
||||
propLSThen propf lsf ls prop cont = pt0 (PutLS ls)
|
||||
$ \lspl -> Just $ pt0 (PutProp $ prop & prUpdate .~ PropUpdates [propf,PropUpdateLS (fromJust $ _plMID lspl) lsf])
|
||||
-- theupdate (fromJust $ _plMID lspl))
|
||||
$ cont lspl
|
||||
where
|
||||
--theupdate lsid pr w = propf pr w & lightSources . ix lsid %~ lsf pr w
|
||||
|
||||
moveLSThen :: WdP2f --(World -> (Point2,Float))
|
||||
-> Point3 -- ^ light source offset
|
||||
|
||||
@@ -2,15 +2,14 @@
|
||||
module Dodge.Placement.Instance.Terminal
|
||||
( putMessageTerminal
|
||||
, putTerminal
|
||||
, simpleTermMessage
|
||||
-- , simpleTermMessage
|
||||
, terminalColor
|
||||
, accessTerminal
|
||||
-- , accessTerminal
|
||||
) where
|
||||
import Dodge.Data
|
||||
import Dodge.LevelGen.Data
|
||||
import Dodge.Default
|
||||
import Dodge.SoundLogic
|
||||
import Dodge.Terminal
|
||||
import Color
|
||||
import Geometry
|
||||
import LensHelp
|
||||
@@ -61,21 +60,3 @@ termButton = Button
|
||||
|
||||
terminalColor :: Color
|
||||
terminalColor = dark magenta
|
||||
|
||||
|
||||
accessTerminal :: Maybe Int -> World -> World
|
||||
accessTerminal mtmid w = case mtmid of
|
||||
Nothing -> w
|
||||
Just tmid -> w & hud . hudElement .~ DisplayInventory (DisplayTerminal tmid)
|
||||
& terminals . ix tmid . tmInput . tiFocus .~ True
|
||||
& terminals . ix tmid %~ tryToBoot
|
||||
where
|
||||
tryToBoot tm = case _tmStatus tm of
|
||||
TerminalReady -> tm
|
||||
TerminalBusy -> tm
|
||||
TerminalOff -> tm
|
||||
& tmFutureLines .~ _tmBootProgram tm tm w
|
||||
& tmStatus .~ TerminalBusy
|
||||
|
||||
simpleTermMessage :: [String] -> Terminal
|
||||
simpleTermMessage strs = defaultTerminal & tmFutureLines .~ map makeTermLine strs
|
||||
|
||||
Reference in New Issue
Block a user