This commit is contained in:
2025-08-20 16:50:47 +01:00
parent 4bf9ce59d5
commit 8557724fb5
5 changed files with 69 additions and 98 deletions
+1 -2
View File
@@ -81,8 +81,7 @@ decodeSensorType st w = fromMaybe [] $ do
x <- w ^? cWorld . cwGen . cwgParams . sensorCoding . ix st
return [makeTermLine $ show x]
-- ugly, when changing check getSensorInfo
-- ugly
sensorCommand :: World -> Terminal -> PTE.TrieMap Char (PTE.TrieMap Char [TerminalLine])
sensorCommand w tm = PTE.singleton "SENSOR" $ fromMaybe mempty $ do
ProximitySensor _ d r b <- w ^? cWorld . lWorld . machines . ix (tm ^. tmMachineID) . mcType . _McSensor