--- a/gameServer/EngineInteraction.hs Mon Jan 05 14:37:08 2015 +0100
+++ b/gameServer/EngineInteraction.hs Mon Jan 05 19:24:20 2015 +0300
@@ -117,7 +117,7 @@
keys2 = Set.fromList ["AMMO", "SCHEME", "SCRIPT", "THEME"]
sane = Set.null (keys1 Set.\\ Map.keysSet mParams)
&& Set.null (keys2 Set.\\ Map.keysSet prms)
- && (not . null . drop 40 $ scheme)
+ && (not . null . drop 41 $ scheme)
&& (not . null . tail $ prms Map.! "AMMO")
mapGenTypes = ["+rnd+", "+maze+", "+drawn+"]
maybeScript = let s = head . fromMaybe ["Normal"] $ Map.lookup "SCRIPT" prms in if s == "Normal" then [] else [eml ["escript Scripts/Multiplayer/", s, ".lua"]]
--- a/tools/pas2c/Pas2C.hs Mon Jan 05 14:37:08 2015 +0100
+++ b/tools/pas2c/Pas2C.hs Mon Jan 05 19:24:20 2015 +0300
@@ -668,6 +668,7 @@
initExpr2C' (InitHexNumber s) = return $ text "0x" <> (text . map toLower $ s)
initExpr2C' (InitString [a]) = return . quotes $ text [a]
initExpr2C' (InitString s) = return $ strInit s
+initExpr2C' (InitPChar s) = return $ doubleQuotes (text $ escapeStr s)
initExpr2C' (InitChar a) = return $ text "0x" <> text (showHex (read a) "")
initExpr2C' (InitReference i) = id2C IOLookup i
initExpr2C' (InitRecord fields) = do
--- a/tools/pas2c/PascalParser.hs Mon Jan 05 14:37:08 2015 +0100
+++ b/tools/pas2c/PascalParser.hs Mon Jan 05 19:24:20 2015 +0300
@@ -629,6 +629,8 @@
, try $ integer pas >>= \i -> notFollowedBy (char' '.') >> (return . InitNumber . show) i
, try $ float pas >>= return . InitFloat . show
, try $ integer pas >>= return . InitNumber . show
+ , try (string' "_S" >> stringLiteral pas) >>= return . InitString
+ , try (string' "_P" >> stringLiteral pas) >>= return . InitPChar
, stringLiteral pas >>= return . InitString
, char' '#' >> many digit >>= \c -> comments >> return (InitChar c)
, char' '$' >> many hexDigit >>= \h -> comments >> return (InitHexNumber h)
--- a/tools/pas2c/PascalUnitSyntaxTree.hs Mon Jan 05 14:37:08 2015 +0100
+++ b/tools/pas2c/PascalUnitSyntaxTree.hs Mon Jan 05 19:24:20 2015 +0300
@@ -89,6 +89,7 @@
| InitNumber String
| InitHexNumber String
| InitString String
+ | InitPChar String
| InitChar String
| BuiltInFunction String [InitExpression]
| InitSet [InitExpression]