hedgewars/uScript.pas
changeset 13041 434bcdd9562c
parent 13025 d1e7f2420f00
child 13042 3718637c14be
equal deleted inserted replaced
13040:958c6ff056de 13041:434bcdd9562c
  2867 end;
  2867 end;
  2868 
  2868 
  2869 function lc_setgearaihints(L : Plua_State) : LongInt; Cdecl;
  2869 function lc_setgearaihints(L : Plua_State) : LongInt; Cdecl;
  2870 var gear: PGear;
  2870 var gear: PGear;
  2871 begin
  2871 begin
  2872     if CheckLuaParamCount(L, 2, 'SetAIHintOnGear', 'gearUid, aiHints') then
  2872     if CheckLuaParamCount(L, 2, 'SetGearAIHints', 'gearUid, aiHints') then
  2873         begin
  2873         begin
  2874         gear:= GearByUID(Trunc(lua_tonumber(L, 1)));
  2874         gear:= GearByUID(Trunc(lua_tonumber(L, 1)));
  2875         if gear <> nil then
  2875         if gear <> nil then
  2876             gear^.aihints:= Trunc(lua_tonumber(L, 2));
  2876             gear^.aihints:= Trunc(lua_tonumber(L, 2));
  2877         end;
  2877         end;