--- a/hedgewars/uScript.pas Sat Aug 17 14:10:09 2013 -0400
+++ b/hedgewars/uScript.pas Tue Aug 06 00:26:07 2013 +0400
@@ -1894,6 +1894,17 @@
ScriptLoad(lua_tostring(L, 1));
lc_hedgewarsscriptload:= 0;
end;
+
+
+function lc_declareachievement(L : Plua_State) : LongInt; Cdecl;
+var gear: PGear;
+begin
+ if lua_gettop(L) <> 3 then
+ LuaError('Lua: Wrong number of parameters passed to DeclareAchievement!')
+ else
+ declareAchievement(lua_tostring(L, 1), lua_tostring(L, 2), lua_tointeger(L, 3));
+ lc_declareachievement:= 0
+end;
///////////////////
procedure ScriptPrintStack;
@@ -2513,6 +2524,7 @@
lua_register(luaState, _P'SetGearAIHints', @lc_setaihintsongear);
lua_register(luaState, _P'HedgewarsScriptLoad', @lc_hedgewarsscriptload);
+lua_register(luaState, _P'DeclareAchievement', @lc_declareachievement);
ScriptClearStack; // just to be sure stack is empty