{-# LANGUAGE GeneralizedNewtypeDeriving #-}
-- | The client UI session state.
module Game.LambdaHack.Client.UI.SessionUI
  ( SessionUI(..), ItemDictUI, AimMode(..), RunParams(..), LastRecord(..)
  , HintMode(..)
  , emptySessionUI, toggleMarkVision, toggleMarkSmell, getActorUI
  ) where

import Prelude ()

import Game.LambdaHack.Core.Prelude

import           Data.Binary
import qualified Data.EnumMap.Strict as EM
import qualified Data.EnumSet as ES
import qualified Data.Map.Strict as M
import           Data.Time.Clock.POSIX

import           Game.LambdaHack.Client.State
import           Game.LambdaHack.Client.UI.ActorUI
import           Game.LambdaHack.Client.UI.ContentClientUI
import           Game.LambdaHack.Client.UI.Frontend
import           Game.LambdaHack.Client.UI.ItemSlot
import qualified Game.LambdaHack.Client.UI.Key as K
import           Game.LambdaHack.Client.UI.Msg
import           Game.LambdaHack.Client.UI.UIOptions
import           Game.LambdaHack.Common.Point
import           Game.LambdaHack.Common.Time
import           Game.LambdaHack.Common.Types
import           Game.LambdaHack.Definition.Defs

-- | The information that is used across a client playing session,
-- including many consecutive games in a single session.
-- Some of it is saved, some is reset when a new playing session starts.
-- An important component is the frontend session.
data SessionUI = SessionUI
  { SessionUI -> Maybe Target
sxhair         :: Maybe Target       -- ^ the common xhair
  , SessionUI -> ActorDictUI
sactorUI       :: ActorDictUI        -- ^ assigned actor UI presentations
  , SessionUI -> ItemDictUI
sitemUI        :: ItemDictUI         -- ^ assigned item first seen level
  , SessionUI -> ItemSlots
sslots         :: ItemSlots          -- ^ map from slots to items
  , SessionUI -> Maybe (CStore, CStore)
slastItemMove  :: Maybe (CStore, CStore)
                                         -- ^ last item move stores
  , SessionUI -> ChanFrontend
schanF         :: ChanFrontend       -- ^ connection with the frontend
  , SessionUI -> CCUI
sccui          :: CCUI               -- ^ UI client content
  , SessionUI -> UIOptions
sUIOptions     :: UIOptions          -- ^ UI options as set by the player
  , SessionUI -> Maybe AimMode
saimMode       :: Maybe AimMode      -- ^ aiming mode
  , SessionUI -> Bool
sxhairMoused   :: Bool               -- ^ last mouse aiming not vacuus
  , SessionUI -> Maybe (ItemId, CStore, Bool)
sitemSel       :: Maybe (ItemId, CStore, Bool)
                                    -- ^ selected item, if any, it's store and
                                    --   whether to override suitability check
  , SessionUI -> EnumSet ActorId
sselected      :: ES.EnumSet ActorId
                                    -- ^ the set of currently selected actors
  , SessionUI -> Maybe RunParams
srunning       :: Maybe RunParams
                                    -- ^ parameters of the current run, if any
  , SessionUI -> History
shistory       :: History       -- ^ history of messages
  , SessionUI -> Point
spointer       :: Point         -- ^ mouse pointer position
  , SessionUI -> LastRecord
slastRecord    :: LastRecord    -- ^ state of key sequence recording
  , SessionUI -> [KM]
slastPlay      :: [K.KM]        -- ^ state of key sequence playback
  , SessionUI -> EnumSet ActorId
slastLost      :: ES.EnumSet ActorId
                                    -- ^ actors that just got out of sight
  , SessionUI -> Int
swaitTimes     :: Int           -- ^ player just waited this many times
  , SessionUI -> Bool
swasAutomated  :: Bool          -- ^ the player just exited AI automation
  , SessionUI -> Bool
smarkVision    :: Bool          -- ^ mark leader and party FOV
  , SessionUI -> Bool
smarkSmell     :: Bool          -- ^ mark smell, if the leader can smell
  , SessionUI -> Map String Int
smenuIxMap     :: M.Map String Int
                                    -- ^ indices of last used menu items
  , SessionUI -> Bool
sdisplayNeeded :: Bool          -- ^ current level needs displaying
  , SessionUI -> HintMode
shintMode      :: HintMode      -- ^ how to show keys hints when no messages
  , SessionUI -> Bool
sreportNull    :: Bool          -- ^ whether no report created last UI turn
                                    --   or the report wiped out from screen
  , SessionUI -> POSIXTime
sstart         :: POSIXTime     -- ^ this session start time
  , SessionUI -> POSIXTime
sgstart        :: POSIXTime     -- ^ this game start time
  , SessionUI -> Time
sallTime       :: Time          -- ^ clips from start of session
                                    --   to current game start
  , SessionUI -> Int
snframes       :: Int           -- ^ this game current frame count
  , SessionUI -> Int
sallNframes    :: Int           -- ^ frame count from start of session
                                    --   to current game start
  }

type ItemDictUI = EM.EnumMap ItemId LevelId

-- | Current aiming mode of a client.
newtype AimMode = AimMode { AimMode -> LevelId
aimLevelId :: LevelId }
  deriving (Int -> AimMode -> ShowS
[AimMode] -> ShowS
AimMode -> String
(Int -> AimMode -> ShowS)
-> (AimMode -> String) -> ([AimMode] -> ShowS) -> Show AimMode
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AimMode] -> ShowS
$cshowList :: [AimMode] -> ShowS
show :: AimMode -> String
$cshow :: AimMode -> String
showsPrec :: Int -> AimMode -> ShowS
$cshowsPrec :: Int -> AimMode -> ShowS
Show, AimMode -> AimMode -> Bool
(AimMode -> AimMode -> Bool)
-> (AimMode -> AimMode -> Bool) -> Eq AimMode
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AimMode -> AimMode -> Bool
$c/= :: AimMode -> AimMode -> Bool
== :: AimMode -> AimMode -> Bool
$c== :: AimMode -> AimMode -> Bool
Eq, Get AimMode
[AimMode] -> Put
AimMode -> Put
(AimMode -> Put)
-> Get AimMode -> ([AimMode] -> Put) -> Binary AimMode
forall t. (t -> Put) -> Get t -> ([t] -> Put) -> Binary t
putList :: [AimMode] -> Put
$cputList :: [AimMode] -> Put
get :: Get AimMode
$cget :: Get AimMode
put :: AimMode -> Put
$cput :: AimMode -> Put
Binary)

