hedgewars/uScript.pas
changeset 13466 854caa3c9212
parent 13460 38814954a248
child 13468 f1d349a52bc7
equal deleted inserted replaced
13465:c6ecb87b3231 13466:854caa3c9212
   542         end;
   542         end;
   543     lc_setnextweapon:= 0;
   543     lc_setnextweapon:= 0;
   544 end;
   544 end;
   545 
   545 
   546 function lc_showmission(L : Plua_State) : LongInt; Cdecl;
   546 function lc_showmission(L : Plua_State) : LongInt; Cdecl;
   547 begin
   547 var n: LongInt;
   548     if CheckLuaParamCount(L, 5, 'ShowMission', 'caption, subcaption, text, icon, time') then
   548 begin
   549         ShowMission(lua_tostringA(L, 1), lua_tostringA(L, 2), lua_tostringA(L, 3), Trunc(lua_tonumber(L, 4)), Trunc(lua_tonumber(L, 5)));
   549     if CheckAndFetchParamCount(L, 5, 6, 'ShowMission', 'caption, subcaption, text, icon, time [, forceDisplay]', n) then
       
   550         if n = 5 then
       
   551             ShowMission(lua_tostringA(L, 1), lua_tostringA(L, 2), lua_tostringA(L, 3), Trunc(lua_tonumber(L, 4)), Trunc(lua_tonumber(L, 5)))
       
   552         else
       
   553             ShowMission(lua_tostringA(L, 1), lua_tostringA(L, 2), lua_tostringA(L, 3), Trunc(lua_tonumber(L, 4)), Trunc(lua_tonumber(L, 5)), lua_toboolean(L, 6));
   550     lc_showmission:= 0;
   554     lc_showmission:= 0;
   551 end;
   555 end;
   552 
   556 
   553 function lc_hidemission(L : Plua_State) : LongInt; Cdecl;
   557 function lc_hidemission(L : Plua_State) : LongInt; Cdecl;
   554 begin
   558 begin