hedgewars/uScript.pas
changeset 12286 b4dde7035fe2
parent 12162 e4294b5cc2e7
child 12294 0deabf747b8f
equal deleted inserted replaced
12285:3cdd664f6d0c 12286:b4dde7035fe2
  1857 function lc_endgame(L : Plua_State) : LongInt; Cdecl;
  1857 function lc_endgame(L : Plua_State) : LongInt; Cdecl;
  1858 begin
  1858 begin
  1859     L:= L; // avoid compiler hint
  1859     L:= L; // avoid compiler hint
  1860     AddGear(0, 0, gtATFinishGame, 0, _0, _0, 3000);
  1860     AddGear(0, 0, gtATFinishGame, 0, _0, _0, 3000);
  1861     lc_endgame:= 0
  1861     lc_endgame:= 0
       
  1862 end;
       
  1863 
       
  1864 function lc_endturn(L : Plua_State) : LongInt; Cdecl;
       
  1865 var n: LongInt;
       
  1866 const
       
  1867     call = 'EndTurn';
       
  1868     params = '[noTaunts]';
       
  1869 begin
       
  1870     if CheckAndFetchParamCount(L, 0, 1, call, params, n) then
       
  1871         if n >= 1 then
       
  1872             LuaNoEndTurnTaunts:= lua_toboolean(L, 1);
       
  1873     LuaEndTurnRequested:= true;
       
  1874     lc_endturn:= 0
  1862 end;
  1875 end;
  1863 
  1876 
  1864 function lc_sendstat(L : Plua_State) : LongInt; Cdecl;
  1877 function lc_sendstat(L : Plua_State) : LongInt; Cdecl;
  1865 var statInfo : TStatInfoType;
  1878 var statInfo : TStatInfoType;
  1866     i, n     : LongInt;
  1879     i, n     : LongInt;
  3390 lua_register(luaState, _P'SpawnFakeAmmoCrate', @lc_spawnfakeammocrate);
  3403 lua_register(luaState, _P'SpawnFakeAmmoCrate', @lc_spawnfakeammocrate);
  3391 lua_register(luaState, _P'SpawnFakeUtilityCrate', @lc_spawnfakeutilitycrate);
  3404 lua_register(luaState, _P'SpawnFakeUtilityCrate', @lc_spawnfakeutilitycrate);
  3392 lua_register(luaState, _P'WriteLnToConsole', @lc_writelntoconsole);
  3405 lua_register(luaState, _P'WriteLnToConsole', @lc_writelntoconsole);
  3393 lua_register(luaState, _P'GetGearType', @lc_getgeartype);
  3406 lua_register(luaState, _P'GetGearType', @lc_getgeartype);
  3394 lua_register(luaState, _P'EndGame', @lc_endgame);
  3407 lua_register(luaState, _P'EndGame', @lc_endgame);
       
  3408 lua_register(luaState, _P'EndTurn', @lc_endturn);
  3395 lua_register(luaState, _P'SendStat', @lc_sendstat);
  3409 lua_register(luaState, _P'SendStat', @lc_sendstat);
  3396 lua_register(luaState, _P'SendHealthStatsOff', @lc_sendhealthstatsoff);
  3410 lua_register(luaState, _P'SendHealthStatsOff', @lc_sendhealthstatsoff);
  3397 lua_register(luaState, _P'FindPlace', @lc_findplace);
  3411 lua_register(luaState, _P'FindPlace', @lc_findplace);
  3398 lua_register(luaState, _P'SetGearPosition', @lc_setgearposition);
  3412 lua_register(luaState, _P'SetGearPosition', @lc_setgearposition);
  3399 lua_register(luaState, _P'GetGearPosition', @lc_getgearposition);
  3413 lua_register(luaState, _P'GetGearPosition', @lc_getgearposition);