-- | Parameters of the current run.
data RunParams = RunParams
  { RunParams -> ActorId
runLeader  :: ActorId         -- ^ the original leader from run start
  , RunParams -> [ActorId]
runMembers :: [ActorId]       -- ^ the list of actors that take part
  , RunParams -> Bool
runInitial :: Bool            -- ^ initial run continuation by any
                                  --   run participant, including run leader
  , RunParams -> Maybe Text
runStopMsg :: Maybe Text      -- ^ message with the next stop reason
  , RunParams -> Int
runWaiting :: Int             -- ^ waiting for others to move out of the way
  }
  deriving (Int -> RunParams -> ShowS
[RunParams] -> ShowS
RunParams -> String
(Int -> RunParams -> ShowS)
-> (RunParams -> String)
-> ([RunParams] -> ShowS)
-> Show RunParams
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RunParams] -> ShowS
$cshowList :: [RunParams] -> ShowS
show :: RunParams -> String
$cshow :: RunParams -> String
showsPrec :: Int -> RunParams -> ShowS
$cshowsPrec :: Int -> RunParams -> ShowS
Show)

-- | State of last recorded and currently being recorded key sequences.
data LastRecord = LastRecord
  { LastRecord -> [KM]
currentKeys  :: [K.KM]  -- ^ accumulated keys of the current command
  , LastRecord -> [KM]
previousKeys :: [K.KM]  -- ^ keys of the rest of the recorded command batch
  , LastRecord -> Int
freeSpace    :: Int     -- ^ space left for commands to record in this batch
  }

