gameServer/CoreTypes.hs
changeset 10786 712283ed86e0
parent 10732 7c4f9e5e447c
child 10814 810ac1d21fd0
equal deleted inserted replaced
10785:c5dd41e77a12 10786:712283ed86e0
    99     | RegisterEvent Event
    99     | RegisterEvent Event
   100     | SaveRoom B.ByteString
   100     | SaveRoom B.ByteString
   101     | LoadRoom B.ByteString
   101     | LoadRoom B.ByteString
   102     | ReactCmd [B.ByteString]
   102     | ReactCmd [B.ByteString]
   103     | CheckVotes
   103     | CheckVotes
       
   104     | SetRandomSeed
   104 
   105 
   105 
   106 
   106 data Event = LobbyChatMessage
   107 data Event = LobbyChatMessage
   107            | EngineMessage
   108            | EngineMessage
   108            | RoomJoin
   109            | RoomJoin
   109 
   110 
   110 type EventsInfo = [(Int, UTCTime)]
   111 type EventsInfo = [(Int, UTCTime)]
   111 
   112 
   112 newEventsInfo :: EventsInfo
   113 newEventsInfo :: EventsInfo
   113 newEventsInfo = []   
   114 newEventsInfo = []
   114 
   115 
   115 type ClientChan = Chan [B.ByteString]
   116 type ClientChan = Chan [B.ByteString]
   116 
   117 
   117 data CheckInfo =
   118 data CheckInfo =
   118     CheckInfo
   119     CheckInfo
   220         readyPlayers :: !Int,
   221         readyPlayers :: !Int,
   221         isRestrictedJoins :: Bool,
   222         isRestrictedJoins :: Bool,
   222         isRestrictedTeams :: Bool,
   223         isRestrictedTeams :: Bool,
   223         isRegisteredOnly :: Bool,
   224         isRegisteredOnly :: Bool,
   224         isSpecial :: Bool,
   225         isSpecial :: Bool,
       
   226         defaultHedgehogsNumber :: Int,
   225         greeting :: B.ByteString,
   227         greeting :: B.ByteString,
   226         voting :: Maybe Voting,
   228         voting :: Maybe Voting,
   227         roomBansList :: ![B.ByteString],
   229         roomBansList :: ![B.ByteString],
   228         mapParams :: Map.Map B.ByteString B.ByteString,
   230         mapParams :: Map.Map B.ByteString B.ByteString,
   229         params :: Map.Map B.ByteString [B.ByteString],
   231         params :: Map.Map B.ByteString [B.ByteString],
   243         0
   245         0
   244         False
   246         False
   245         False
   247         False
   246         False
   248         False
   247         False
   249         False
       
   250         4
   248         ""
   251         ""
   249         Nothing
   252         Nothing
   250         []
   253         []
   251         (
   254         (
   252             Map.fromList $ Prelude.zip
   255             Map.fromList $ Prelude.zip
   317 
   320 
   318 
   321 
   319 data VoteType = VoteKick B.ByteString
   322 data VoteType = VoteKick B.ByteString
   320               | VoteMap B.ByteString
   323               | VoteMap B.ByteString
   321               | VotePause
   324               | VotePause
       
   325               | VoteNewSeed
       
   326               | VoteHedgehogsPerTeam Int
   322 
   327 
   323 
   328 
   324 newVoting :: VoteType -> Voting
   329 newVoting :: VoteType -> Voting
   325 newVoting = Voting 2 [] []
   330 newVoting = Voting 2 [] []
   326 
   331