Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
Updated Animate.lua (forgot to copy it last time)
Mission 1: Fixed a bug where events would cause animations to stutter
Moved a crate
Made the princess and the elder pay attention to Leaks A Lot
Changed the name of the chief to Righteous Beard
Mission 2: -
Mission 3: Removed leftover debug lines
Solved a bug where Dense Cloud could not select weapons during final scene
Made the hogs fave each other during the final animation
Mission 4: Solved a bug where Dense Cloud would appear even if he's dead
{-# LANGUAGE CPP #-}
module Opts
(
getOpts,
) where
import System.Environment
import System.Console.GetOpt
import Data.Maybe ( fromMaybe )
-------------------
import CoreTypes
import Utils
options :: [OptDescr (ServerInfo -> ServerInfo)]
options = [
Option "p" ["port"] (ReqArg readListenPort "PORT") "listen on PORT",
Option "d" ["dedicated"] (ReqArg readDedicated "BOOL") "start as dedicated (True or False)"
]
readListenPort
, readDedicated
:: String -> ServerInfo -> ServerInfo
readListenPort str opts = opts{listenPort = readPort}
where
readPort = fromInteger $ fromMaybe 46631 (maybeRead str :: Maybe Integer)
readDedicated str opts = opts{isDedicated = readDed}
where
readDed = fromMaybe True (maybeRead str :: Maybe Bool)
getOpts :: ServerInfo -> IO ServerInfo
getOpts opts = do
args <- getArgs
case getOpt Permute options args of
(o, [], []) -> return $ foldr ($) opts{runArgs = args} o
(_,_,errs) -> ioError (userError (concat errs ++ usageInfo header options))
where header = "Usage: hedgewars-server [OPTION...]"