data HintMode =
    HintAbsent
  | HintShown
  | HintWiped
  deriving (HintMode -> HintMode -> Bool
(HintMode -> HintMode -> Bool)
-> (HintMode -> HintMode -> Bool) -> Eq HintMode
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: HintMode -> HintMode -> Bool
$c/= :: HintMode -> HintMode -> Bool
== :: HintMode -> HintMode -> Bool
$c== :: HintMode -> HintMode -> Bool
Eq, Int -> HintMode
HintMode -> Int
HintMode -> [HintMode]
HintMode -> HintMode
HintMode -> HintMode -> [HintMode]
HintMode -> HintMode -> HintMode -> [HintMode]
(HintMode -> HintMode)
-> (HintMode -> HintMode)
-> (Int -> HintMode)
-> (HintMode -> Int)
-> (HintMode -> [HintMode])
-> (HintMode -> HintMode -> [HintMode])
-> (HintMode -> HintMode -> [HintMode])
-> (HintMode -> HintMode -> HintMode -> [HintMode])
-> Enum HintMode
forall a.
(a -> a)
-> (a -> a)
-> (Int -> a)
-> (a -> Int)
-> (a -> [a])
-> (a -> a -> [a])
-> (a -> a -> [a])
-> (a -> a -> a -> [a])
-> Enum a
enumFromThenTo :: HintMode -> HintMode -> HintMode -> [HintMode]
$cenumFromThenTo :: HintMode -> HintMode -> HintMode -> [HintMode]
enumFromTo :: HintMode -> HintMode -> [HintMode]
$cenumFromTo :: HintMode -> HintMode -> [HintMode]
enumFromThen :: HintMode -> HintMode -> [HintMode]
$cenumFromThen :: HintMode -> HintMode -> [HintMode]
enumFrom :: HintMode -> [HintMode]
$cenumFrom :: HintMode -> [HintMode]
fromEnum :: HintMode -> Int
$cfromEnum :: HintMode -> Int
toEnum :: Int -> HintMode
$ctoEnum :: Int -> HintMode
pred :: HintMode -> HintMode
$cpred :: HintMode -> HintMode
succ :: HintMode -> HintMode
$csucc :: HintMode -> HintMode
Enum, HintMode
HintMode -> HintMode -> Bounded HintMode
forall a. a -> a -> Bounded a
maxBound :: HintMode
$cmaxBound :: HintMode
minBound :: HintMode
$cminBound :: HintMode
Bounded)

emptySessionUI :: UIOptions -> SessionUI
emptySessionUI :: UIOptions -> SessionUI
emptySessionUI sUIOptions :: UIOptions
sUIOptions =
  $WSessionUI :: Maybe Target
