2257 at:= LuaToAmmoTypeOrd(L, 1, call, params); |
2257 at:= LuaToAmmoTypeOrd(L, 1, call, params); |
2258 if at >= 0 then |
2258 if at >= 0 then |
2259 ScriptSetAmmoDelay(TAmmoType(at), lua_tointeger(L, 2)); |
2259 ScriptSetAmmoDelay(TAmmoType(at), lua_tointeger(L, 2)); |
2260 end; |
2260 end; |
2261 lc_setammodelay:= 0 |
2261 lc_setammodelay:= 0 |
2262 end; |
|
2263 |
|
2264 function lc_setammostore(L : Plua_State) : LongInt; Cdecl; |
|
2265 begin |
|
2266 if CheckLuaParamCount(L, 4, 'SetAmmoStore', 'loadouts, probabilities, delays, reinforments') then |
|
2267 begin |
|
2268 ScriptAmmoLoadout:= lua_tostring(L, 1); |
|
2269 ScriptAmmoProbability:= lua_tostring(L, 2); |
|
2270 ScriptAmmoDelay:= lua_tostring(L, 3); |
|
2271 ScriptAmmoReinforcement:= lua_tostring(L, 4); |
|
2272 end; |
|
2273 lc_setammostore:= 0 |
|
2274 end; |
2262 end; |
2275 |
2263 |
2276 function lc_getrandom(L : Plua_State) : LongInt; Cdecl; |
2264 function lc_getrandom(L : Plua_State) : LongInt; Cdecl; |
2277 var m : LongInt; |
2265 var m : LongInt; |
2278 begin |
2266 begin |
3419 lua_register(luaState, _P'SetAmmoTexts', @lc_setammotexts); |
3407 lua_register(luaState, _P'SetAmmoTexts', @lc_setammotexts); |
3420 lua_register(luaState, _P'SetAmmoDescriptionAppendix', @lc_setammodescriptionappendix); |
3408 lua_register(luaState, _P'SetAmmoDescriptionAppendix', @lc_setammodescriptionappendix); |
3421 lua_register(luaState, _P'AddCaption', @lc_addcaption); |
3409 lua_register(luaState, _P'AddCaption', @lc_addcaption); |
3422 lua_register(luaState, _P'SetAmmo', @lc_setammo); |
3410 lua_register(luaState, _P'SetAmmo', @lc_setammo); |
3423 lua_register(luaState, _P'SetAmmoDelay', @lc_setammodelay); |
3411 lua_register(luaState, _P'SetAmmoDelay', @lc_setammodelay); |
3424 lua_register(luaState, _P'SetAmmoStore', @lc_setammostore); |
|
3425 lua_register(luaState, _P'PlaySound', @lc_playsound); |
3412 lua_register(luaState, _P'PlaySound', @lc_playsound); |
3426 lua_register(luaState, _P'AddTeam', @lc_addteam); |
3413 lua_register(luaState, _P'AddTeam', @lc_addteam); |
3427 lua_register(luaState, _P'AddHog', @lc_addhog); |
3414 lua_register(luaState, _P'AddHog', @lc_addhog); |
3428 lua_register(luaState, _P'AddAmmo', @lc_addammo); |
3415 lua_register(luaState, _P'AddAmmo', @lc_addammo); |
3429 lua_register(luaState, _P'GetAmmoCount', @lc_getammocount); |
3416 lua_register(luaState, _P'GetAmmoCount', @lc_getammocount); |