168 [] |
168 [] |
169 |
169 |
170 data RoomInfo = |
170 data RoomInfo = |
171 RoomInfo |
171 RoomInfo |
172 { |
172 { |
173 masterID :: ClientIndex, |
173 masterID :: Maybe ClientIndex, |
174 name :: B.ByteString, |
174 name :: B.ByteString, |
175 password :: B.ByteString, |
175 password :: B.ByteString, |
176 roomProto :: Word16, |
176 roomProto :: Word16, |
177 teams :: [TeamInfo], |
177 teams :: [TeamInfo], |
178 gameInfo :: Maybe GameInfo, |
178 gameInfo :: Maybe GameInfo, |
179 playersIn :: !Int, |
179 playersIn :: !Int, |
180 readyPlayers :: !Int, |
180 readyPlayers :: !Int, |
181 isRestrictedJoins :: Bool, |
181 isRestrictedJoins :: Bool, |
182 isRestrictedTeams :: Bool, |
182 isRestrictedTeams :: Bool, |
183 isRegisteredOnly :: Bool, |
183 isRegisteredOnly :: Bool, |
|
184 isSpecial :: Bool, |
184 roomBansList :: ![B.ByteString], |
185 roomBansList :: ![B.ByteString], |
185 mapParams :: Map.Map B.ByteString B.ByteString, |
186 mapParams :: Map.Map B.ByteString B.ByteString, |
186 params :: Map.Map B.ByteString [B.ByteString] |
187 params :: Map.Map B.ByteString [B.ByteString] |
187 } |
188 } |
188 |
189 |
189 newRoom :: RoomInfo |
190 newRoom :: RoomInfo |
190 newRoom = |
191 newRoom = |
191 RoomInfo |
192 RoomInfo |
192 (error "No room master defined") |
193 Nothing |
193 "" |
194 "" |
194 "" |
195 "" |
195 0 |
196 0 |
196 [] |
197 [] |
197 Nothing |
198 Nothing |
198 0 |
199 0 |
199 0 |
200 0 |
200 False |
201 False |
201 False |
202 False |
202 False |
203 False |
|
204 False |
203 [] |
205 [] |
204 ( |
206 ( |
205 Map.fromList $ Prelude.zipWith (,) |
207 Map.fromList $ Prelude.zip |
206 ["MAP", "MAPGEN", "MAZE_SIZE", "SEED", "TEMPLATE"] |
208 ["MAP", "MAPGEN", "MAZE_SIZE", "SEED", "TEMPLATE"] |
207 ["+rnd+", "0", "0", "seed", "0"] |
209 ["+rnd+", "0", "0", "seed", "0"] |
208 ) |
210 ) |
209 (Map.singleton "SCHEME" ["Default"]) |
211 ( |
|
212 Map.fromList $ Prelude.zip |
|
213 ["SCHEME", "SCRIPT"] |
|
214 [["Default"], ["Normal"]] |
|
215 ) |
|
216 |
210 |
217 |
211 data StatisticsInfo = |
218 data StatisticsInfo = |
212 StatisticsInfo |
219 StatisticsInfo |
213 { |
220 { |
214 playersNumber :: Int, |
221 playersNumber :: Int, |