-> ActorDictUI
-> ItemDictUI
-> ItemSlots
-> Maybe (CStore, CStore)
-> ChanFrontend
-> CCUI
-> UIOptions
-> Maybe AimMode
-> Bool
-> Maybe (ItemId, CStore, Bool)
-> EnumSet ActorId
-> Maybe RunParams
-> History
-> Point
-> LastRecord
-> [KM]
-> EnumSet ActorId
-> Int
-> Bool
-> Bool
-> Bool
-> Map String Int
-> Bool
-> HintMode
-> Bool
-> POSIXTime
-> POSIXTime
-> Time
-> Int
-> Int
-> SessionUI
SessionUI
    { sxhair :: Maybe Target
sxhair = Maybe Target
forall a. Maybe a
Nothing
    , sactorUI :: ActorDictUI
sactorUI = ActorDictUI
forall k a. EnumMap k a
EM.empty
    , sitemUI :: ItemDictUI
sitemUI = ItemDictUI
forall k a. EnumMap k a
EM.empty
    , sslots :: ItemSlots
sslots = EnumMap SLore SingleItemSlots -> ItemSlots
ItemSlots (EnumMap SLore SingleItemSlots -> ItemSlots)
-> EnumMap SLore SingleItemSlots -> ItemSlots
forall a b. (a -> b) -> a -> b
$ [(SLore, SingleItemSlots)] -> EnumMap SLore SingleItemSlots
forall k a. Enum k => [(k, a)] -> EnumMap k a
EM.fromAscList
               ([(SLore, SingleItemSlots)] -> EnumMap SLore SingleItemSlots)
-> [(SLore, SingleItemSlots)] -> EnumMap SLore SingleItemSlots
forall a b. (a -> b) -> a -> b
$ [SLore] -> [SingleItemSlots] -> [(SLore, SingleItemSlots)]
forall a b. [a] -> [b] -> [(a, b)]
zip [SLore
forall a. Bounded a => a
minBound..SLore
forall a. Bounded a => a
maxBound] (SingleItemSlots -> [SingleItemSlots]
forall a. a -> [a]
repeat SingleItemSlots
forall k a. EnumMap k a
EM.empty)
    , slastItemMove :: Maybe (CStore, CStore)
slastItemMove = Maybe (CStore, CStore)
forall a. Maybe a
Nothing
    , schanF :: ChanFrontend
schanF = (forall a. FrontReq a -> IO a) -> ChanFrontend
ChanFrontend ((forall a. FrontReq a -> IO a) -> ChanFrontend)
-> (forall a. FrontReq a -> IO a) -> ChanFrontend
forall a b. (a -> b) -> a -> b
$ IO a -> FrontReq a -> IO a
forall a b. a -> b -> a
const (IO a -> FrontReq a -> IO a) -> IO a -> FrontReq a -> IO a
forall a b. (a -> b) -> a -> b
$
        String -> IO a
forall a. HasCallStack => String -> a
error (String -> IO a) -> String -> IO a
forall a b. (a -> b) -> a -> b
$ "emptySessionUI: ChanFrontend" String -> () -> String
forall v. Show v => String -> v -> String
`showFailure` ()
    , sccui :: CCUI
sccui = CCUI
emptyCCUI
    , UIOptions
sUIOptions :: UIOptions
sUIOptions :: UIOptions
sUIOptions
    , saimMode :: Maybe AimMode
saimMode = Maybe AimMode
forall a. Maybe a
Nothing
    , sxhairMoused :: Bool
sxhairMoused = Bool
True
    , sitemSel :: Maybe (ItemId, CStore, Bool)
sitemSel = Maybe (ItemId, CStore, Bool)
forall a. Maybe a
Nothing
    , sselected :: EnumSet ActorId
sselected = EnumSet ActorId
forall k. EnumSet k
ES.empty
    , srunning :: Maybe RunParams
srunning = Maybe RunParams
forall a. Maybe a
Nothing
    , shistory :: History
shistory = Int -> History
emptyHistory 0
    , spointer :: Point
spointer = Point
originPoint
    , slastRecord :: LastRecord
slastRecord = [KM] -> [KM] -> Int -> LastRecord
LastRecord [] [] 0
    , slastPlay :: [KM]
slastPlay = []
    , slastLost :: EnumSet ActorId
slastLost = EnumSet ActorId
forall k. EnumSet k
ES.empty
    , swaitTimes :: Int
swaitTimes = 0
    , swasAutomated :: Bool
swasAutomated = Bool
False
    , smarkVision :: Bool
smarkVision = Bool
False
    , smarkSmell :: Bool
smarkSmell = Bool
True
    , smenuIxMap :: Map String Int
smenuIxMap = String -> Int -> Map String Int
forall k a. k -> a -> Map k a
M.singleton "main" (2 Int -> Int -> Int
forall a. Num a => a -> a -> a
- 9)  -- subtracting @initIx@
    , sdisplayNeeded :: Bool
sdisplayNeeded = Bool
False
    , sreportNull :: Bool
sreportNull = Bool
True
    , shintMode :: HintMode
shintMode = HintMode
HintAbsent
    , sstart :: POSIXTime
sstart = 0
    , sgstart :: POSIXTime
sgstart = 0
    , sallTime :: Time
sallTime = Time
timeZero
    , snframes :: Int
snframes = 0
    , sallNframes :: Int
sallNframes = 0
    }

toggleMarkVision :: SessionUI -> SessionUI
toggleMarkVision :: SessionUI -> SessionUI
toggleMarkVision s :: SessionUI
s@SessionUI{Bool
smarkVision :: Bool
smarkVision :: SessionUI -> Bool
smarkVision} = SessionUI
s {smarkVision :: Bool
smarkVision = Bool -> Bool
not Bool
smarkVision}

toggleMarkSmell :: SessionUI -> SessionUI
toggleMarkSmell :: SessionUI -> SessionUI
toggleMarkSmell s :: SessionUI
s@SessionUI{Bool
smarkSmell :: Bool
smarkSmell :: SessionUI -> Bool
smarkSmell} = SessionUI
s {smarkSmell :: Bool
smarkSmell = Bool -> Bool
not Bool
smarkSmell}

