Add wire to central laser room

This commit is contained in:
2021-11-21 19:14:17 +00:00
parent 2f3896345d
commit afeb9d2b64
9 changed files with 57 additions and 35 deletions
+4 -4
View File
@@ -15,9 +15,9 @@ import Data.Either
damageSensor
:: (DamageType -> Either Int Int) -- Left gets sensed, Right does damage
-> (Machine -> World -> World)
-> Point2 -> Float -> Placement
damageSensor damF upf p r = pContID (PS p r) ( PutLS theLS)
$ \lsid -> jsps p r $ PutMachine yellow (reverse $ square wdth) defaultMachine
-> PlacementSpot -> Placement
damageSensor damF upf ps = pContID ps ( PutLS theLS)
$ \lsid -> Just $ spNoID ps $ PutMachine yellow (reverse $ square wdth) defaultMachine
{ _mcDraw = sensorSPic
, _mcUpdate = \mc w -> upf mc $ sensorUpdate damF mc w
, _mcLSs = [lsid]
@@ -25,7 +25,7 @@ damageSensor damF upf p r = pContID (PS p r) ( PutLS theLS)
where
theLS = defaultLS { _lsPos = V3 0 0 30 , _lsIntensity = 0.1 }
lightSensor :: (Machine -> World -> World) -> Point2 -> Float -> Placement
lightSensor :: (Machine -> World -> World) -> PlacementSpot -> Placement
lightSensor = damageSensor senseLasering
senseLasering :: DamageType -> Either Int Int