hedgewars/uScript.pas
branchhedgeroid
changeset 5548 73f2fec65257
parent 5530 25d4118056e1
parent 5529 9a47cff3910a
child 5577 272c82f82cee
equal deleted inserted replaced
5546:d36dac11a9b2 5548:73f2fec65257
   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