getActorUI :: ActorId -> SessionUI -> ActorUI
getActorUI :: ActorId -> SessionUI -> ActorUI
getActorUI aid :: ActorId
aid sess :: SessionUI
sess =
  ActorUI -> ActorId -> ActorDictUI -> ActorUI
forall k a. Enum k => a -> k -> EnumMap k a -> a
EM.findWithDefault (String -> ActorUI
forall a. HasCallStack => String -> a
error (String -> ActorUI) -> String -> ActorUI
forall a b. (a -> b) -> a -> b
$ "" String -> (ActorId, ActorDictUI) -> String
forall v. Show v => String -> v -> String
`showFailure` (ActorId
aid, SessionUI -> ActorDictUI
sactorUI SessionUI
sess)) ActorId
aid
  (ActorDictUI -> ActorUI) -> ActorDictUI -> ActorUI
forall a b. (a -> b) -> a -> b
$ SessionUI -> ActorDictUI
sactorUI SessionUI
sess

instance Binary SessionUI where
  put :: SessionUI -> Put
put SessionUI{..} = do
    Maybe Target -> Put
forall t. Binary t => t -> Put
put Maybe Target
sxhair
    ActorDictUI -> Put
forall t. Binary t => t -> Put
put ActorDictUI
sactorUI
    ItemDictUI -> Put
forall t. Binary t => t -> Put
put ItemDictUI
sitemUI
    ItemSlots -> Put
forall t. Binary t => t -> Put
put ItemSlots
sslots
    UIOptions -> Put
forall t. Binary t => t -> Put
put UIOptions
sUIOptions
    Maybe AimMode -> Put
forall t. Binary t => t -> Put
put Maybe AimMode
saimMode
    Maybe (ItemId, CStore, Bool) -> Put
forall t. Binary t => t -> Put
put Maybe (ItemId, CStore, Bool)
sitemSel
    EnumSet ActorId -> Put
forall t. Binary t => t -> Put
put EnumSet ActorId
sselected
    Maybe RunParams -> Put
forall t. Binary t => t -> Put
put Maybe RunParams
srunning
    History -> Put
forall t. Binary t => t -> Put
put History
shistory
    Bool -> Put
forall t. Binary t => t -> Put
put Bool
smarkVision
    Bool -> Put
forall t. Binary t => t -> Put
put Bool
smarkSmell
    Bool -> Put
forall t. Binary t => t -> Put
put Bool
sdisplayNeeded
  get :: Get SessionUI
get = do
    Maybe Target
sxhair <- Get (Maybe Target)
forall t. Binary t => Get t
get
    ActorDictUI
sactorUI <- Get ActorDictUI
forall t. Binary t => Get t
get
    ItemDictUI
sitemUI <- Get ItemDictUI
forall t. Binary t => Get t
get
    ItemSlots
sslots <- Get ItemSlots
forall t. Binary t => Get t
get
    UIOptions
sUIOptions <- Get UIOptions
forall t. Binary t => Get t
get  -- is overwritten ASAP, but useful for, e.g., crash debug
    Maybe AimMode
saimMode <- Get (Maybe AimMode)
forall t. Binary t => Get t
get
    Maybe (ItemId, CStore, Bool)
sitemSel <- Get (Maybe (ItemId, CStore, Bool))
forall t. Binary t => Get t
get
    EnumSet ActorId
sselected <- Get (EnumSet ActorId)
forall t. Binary t => Get t
get
    Maybe RunParams
srunning <- Get (Maybe RunParams)
forall t. Binary t => Get t
get
    History
shistory <- Get History
forall t. Binary t => Get t
get
    Bool
smarkVision <- Get Bool
forall t. Binary t => Get t
get
    Bool
smarkSmell <- Get Bool
forall t. Binary t => Get t
get
    Bool
sdisplayNeeded <- Get Bool
forall t. Binary t => Get t
get
    let slastItemMove :: Maybe a
slastItemMove = Maybe a
forall a. Maybe a
Nothing
        schanF :: ChanFrontend
