1216 lua_pushnil(L); |
1216 lua_pushnil(L); |
1217 end |
1217 end |
1218 else |
1218 else |
1219 lua_pushstring(L, str2pchar(Pathz[ptData])); |
1219 lua_pushstring(L, str2pchar(Pathz[ptData])); |
1220 lc_getdatapath:= 1 |
1220 lc_getdatapath:= 1 |
|
1221 end; |
|
1222 |
|
1223 function lc_getuserdatapath(L : Plua_State) : LongInt; Cdecl; |
|
1224 begin |
|
1225 if lua_gettop(L) <> 0 then |
|
1226 begin |
|
1227 LuaError('Lua: Wrong number of parameters passed to GetUserDataPath!'); |
|
1228 lua_pushnil(L); |
|
1229 end |
|
1230 else |
|
1231 lua_pushstring(L, str2pchar(UserPathz[ptData])); |
|
1232 lc_getuserdatapath:= 1 |
1221 end; |
1233 end; |
1222 |
1234 |
1223 function lc_maphasborder(L : Plua_State) : LongInt; Cdecl; |
1235 function lc_maphasborder(L : Plua_State) : LongInt; Cdecl; |
1224 begin |
1236 begin |
1225 if lua_gettop(L) <> 0 then |
1237 if lua_gettop(L) <> 0 then |
1720 lua_register(luaState, 'GetGearMessage', @lc_getgearmessage); |
1732 lua_register(luaState, 'GetGearMessage', @lc_getgearmessage); |
1721 lua_register(luaState, 'SetGearMessage', @lc_setgearmessage); |
1733 lua_register(luaState, 'SetGearMessage', @lc_setgearmessage); |
1722 lua_register(luaState, 'GetRandom', @lc_getrandom); |
1734 lua_register(luaState, 'GetRandom', @lc_getrandom); |
1723 lua_register(luaState, 'SetWind', @lc_setwind); |
1735 lua_register(luaState, 'SetWind', @lc_setwind); |
1724 lua_register(luaState, 'GetDataPath', @lc_getdatapath); |
1736 lua_register(luaState, 'GetDataPath', @lc_getdatapath); |
|
1737 lua_register(luaState, 'GetUserDataPath', @lc_getuserdatapath); |
1725 lua_register(luaState, 'MapHasBorder', @lc_maphasborder); |
1738 lua_register(luaState, 'MapHasBorder', @lc_maphasborder); |
1726 lua_register(luaState, 'GetHogHat', @lc_gethoghat); |
1739 lua_register(luaState, 'GetHogHat', @lc_gethoghat); |
1727 lua_register(luaState, 'SetHogHat', @lc_sethoghat); |
1740 lua_register(luaState, 'SetHogHat', @lc_sethoghat); |
1728 lua_register(luaState, 'PlaceGirder', @lc_placegirder); |
1741 lua_register(luaState, 'PlaceGirder', @lc_placegirder); |
1729 lua_register(luaState, 'GetCurAmmoType', @lc_getcurammotype); |
1742 lua_register(luaState, 'GetCurAmmoType', @lc_getcurammotype); |