hedgewars/uScript.pas
changeset 11879 c6eafb6f2735
parent 11849 bc5714636364
child 11880 2eac7a96b342
--- a/hedgewars/uScript.pas	Mon Nov 14 21:33:59 2016 +0100
+++ b/hedgewars/uScript.pas	Tue Nov 15 00:17:31 2016 +0100
@@ -2758,6 +2758,7 @@
 ScriptSetInteger('CursorY', CursorPoint.Y);
 ScriptSetInteger('BorderColor', ExplosionBorderColor);
 ScriptSetInteger('GameFlags', GameFlags);
+ScriptSetInteger('WorldEdge', ord(WorldEdge));
 ScriptSetString('Seed', cSeed);
 ScriptSetInteger('TemplateFilter', cTemplateFilter);
 ScriptSetInteger('TemplateNumber', LuaTemplateNumber);
@@ -2794,6 +2795,7 @@
 cMapGen          := TMapGen(ScriptGetInteger('MapGen'));
 cFeatureSize     := ScriptGetInteger('MapFeatureSize');
 GameFlags        := ScriptGetInteger('GameFlags');
+WorldEdge        := TWorldEdge(ScriptGetInteger('WorldEdge'));
 cHedgehogTurnTime:= ScriptGetInteger('TurnTime');
 cCaseFactor      := ScriptGetInteger('CaseFreq');
 cHealthCaseProb  := ScriptGetInteger('HealthCaseProb');
@@ -3152,6 +3154,7 @@
     cg : TCapGroup;
     spr: TSprite;
     mg : TMapGen;
+    we : TWorldEdge;
 begin
 // initialize lua
 luaState:= lua_open;
@@ -3247,6 +3250,9 @@
 for mg:= Low(TMapGen) to High(TMapGen) do
     ScriptSetInteger(EnumToStr(mg), ord(mg));
 
+for we:= Low(TWorldEdge) to High(TWorldEdge) do
+    ScriptSetInteger(EnumToStr(we), ord(we));
+
 ScriptSetInteger('gstDrowning'      , gstDrowning);
 ScriptSetInteger('gstHHDriven'      , gstHHDriven);
 ScriptSetInteger('gstMoving'        , gstMoving);