make options

This commit is contained in:
nek0 2023-12-08 02:26:29 +01:00
parent 0243029d89
commit bf2310a011
2 changed files with 11 additions and 6 deletions

View file

@ -4,12 +4,16 @@ module Server.Options where
import qualified Data.Aeson as Aeson import qualified Data.Aeson as Aeson
import GHC.Generics import GHC.Generics
data Options = Options data Settings = Settings
{ optSocketPath :: FilePath { setSocketPath :: FilePath
, optMapRows :: Int , setMapRows :: Int
, optMapColumns :: Int , setMapColumns :: Int
, optSpawnerProbability :: Float , setSpawnerProbability :: Float
} }
deriving (Show, Generic) deriving (Show, Generic)
instance Aeson.FromJSON Options instance Aeson.FromJSON Settings
data Options = Options
{ optConfLoc :: FilePath
}

View file

@ -43,6 +43,7 @@ executable wizard-wipeout-server
main-is: Main.hs main-is: Main.hs
other-modules: Server.Map other-modules: Server.Map
Server.Map.Snippets Server.Map.Snippets
Server.Types
-- other-extensions: -- other-extensions:
build-depends: base ^>=4.17.2.1 build-depends: base ^>=4.17.2.1
, linear , linear