This commit is contained in:
2025-06-07 10:07:31 +01:00
parent b4bdfbf2c3
commit 7d90db6c4c
2 changed files with 32 additions and 0 deletions
+13
View File
@@ -0,0 +1,13 @@
module Dodge.Cloud where
import Dodge.Data.Cloud
cRad :: Cloud -> Float
cRad cl = case _clType cl of
SmokeCloud -> 0
FlamerSmokeCloud -> 6
RocketCloud -> 15
StoneDust -> 15
CryoReleaseCloud -> 10
GasCloud -> 15
+19
View File
@@ -0,0 +1,19 @@
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TemplateHaskell #-}
module Dodge.Data.Machine.Sensor.Type
where
import Data.Aeson
import Data.Aeson.TH
data SensorType
= LaserSensor
| ElectricSensor
| ThermalSensor
| PhysicalSensor
deriving (Eq,Ord,Show,Read,Bounded,Enum)
deriveJSON defaultOptions ''SensorType
instance ToJSONKey SensorType
instance FromJSONKey SensorType