558 end; |
558 end; |
559 |
559 |
560 function lc_setammotexts(L : Plua_State) : LongInt; Cdecl; |
560 function lc_setammotexts(L : Plua_State) : LongInt; Cdecl; |
561 const |
561 const |
562 call = 'SetAmmoTexts'; |
562 call = 'SetAmmoTexts'; |
563 params = 'ammoType, name, caption, description'; |
563 params = 'ammoType, name, caption, description [, showExtra]'; |
564 begin |
564 var n: integer; |
565 if CheckLuaParamCount(L, 4, call, params) then |
565 showExtra: boolean; |
566 SetAmmoTexts(TAmmoType(LuaToAmmoTypeOrd(L, 1, call, params)), lua_tostringA(L, 2), lua_tostringA(L, 3), lua_tostringA(L, 4)); |
566 begin |
|
567 if CheckAndFetchParamCount(L, 4, 5, call, params, n) then |
|
568 begin |
|
569 if n = 5 then |
|
570 showExtra:= lua_toboolean(L, 5) |
|
571 else |
|
572 showExtra:= true; |
|
573 SetAmmoTexts(TAmmoType(LuaToAmmoTypeOrd(L, 1, call, params)), lua_tostringA(L, 2), lua_tostringA(L, 3), lua_tostringA(L, 4), showExtra); |
|
574 end; |
567 lc_setammotexts:= 0; |
575 lc_setammotexts:= 0; |
568 end; |
576 end; |
569 |
577 |
570 function lc_setammodescriptionappendix(L : Plua_State) : LongInt; Cdecl; |
578 function lc_setammodescriptionappendix(L : Plua_State) : LongInt; Cdecl; |
571 const |
579 const |