equal
deleted
inserted
replaced
1079 lua_pushnil(L); |
1079 lua_pushnil(L); |
1080 end |
1080 end |
1081 else |
1081 else |
1082 lua_pushstring(L, str2pchar(Pathz[ptData])); |
1082 lua_pushstring(L, str2pchar(Pathz[ptData])); |
1083 lc_getdatapath:= 1 |
1083 lc_getdatapath:= 1 |
|
1084 end; |
|
1085 |
|
1086 function lc_maphasborder(L : Plua_State) : LongInt; Cdecl; |
|
1087 begin |
|
1088 if lua_gettop(L) <> 0 then |
|
1089 begin |
|
1090 LuaError('Lua: Wrong number of parameters passed to MapHasBorder!'); |
|
1091 lua_pushnil(L); |
|
1092 end |
|
1093 else |
|
1094 lua_pushboolean(L, hasBorder); |
|
1095 lc_maphasborder:= 1 |
1084 end; |
1096 end; |
1085 /////////////////// |
1097 /////////////////// |
1086 |
1098 |
1087 procedure ScriptPrintStack; |
1099 procedure ScriptPrintStack; |
1088 var n, i : LongInt; |
1100 var n, i : LongInt; |
1490 lua_register(luaState, 'GetGearMessage', @lc_getgearmessage); |
1502 lua_register(luaState, 'GetGearMessage', @lc_getgearmessage); |
1491 lua_register(luaState, 'SetGearMessage', @lc_setgearmessage); |
1503 lua_register(luaState, 'SetGearMessage', @lc_setgearmessage); |
1492 lua_register(luaState, 'GetRandom', @lc_getrandom); |
1504 lua_register(luaState, 'GetRandom', @lc_getrandom); |
1493 lua_register(luaState, 'SetWind', @lc_setwind); |
1505 lua_register(luaState, 'SetWind', @lc_setwind); |
1494 lua_register(luaState, 'GetDataPath', @lc_getdatapath); |
1506 lua_register(luaState, 'GetDataPath', @lc_getdatapath); |
|
1507 lua_register(luaState, 'MapHasBorder', @lc_maphasborder); |
1495 |
1508 |
1496 |
1509 |
1497 ScriptClearStack; // just to be sure stack is empty |
1510 ScriptClearStack; // just to be sure stack is empty |
1498 ScriptLoaded:= false; |
1511 ScriptLoaded:= false; |
1499 end; |
1512 end; |