schanF = (forall a. FrontReq a -> IO a) -> ChanFrontend
ChanFrontend ((forall a. FrontReq a -> IO a) -> ChanFrontend)
-> (forall a. FrontReq a -> IO a) -> ChanFrontend
forall a b. (a -> b) -> a -> b
$ IO a -> FrontReq a -> IO a
forall a b. a -> b -> a
const (IO a -> FrontReq a -> IO a) -> IO a -> FrontReq a -> IO a
forall a b. (a -> b) -> a -> b
$
          String -> IO a
forall a. HasCallStack => String -> a
error (String -> IO a) -> String -> IO a
forall a b. (a -> b) -> a -> b
$ "Binary: ChanFrontend" String -> () -> String
forall v. Show v => String -> v -> String
`showFailure` ()
        sccui :: CCUI
sccui = CCUI
emptyCCUI
        sxhairMoused :: Bool
sxhairMoused = Bool
True
        spointer :: Point
spointer = Point
originPoint
        slastRecord :: LastRecord
slastRecord = [KM] -> [KM] -> Int -> LastRecord
LastRecord [] [] 0
        slastPlay :: [a]
slastPlay = []
        slastLost :: EnumSet k
slastLost = EnumSet k
forall k. EnumSet k
ES.empty
        swaitTimes :: Int
swaitTimes = 0
        swasAutomated :: Bool
swasAutomated = Bool
False
        smenuIxMap :: Map String Int
smenuIxMap = String -> Int -> Map String Int
forall k a. k -> a -> Map k a
M.singleton "main" (2 Int -> Int -> Int
forall a. Num a => a -> a -> a
- 9)  -- subtracting @initIx@
        sreportNull :: Bool
sreportNull = Bool
True
        shintMode :: HintMode
shintMode = HintMode
HintAbsent
        sstart :: POSIXTime
sstart = 0
        sgstart :: POSIXTime
sgstart = 0
        sallTime :: Time
sallTime = Time
timeZero
        snframes :: Int
snframes = 0
        sallNframes :: Int
sallNframes = 0
    SessionUI -> Get SessionUI
forall (m :: * -> *) a. Monad m => a -> m a
return (SessionUI -> Get SessionUI) -> SessionUI -> Get SessionUI
forall a b. (a -> b) -> a -> b
$! $WSessionUI :: Maybe Target
-> ActorDictUI
-> ItemDictUI
-> ItemSlots
-> Maybe (CStore, CStore)
-> ChanFrontend
-> CCUI
-> UIOptions
-> Maybe AimMode
-> Bool
-> Maybe (ItemId, CStore, Bool)
-> EnumSet ActorId
-> Maybe RunParams
-> History
-> Point
-> LastRecord
-> [KM]
-> EnumSet ActorId
-> Int
-> Bool
-> Bool
-> Bool
-> Map String Int
-> Bool
-> HintMode
-> Bool
-> POSIXTime
-> POSIXTime
-> Time
-> Int
-> Int
-> SessionUI
SessionUI{..}

instance Binary RunParams where
  put :: RunParams -> Put
put RunParams{..} = do
    ActorId -> Put
forall t. Binary t => t -> Put
put ActorId
runLeader
    [ActorId] -> Put
forall t. Binary t => t -> Put
put [ActorId]
runMembers
    Bool -> Put
forall t. Binary t => t -> Put
put Bool
runInitial
    Maybe Text -> Put
forall t. Binary t => t -> Put
put Maybe Text
runStopMsg
    Int -> Put
forall t. Binary t => t -> Put
put Int
runWaiting
  get :: Get RunParams
get = do
    ActorId
runLeader <- Get ActorId
forall t. Binary t => Get t
get
    [ActorId]
runMembers <- Get [ActorId]
forall t. Binary t => Get t
get
    Bool
runInitial <- Get Bool
forall t. Binary t => Get t
get
    Maybe Text
runStopMsg <- Get (Maybe Text)
forall t. Binary t => Get t
get
    Int
runWaiting <- Get Int
forall t. Binary t => Get t
get
    RunParams -> Get RunParams
forall (m :: * -> *) a. Monad m => a -> m a
return (RunParams -> Get RunParams) -> RunParams -> Get RunParams
forall a b. (a -> b) -> a -> b
$! $WRunParams :: ActorId -> [ActorId] -> Bool -> Maybe Text -> Int -> RunParams
RunParams{..}