hedgewars/uScript.pas
changeset 13170 98a0edb4bb5a
parent 13122 d52d79f35558
child 13216 95311e220eb6
equal deleted inserted replaced
13169:6869d27a2f3f 13170:98a0edb4bb5a
  1922     if CheckAndFetchParamCount(L, 0, 1, call, params, n) then
  1922     if CheckAndFetchParamCount(L, 0, 1, call, params, n) then
  1923         if n >= 1 then
  1923         if n >= 1 then
  1924             LuaNoEndTurnTaunts:= lua_toboolean(L, 1);
  1924             LuaNoEndTurnTaunts:= lua_toboolean(L, 1);
  1925     LuaEndTurnRequested:= true;
  1925     LuaEndTurnRequested:= true;
  1926     lc_endturn:= 0
  1926     lc_endturn:= 0
       
  1927 end;
       
  1928 
       
  1929 function lc_skipturn(L : Plua_State): LongInt; Cdecl;
       
  1930 begin
       
  1931     L:= L; // avoid compiler hint
       
  1932     ParseCommand('skip', true, true);
       
  1933     lc_skipturn:= 0;
  1927 end;
  1934 end;
  1928 
  1935 
  1929 function lc_sendstat(L : Plua_State) : LongInt; Cdecl;
  1936 function lc_sendstat(L : Plua_State) : LongInt; Cdecl;
  1930 var statInfo : TStatInfoType;
  1937 var statInfo : TStatInfoType;
  1931     i, n     : LongInt;
  1938     i, n     : LongInt;
  3789 lua_register(luaState, _P'WriteLnToConsole', @lc_writelntoconsole);
  3796 lua_register(luaState, _P'WriteLnToConsole', @lc_writelntoconsole);
  3790 lua_register(luaState, _P'WriteLnToChat', @lc_writelntochat);
  3797 lua_register(luaState, _P'WriteLnToChat', @lc_writelntochat);
  3791 lua_register(luaState, _P'GetGearType', @lc_getgeartype);
  3798 lua_register(luaState, _P'GetGearType', @lc_getgeartype);
  3792 lua_register(luaState, _P'EndGame', @lc_endgame);
  3799 lua_register(luaState, _P'EndGame', @lc_endgame);
  3793 lua_register(luaState, _P'EndTurn', @lc_endturn);
  3800 lua_register(luaState, _P'EndTurn', @lc_endturn);
       
  3801 lua_register(luaState, _P'SkipTurn', @lc_skipturn);
  3794 lua_register(luaState, _P'GetTeamStats', @lc_getteamstats);
  3802 lua_register(luaState, _P'GetTeamStats', @lc_getteamstats);
  3795 lua_register(luaState, _P'SendStat', @lc_sendstat);
  3803 lua_register(luaState, _P'SendStat', @lc_sendstat);
  3796 lua_register(luaState, _P'SendGameResultOff', @lc_sendgameresultoff);
  3804 lua_register(luaState, _P'SendGameResultOff', @lc_sendgameresultoff);
  3797 lua_register(luaState, _P'SendRankingStatsOff', @lc_sendrankingstatsoff);
  3805 lua_register(luaState, _P'SendRankingStatsOff', @lc_sendrankingstatsoff);
  3798 lua_register(luaState, _P'SendAchievementsStatsOff', @lc_sendachievementsstatsoff);
  3806 lua_register(luaState, _P'SendAchievementsStatsOff', @lc_sendachievementsstatsoff);