Work on terminals and machines

This commit is contained in:
2022-06-06 00:14:46 +01:00
parent a6141fd79a
commit b0173c3778
8 changed files with 81 additions and 66 deletions
+3 -3
View File
@@ -23,7 +23,7 @@ damageSensor
-> PlacementSpot -> Placement
damageSensor dt wdth upf ps = pContID ps (PutLS $ lsPosCol (V3 0 0 30) 0.1)
$ \lsid -> Just $ spNoID ps $ PutUsingGenParams
$ \gw -> (,) gw $ PutMachine yellow (reverse $ square wdth) defaultMachine
$ \gw -> (,) gw $ PutMachine (reverse $ square wdth) (defaultMachine & mcColor .~ yellow)
{ _mcDraw = sensorSPic wdth $ _sensorCoding (_genParams gw) M.! dt
, _mcUpdate = \mc -> upf mc . sensorUpdate dt mc
, _mcSensor = SensorToggleAmount False 0
@@ -54,8 +54,8 @@ damageUsing dt dm
| otherwise = Right 0
sensorSPic :: Float -> (PaletteColor,DecorationShape) -> Machine -> SPic
sensorSPic wdth (pc,ds) _ = noPic
$ colorSH yellow (upperPrismPoly 25 (square wdth))
sensorSPic wdth (pc,ds) mc = noPic
$ colorSH (_mcColor mc) (upperPrismPoly 25 (square wdth))
<> decorationToShape ds wdth wdth 25 col col
where
col = paletteToColor pc