hedgewars/uScript.pas
changeset 6563 30e042398411
parent 6557 e3cad9020778
child 6578 d4ad42283125
equal deleted inserted replaced
6562:e6b35a238d69 6563:30e042398411
  1879 ScriptAmmoDelay[ord(ammo)]:= inttostr(delay)[1];
  1879 ScriptAmmoDelay[ord(ammo)]:= inttostr(delay)[1];
  1880 ScriptAmmoReinforcement[ord(ammo)]:= inttostr(reinforcement)[1];
  1880 ScriptAmmoReinforcement[ord(ammo)]:= inttostr(reinforcement)[1];
  1881 end;
  1881 end;
  1882 
  1882 
  1883 procedure ScriptApplyAmmoStore;
  1883 procedure ScriptApplyAmmoStore;
  1884 var i, j : LongInt;
  1884 var i, j, k : LongInt;
  1885 begin
  1885 begin
  1886 SetAmmoLoadout(ScriptAmmoLoadout);
  1886 SetAmmoLoadout(ScriptAmmoLoadout);
  1887 SetAmmoProbability(ScriptAmmoProbability);
  1887 SetAmmoProbability(ScriptAmmoProbability);
  1888 SetAmmoDelay(ScriptAmmoDelay);
  1888 SetAmmoDelay(ScriptAmmoDelay);
  1889 SetAmmoReinforcement(ScriptAmmoReinforcement);
  1889 SetAmmoReinforcement(ScriptAmmoReinforcement);
  1890 
  1890 
  1891 if (GameFlags and gfSharedAmmo) <> 0 then
  1891 if (GameFlags and gfSharedAmmo) <> 0 then
  1892     for i:= 0 to Pred(ClansCount) do
  1892     for i:= 0 to Pred(ClansCount) do
  1893         AddAmmoStore
  1893         begin
       
  1894         AddAmmoStore;
       
  1895         for j:= 0 to Pred(ClansArray[i]^.TeamsNumber) do
       
  1896             for k:= 0 to Pred(ClansArray[i]^.Teams[j]^.HedgehogsNumber) do
       
  1897                 ClansArray[i]^.Teams[j]^.Hedgehogs[k].AmmoStore:= StoreCnt - 1
       
  1898         end
  1894 else if (GameFlags and gfPerHogAmmo) <> 0 then
  1899 else if (GameFlags and gfPerHogAmmo) <> 0 then
  1895     for i:= 0 to Pred(TeamsCount) do
  1900     for i:= 0 to Pred(TeamsCount) do
  1896         for j:= 0 to Pred(TeamsArray[i]^.HedgehogsNumber) do
  1901         for j:= 0 to Pred(TeamsArray[i]^.HedgehogsNumber) do
  1897             AddAmmoStore
  1902             begin
       
  1903             AddAmmoStore;
       
  1904             TeamsArray[i]^.Hedgehogs[j].AmmoStore:= StoreCnt - 1
       
  1905             end
  1898 else 
  1906 else 
  1899     for i:= 0 to Pred(TeamsCount) do
  1907     for i:= 0 to Pred(TeamsCount) do
  1900         AddAmmoStore
  1908         begin
       
  1909         AddAmmoStore;
       
  1910         for j:= 0 to Pred(TeamsArray[i]^.HedgehogsNumber) do
       
  1911             TeamsArray[i]^.Hedgehogs[j].AmmoStore:= StoreCnt - 1
       
  1912         end
  1901 end;
  1913 end;
  1902 
  1914 
  1903 procedure initModule;
  1915 procedure initModule;
  1904 var at : TGearType;
  1916 var at : TGearType;
  1905     vgt: TVisualGearType;
  1917     vgt: TVisualGearType;