- Send maze_size command in other mapgen modes too
- Fix drawn land mapgen detection
--- a/gameServer/EngineInteraction.hs Mon Jan 05 16:29:27 2015 +0100
+++ b/gameServer/EngineInteraction.hs Tue Jan 06 12:12:34 2015 +0300
@@ -124,10 +124,10 @@
maybeMap = let m = mParams Map.! "MAP" in if m `elem` mapGenTypes then [] else [eml ["emap ", m]]
scheme = tail $ prms Map.! "SCHEME"
mapgen = mParams Map.! "MAPGEN"
+ templateFilterMsg = eml ["e$maze_size ", mParams Map.! "MAZE_SIZE"]
mapgenSpecific = case mapgen of
- "1" -> [eml ["e$maze_size ", mParams Map.! "MAZE_SIZE"]]
- "2" -> let d = head . fromMaybe [""] $ Map.lookup "DRAWNMAP" prms in if BW.length d <= 4 then [] else drawnMapData d
- _ -> []
+ "3" -> let d = head . fromMaybe [""] $ Map.lookup "DRAWNMAP" prms in if BW.length d <= 4 then [] else drawnMapData d
+ _ -> [templateFilterMsg]
gameFlags :: Word32
gameFlags = foldl (\r (b, f) -> if b == "false" then r else r .|. f) 0 $ zip scheme gameFlagConsts
schemeFlags = map (\(v, (n, m)) -> eml [n, " ", showB $ (readInt_ v) * m])