Remove Lua function SetAmmoStore
authorWuzzy <almikes@aol.com>
Wed, 05 Apr 2017 17:26:59 +0200
changeset 12162 e4294b5cc2e7
parent 12161 2cfac00cccc6
child 12163 9b5748fa7974
Remove Lua function SetAmmoStore This function very obscure and has never been used, nobody will miss it. See issue #145 for full rationale.
hedgewars/uScript.pas
--- a/hedgewars/uScript.pas	Wed Apr 05 17:26:05 2017 +0200
+++ b/hedgewars/uScript.pas	Wed Apr 05 17:26:59 2017 +0200
@@ -2261,18 +2261,6 @@
     lc_setammodelay:= 0
 end;
 
-function lc_setammostore(L : Plua_State) : LongInt; Cdecl;
-begin
-    if CheckLuaParamCount(L, 4, 'SetAmmoStore', 'loadouts, probabilities, delays, reinforments') then
-        begin
-        ScriptAmmoLoadout:= lua_tostring(L, 1);
-        ScriptAmmoProbability:= lua_tostring(L, 2);
-        ScriptAmmoDelay:= lua_tostring(L, 3);
-        ScriptAmmoReinforcement:= lua_tostring(L, 4);
-        end;
-    lc_setammostore:= 0
-end;
-
 function lc_getrandom(L : Plua_State) : LongInt; Cdecl;
 var m : LongInt;
 begin
@@ -3421,7 +3409,6 @@
 lua_register(luaState, _P'AddCaption', @lc_addcaption);
 lua_register(luaState, _P'SetAmmo', @lc_setammo);
 lua_register(luaState, _P'SetAmmoDelay', @lc_setammodelay);
-lua_register(luaState, _P'SetAmmoStore', @lc_setammostore);
 lua_register(luaState, _P'PlaySound', @lc_playsound);
 lua_register(luaState, _P'AddTeam', @lc_addteam);
 lua_register(luaState, _P'AddHog', @lc_addhog);