equal
deleted
inserted
replaced
1832 lua_pushnil(L) |
1832 lua_pushnil(L) |
1833 end |
1833 end |
1834 else |
1834 else |
1835 ScriptLoad(lua_tostring(L, 1)); |
1835 ScriptLoad(lua_tostring(L, 1)); |
1836 lc_hedgewarsscriptload:= 0; |
1836 lc_hedgewarsscriptload:= 0; |
|
1837 end; |
|
1838 |
|
1839 |
|
1840 function lc_declareachievement(L : Plua_State) : LongInt; Cdecl; |
|
1841 var gear: PGear; |
|
1842 begin |
|
1843 if lua_gettop(L) <> 3 then |
|
1844 LuaError('Lua: Wrong number of parameters passed to DeclareAchievement!') |
|
1845 else |
|
1846 declareAchievement(lua_tostring(L, 1), lua_tostring(L, 2), lua_tointeger(L, 3)); |
|
1847 lc_declareachievement:= 0 |
1837 end; |
1848 end; |
1838 /////////////////// |
1849 /////////////////// |
1839 |
1850 |
1840 procedure ScriptPrintStack; |
1851 procedure ScriptPrintStack; |
1841 var n, i : LongInt; |
1852 var n, i : LongInt; |
2449 lua_register(luaState, _P'GetCurAmmoType', @lc_getcurammotype); |
2460 lua_register(luaState, _P'GetCurAmmoType', @lc_getcurammotype); |
2450 lua_register(luaState, _P'TestRectForObstacle', @lc_testrectforobstacle); |
2461 lua_register(luaState, _P'TestRectForObstacle', @lc_testrectforobstacle); |
2451 |
2462 |
2452 lua_register(luaState, _P'SetGearAIHints', @lc_setaihintsongear); |
2463 lua_register(luaState, _P'SetGearAIHints', @lc_setaihintsongear); |
2453 lua_register(luaState, _P'HedgewarsScriptLoad', @lc_hedgewarsscriptload); |
2464 lua_register(luaState, _P'HedgewarsScriptLoad', @lc_hedgewarsscriptload); |
|
2465 lua_register(luaState, _P'DeclareAchievement', @lc_declareachievement); |
2454 |
2466 |
2455 |
2467 |
2456 ScriptClearStack; // just to be sure stack is empty |
2468 ScriptClearStack; // just to be sure stack is empty |
2457 ScriptLoaded:= false; |
2469 ScriptLoaded:= false; |
2458 end; |
2470 end; |