hedgewars/uScript.pas
changeset 4498 8c9595e39539
parent 4496 ba5da3388110
child 4499 d2454e4dbd03
equal deleted inserted replaced
4497:08df377b4fbc 4498:8c9595e39539
   487             end
   487             end
   488         else
   488         else
   489             lua_pushnil(L);
   489             lua_pushnil(L);
   490         end;
   490         end;
   491     lc_gethogclan:= 1
   491     lc_gethogclan:= 1
       
   492 end;
       
   493 
       
   494 function lc_getclancolor(L : Plua_State) : LongInt; Cdecl;
       
   495 var gear : PGear;
       
   496 begin
       
   497     if lua_gettop(L) <> 1 then
       
   498         begin
       
   499         LuaError('Lua: Wrong number of parameters passed to GetClanColor!');
       
   500         lua_pushnil(L); // return value on stack (nil)
       
   501         end
       
   502     else lua_pushinteger(L, ClansArray[lua_tointeger(L, 1)]^.Color);
       
   503     lc_getclancolor:= 1
   492 end;
   504 end;
   493 
   505 
   494 function lc_gethogteamname(L : Plua_State) : LongInt; Cdecl;
   506 function lc_gethogteamname(L : Plua_State) : LongInt; Cdecl;
   495 var gear : PGear;
   507 var gear : PGear;
   496 begin
   508 begin
  1394 lua_register(luaState, 'AddAmmo', @lc_addammo);
  1406 lua_register(luaState, 'AddAmmo', @lc_addammo);
  1395 lua_register(luaState, 'SetHealth', @lc_sethealth);
  1407 lua_register(luaState, 'SetHealth', @lc_sethealth);
  1396 lua_register(luaState, 'GetHealth', @lc_gethealth);
  1408 lua_register(luaState, 'GetHealth', @lc_gethealth);
  1397 lua_register(luaState, 'SetEffect', @lc_seteffect);
  1409 lua_register(luaState, 'SetEffect', @lc_seteffect);
  1398 lua_register(luaState, 'GetHogClan', @lc_gethogclan);
  1410 lua_register(luaState, 'GetHogClan', @lc_gethogclan);
       
  1411 lua_register(luaState, 'GetClanColor', @lc_getclancolor);
  1399 lua_register(luaState, 'GetHogTeamName', @lc_gethogteamname);
  1412 lua_register(luaState, 'GetHogTeamName', @lc_gethogteamname);
  1400 lua_register(luaState, 'GetHogName', @lc_gethogname);
  1413 lua_register(luaState, 'GetHogName', @lc_gethogname);
  1401 lua_register(luaState, 'GetHogLevel', @lc_gethoglevel);
  1414 lua_register(luaState, 'GetHogLevel', @lc_gethoglevel);
  1402 lua_register(luaState, 'SetHogLevel', @lc_sethoglevel);
  1415 lua_register(luaState, 'SetHogLevel', @lc_sethoglevel);
  1403 lua_register(luaState, 'GetX', @lc_getx);
  1416 lua_register(luaState, 'GetX', @lc_getx);