Lua API: expose MapFeatureSize during init
authorsheepluva
Wed, 02 Sep 2015 04:25:24 +0200
changeset 11061 2f1efb11ddf3
parent 11060 506b6184f4af
child 11062 46f293e8cbfb
Lua API: expose MapFeatureSize during init
hedgewars/uScript.pas
--- a/hedgewars/uScript.pas	Wed Sep 02 04:03:24 2015 +0200
+++ b/hedgewars/uScript.pas	Wed Sep 02 04:25:24 2015 +0200
@@ -2296,7 +2296,7 @@
         else flipVert := false;
         lf:= 0;
 
-        // accept any amount of landflags, loop is never executed if n>6
+        // accept any amount of landflags, loop is never executed if n<9
         for i:= 9 to n do
             lf:= lf or lua_tointeger(L, i);
 
@@ -2693,6 +2693,7 @@
 ScriptSetInteger('TemplateFilter', cTemplateFilter);
 ScriptSetInteger('TemplateNumber', LuaTemplateNumber);
 ScriptSetInteger('MapGen', ord(cMapGen));
+ScriptSetInteger('MapFeatureSize', cFeatureSize);
 ScriptSetInteger('ScreenHeight', cScreenHeight);
 ScriptSetInteger('ScreenWidth', cScreenWidth);
 ScriptSetInteger('TurnTime', cHedgehogTurnTime);
@@ -2722,6 +2723,7 @@
 cTemplateFilter  := ScriptGetInteger('TemplateFilter');
 LuaTemplateNumber:= ScriptGetInteger('TemplateNumber');
 cMapGen          := TMapGen(ScriptGetInteger('MapGen'));
+cFeatureSize     := ScriptGetInteger('MapFeatureSize');
 GameFlags        := ScriptGetInteger('GameFlags');
 cHedgehogTurnTime:= ScriptGetInteger('TurnTime');
 cCaseFactor      := ScriptGetInteger('CaseFreq');