Commit before explicit terminals list
This commit is contained in:
+1
-1
@@ -948,7 +948,7 @@ data Block = Block
|
|||||||
data BlockMaterial = WoodBlock | DirtBlock | StoneBlock | GlassBlock | MetalBlock
|
data BlockMaterial = WoodBlock | DirtBlock | StoneBlock | GlassBlock | MetalBlock
|
||||||
data Terminal = Terminal
|
data Terminal = Terminal
|
||||||
{ _tmID :: Int
|
{ _tmID :: Int
|
||||||
, _tmParams :: TerminalParams
|
, _tmProgram :: Terminal -> World -> TerminalParams
|
||||||
, _tmButtonID :: Int
|
, _tmButtonID :: Int
|
||||||
, _tmMachineID :: Int
|
, _tmMachineID :: Int
|
||||||
, _tmName :: String
|
, _tmName :: String
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
module Dodge.Placement.Instance.Analyser
|
module Dodge.Placement.Instance.Analyser
|
||||||
( analyser'
|
( analyser
|
||||||
, testYouHave
|
, testYouHave
|
||||||
, testYourHealth
|
, testYourHealth
|
||||||
) where
|
) where
|
||||||
@@ -48,7 +48,7 @@ initMCUpdate initup f mc
|
|||||||
= (machines . ix (_mcID mc) . mcUpdate .~ f)
|
= (machines . ix (_mcID mc) . mcUpdate .~ f)
|
||||||
. initup mc
|
. initup mc
|
||||||
|
|
||||||
analyser'
|
analyser
|
||||||
:: [String] -- | initial text
|
:: [String] -- | initial text
|
||||||
-> String -- | succeed text
|
-> String -- | succeed text
|
||||||
-> String -- | fail text
|
-> String -- | fail text
|
||||||
@@ -57,7 +57,7 @@ analyser'
|
|||||||
-> PlacementSpot
|
-> PlacementSpot
|
||||||
-> PlacementSpot
|
-> PlacementSpot
|
||||||
-> Placement
|
-> Placement
|
||||||
analyser' starts sucs fails afters upf pslight psmc = extTrigLitPos pslight $ \tp ->
|
analyser starts sucs fails afters upf pslight psmc = extTrigLitPos pslight $ \tp ->
|
||||||
Just $ updatebuttonname $ plSpot .~ psmc $ putTerminal' aquamarine (termupdate tp)
|
Just $ updatebuttonname $ plSpot .~ psmc $ putTerminal' aquamarine (termupdate tp)
|
||||||
where
|
where
|
||||||
termupdate tp btid = initMCUpdate
|
termupdate tp btid = initMCUpdate
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ putTerminal col f = ps0PushPSw PutNothing $ \_ _ -> Just $
|
|||||||
$ \pl -> Just $ pt0 (PutMachine col (reverse $ square 10) defaultMachine
|
$ \pl -> Just $ pt0 (PutMachine col (reverse $ square 10) defaultMachine
|
||||||
{ _mcDraw = noPic . terminalShape col
|
{ _mcDraw = noPic . terminalShape col
|
||||||
, _mcHP = 100
|
, _mcHP = 100
|
||||||
, _mcUpdate = basicMachineUpdate $ machineAddSound fridgeHumS (\_ -> id)
|
, _mcUpdate = basicMachineUpdate $ machineAddSound fridgeHumS (const id)
|
||||||
, _mcDeath = \mc -> (buttons . at (fromJust (_plMID pl)) .~ Nothing)
|
, _mcDeath = \mc -> (buttons . at (fromJust (_plMID pl)) .~ Nothing)
|
||||||
. makeExplosionAt (_mcPos mc)
|
. makeExplosionAt (_mcPos mc)
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -118,7 +118,7 @@ analyserByDoor sa sb sc sd mcf outplid rm = rm
|
|||||||
]
|
]
|
||||||
& rmOutPmnt .~
|
& rmOutPmnt .~
|
||||||
[OutPlacement
|
[OutPlacement
|
||||||
(analyser' sa sb sc sd
|
(analyser sa sb sc sd
|
||||||
mcf
|
mcf
|
||||||
(atFstLnkOutShiftBy (\(p,a) -> (p +.+ rotateV a (V2 18.5 (-2.5)), a)))
|
(atFstLnkOutShiftBy (\(p,a) -> (p +.+ rotateV a (V2 18.5 (-2.5)), a)))
|
||||||
(atFstLnkOutShiftBy sensorshift)
|
(atFstLnkOutShiftBy sensorshift)
|
||||||
|
|||||||
Reference in New Issue
Block a user