equal
deleted
inserted
replaced
2675 var i, at, rawProb, probLevel: LongInt; |
2675 var i, at, rawProb, probLevel: LongInt; |
2676 const |
2676 const |
2677 call = 'GetAmmo'; |
2677 call = 'GetAmmo'; |
2678 params = 'ammoType'; |
2678 params = 'ammoType'; |
2679 begin |
2679 begin |
|
2680 lc_getammo:= 0 |
2680 if CheckLuaParamCount(L, 1, call, params) then |
2681 if CheckLuaParamCount(L, 1, call, params) then |
2681 begin |
2682 begin |
2682 at:= LuaToAmmoTypeOrd(L, 1, call, params); |
2683 at:= LuaToAmmoTypeOrd(L, 1, call, params); |
2683 if at >= 0 then |
2684 if at >= 0 then |
2684 begin |
2685 begin |
2698 lua_pushnumber(L, Ammoz[TAmmoType(at)].SkipTurns); |
2699 lua_pushnumber(L, Ammoz[TAmmoType(at)].SkipTurns); |
2699 // Number in case |
2700 // Number in case |
2700 lua_pushnumber(L, Ammoz[TAmmoType(at)].NumberInCase); |
2701 lua_pushnumber(L, Ammoz[TAmmoType(at)].NumberInCase); |
2701 lc_getammo:= 4 |
2702 lc_getammo:= 4 |
2702 end |
2703 end |
2703 else |
|
2704 lc_getammo:= 0 |
|
2705 end; |
2704 end; |
2706 end; |
2705 end; |
2707 |
2706 |
2708 |
2707 |
2709 function lc_setammodelay(L : Plua_State) : LongInt; Cdecl; |
2708 function lc_setammodelay(L : Plua_State) : LongInt; Cdecl; |