hedgewars/uScript.pas
changeset 11941 7ece39a537bd
parent 11939 c7ec309cd685
child 11944 87edf67f2107
equal deleted inserted replaced
11940:156f1866b8bd 11941:7ece39a537bd
   556     params = 'ammoType, name, caption, description';
   556     params = 'ammoType, name, caption, description';
   557 begin
   557 begin
   558     if CheckLuaParamCount(L, 4, call, params) then
   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));
   559         SetAmmoTexts(TAmmoType(LuaToAmmoTypeOrd(L, 1, call, params)), lua_tostringA(L, 2), lua_tostringA(L, 3), lua_tostringA(L, 4));
   560     lc_setammotexts:= 0;
   560     lc_setammotexts:= 0;
       
   561 end;
       
   562 
       
   563 function lc_setammodescriptionappendix(L : Plua_State) : LongInt; Cdecl;
       
   564 const
       
   565     call = 'SetAmmoDescriptionAppendix';
       
   566     params = 'ammoType, descAppend';
       
   567 var
       
   568     ammoType: TAmmoType;
       
   569     descAppend: ansistring;
       
   570 begin
       
   571     if CheckLuaParamCount(L, 2, call, params) then
       
   572         begin
       
   573         ammoType := TAmmoType(LuaToAmmoTypeOrd(L, 1, call, params));
       
   574         descAppend := lua_tostringA(L, 2);
       
   575         trluaammoa[Ammoz[ammoType].NameId] := descAppend;
       
   576         end;
       
   577     lc_setammodescriptionappendix := 0;
   561 end;
   578 end;
   562 
   579 
   563 function lc_enablegameflags(L : Plua_State) : LongInt; Cdecl;
   580 function lc_enablegameflags(L : Plua_State) : LongInt; Cdecl;
   564 var i, n : integer;
   581 var i, n : integer;
   565 begin
   582 begin
  3358 lua_register(luaState, _P'GetGearVelocity', @lc_getgearvelocity);
  3375 lua_register(luaState, _P'GetGearVelocity', @lc_getgearvelocity);
  3359 lua_register(luaState, _P'ParseCommand', @lc_parsecommand);
  3376 lua_register(luaState, _P'ParseCommand', @lc_parsecommand);
  3360 lua_register(luaState, _P'ShowMission', @lc_showmission);
  3377 lua_register(luaState, _P'ShowMission', @lc_showmission);
  3361 lua_register(luaState, _P'HideMission', @lc_hidemission);
  3378 lua_register(luaState, _P'HideMission', @lc_hidemission);
  3362 lua_register(luaState, _P'SetAmmoTexts', @lc_setammotexts);
  3379 lua_register(luaState, _P'SetAmmoTexts', @lc_setammotexts);
       
  3380 lua_register(luaState, _P'SetAmmoDescriptionAppendix', @lc_setammodescriptionappendix);
  3363 lua_register(luaState, _P'AddCaption', @lc_addcaption);
  3381 lua_register(luaState, _P'AddCaption', @lc_addcaption);
  3364 lua_register(luaState, _P'SetAmmo', @lc_setammo);
  3382 lua_register(luaState, _P'SetAmmo', @lc_setammo);
  3365 lua_register(luaState, _P'SetAmmoDelay', @lc_setammodelay);
  3383 lua_register(luaState, _P'SetAmmoDelay', @lc_setammodelay);
  3366 lua_register(luaState, _P'SetAmmoStore', @lc_setammostore);
  3384 lua_register(luaState, _P'SetAmmoStore', @lc_setammostore);
  3367 lua_register(luaState, _P'PlaySound', @lc_playsound);
  3385 lua_register(luaState, _P'PlaySound', @lc_playsound);