hedgewars/uScript.pas
changeset 11944 c7ec309cd685
parent 11885 2eac7a96b342
child 11946 7ece39a537bd
equal deleted inserted replaced
11943:35ec1edd66a2 11944:c7ec309cd685
   546 function lc_hidemission(L : Plua_State) : LongInt; Cdecl;
   546 function lc_hidemission(L : Plua_State) : LongInt; Cdecl;
   547 begin
   547 begin
   548     L:= L; // avoid compiler hint
   548     L:= L; // avoid compiler hint
   549     HideMission;
   549     HideMission;
   550     lc_hidemission:= 0;
   550     lc_hidemission:= 0;
       
   551 end;
       
   552 
       
   553 function lc_setammotexts(L : Plua_State) : LongInt; Cdecl;
       
   554 const
       
   555     call = 'SetAmmoTexts';
       
   556     params = 'ammoType, name, caption, description';
       
   557 begin
       
   558     if CheckLuaParamCount(L, 4, call, params) then
       
   559         SetAmmoTexts(TAmmoType(LuaToAmmoTypeOrd(L, 1, call, params)), lua_tostringA(L, 2), lua_tostringA(L, 3), lua_tostringA(L, 4));
       
   560     lc_setammotexts:= 0;
   551 end;
   561 end;
   552 
   562 
   553 function lc_enablegameflags(L : Plua_State) : LongInt; Cdecl;
   563 function lc_enablegameflags(L : Plua_State) : LongInt; Cdecl;
   554 var i, n : integer;
   564 var i, n : integer;
   555 begin
   565 begin
  3347 lua_register(luaState, _P'SetGearVelocity', @lc_setgearvelocity);
  3357 lua_register(luaState, _P'SetGearVelocity', @lc_setgearvelocity);
  3348 lua_register(luaState, _P'GetGearVelocity', @lc_getgearvelocity);
  3358 lua_register(luaState, _P'GetGearVelocity', @lc_getgearvelocity);
  3349 lua_register(luaState, _P'ParseCommand', @lc_parsecommand);
  3359 lua_register(luaState, _P'ParseCommand', @lc_parsecommand);
  3350 lua_register(luaState, _P'ShowMission', @lc_showmission);
  3360 lua_register(luaState, _P'ShowMission', @lc_showmission);
  3351 lua_register(luaState, _P'HideMission', @lc_hidemission);
  3361 lua_register(luaState, _P'HideMission', @lc_hidemission);
       
  3362 lua_register(luaState, _P'SetAmmoTexts', @lc_setammotexts);
  3352 lua_register(luaState, _P'AddCaption', @lc_addcaption);
  3363 lua_register(luaState, _P'AddCaption', @lc_addcaption);
  3353 lua_register(luaState, _P'SetAmmo', @lc_setammo);
  3364 lua_register(luaState, _P'SetAmmo', @lc_setammo);
  3354 lua_register(luaState, _P'SetAmmoDelay', @lc_setammodelay);
  3365 lua_register(luaState, _P'SetAmmoDelay', @lc_setammodelay);
  3355 lua_register(luaState, _P'SetAmmoStore', @lc_setammostore);
  3366 lua_register(luaState, _P'SetAmmoStore', @lc_setammostore);
  3356 lua_register(luaState, _P'PlaySound', @lc_playsound);
  3367 lua_register(luaState, _P'PlaySound', @lc_playsound);