hedgewars/uScript.pas
changeset 5529 9a47cff3910a
parent 5527 418741abd209
child 5547 2fe1d68a102c
child 5548 73f2fec65257
equal deleted inserted replaced
5528:c539e5c81870 5529:9a47cff3910a
   859                begin
   859                begin
   860                vgear^.Text:= lua_tostring(L, 2);
   860                vgear^.Text:= lua_tostring(L, 2);
   861                vgear^.Hedgehog:= gear^.Hedgehog;
   861                vgear^.Hedgehog:= gear^.Hedgehog;
   862                vgear^.FrameTicks:= lua_tointeger(L, 3);
   862                vgear^.FrameTicks:= lua_tointeger(L, 3);
   863                if (vgear^.FrameTicks < 1) or (vgear^.FrameTicks > 3) then vgear^.FrameTicks:= 1;
   863                if (vgear^.FrameTicks < 1) or (vgear^.FrameTicks > 3) then vgear^.FrameTicks:= 1;
   864                end;
   864                lua_pushinteger(L, vgear^.Uid)
       
   865                end
   865             end
   866             end
       
   867             else lua_pushnil(L)
   866         end
   868         end
   867     else LuaError('Lua: Wrong number of parameters passed to HogSay!');
   869     else LuaError('Lua: Wrong number of parameters passed to HogSay!');
   868     lc_hogsay:= 0
   870     lc_hogsay:= 1
   869 end;
   871 end;
   870 
   872 
   871 function lc_switchhog(L : Plua_State) : LongInt; Cdecl;
   873 function lc_switchhog(L : Plua_State) : LongInt; Cdecl;
   872 var gear, prevgear : PGear;
   874 var gear, prevgear : PGear;
   873 begin
   875 begin