Allow for more changable terminal screen colors
This commit is contained in:
@@ -2,6 +2,7 @@ module Dodge.Machine.Draw (
|
||||
drawMachine,
|
||||
) where
|
||||
|
||||
import Dodge.Terminal.Color
|
||||
import Control.Lens
|
||||
import Data.Maybe
|
||||
import Dodge.Data.LWorld
|
||||
@@ -41,22 +42,18 @@ terminalShape lw mc = fromMaybe mempty $ do
|
||||
[V3 10 10 20, V3 (-10) 10 20, V3 (-10) (-10) 10, V3 10 (-10) 10]
|
||||
(addZ 0 `map` rectWH 10 10)
|
||||
)
|
||||
<> colorSH
|
||||
(getTermScreenColor term)
|
||||
<> screenbackground (getcol term)
|
||||
where
|
||||
getcol term = fromMaybe black $ termScreenColor term
|
||||
screenbackground col = colorSH
|
||||
col
|
||||
( prismBox
|
||||
Small
|
||||
Superfluous
|
||||
Typical
|
||||
[V3 8 8 20, V3 (-8) 8 20, V3 0 (-8) 10]
|
||||
[V3 8 8 19, V3 (-8) 8 19, V3 0 (-8) 9]
|
||||
--[V3 8 8 20, V3 (-8) 8 20, V3 (-8) (-8) 10, V3 8 (-8) 10]
|
||||
--[V3 8 8 19, V3 (-8) 8 19, V3 (-8) (-8) 9, V3 8 (-8) 9]
|
||||
)
|
||||
|
||||
getTermScreenColor :: Terminal -> Color
|
||||
getTermScreenColor tm = case _tmStatus tm of
|
||||
TerminalOff -> black
|
||||
_ -> _tmScreenColor tm
|
||||
|
||||
drawBaseMachine :: Float -> Machine -> SPic
|
||||
drawBaseMachine h mc =
|
||||
noPic
|
||||
|
||||
@@ -2,6 +2,7 @@ module Dodge.Machine.Update (
|
||||
updateMachine,
|
||||
) where
|
||||
|
||||
import Dodge.Terminal.Color
|
||||
import Control.Monad
|
||||
import Data.List (partition)
|
||||
import Data.Maybe
|
||||
@@ -34,8 +35,7 @@ terminalScreenGlow :: Machine -> World -> World
|
||||
terminalScreenGlow mc w = fromMaybe w $ do
|
||||
tid <- mc ^? mcMounts . ix ObTerminal
|
||||
term <- w ^? cWorld . lWorld . terminals . ix tid
|
||||
guard (_tmStatus term /= TerminalOff)
|
||||
let V4 x y z _ = _tmScreenColor term
|
||||
V4 x y z _ <- termScreenColor term
|
||||
return $
|
||||
w & cWorld . lWorld . tempLightSources
|
||||
.:~ TLS
|
||||
|
||||
Reference in New Issue
Block a user