--- a/hedgewars/uScript.pas Tue Jun 11 11:48:36 2013 +0200
+++ b/hedgewars/uScript.pas Tue Aug 06 00:26:07 2013 +0400
@@ -1835,6 +1835,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;
@@ -2451,6 +2462,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