hedgewars/uAmmos.pas
changeset 4102 96efb3bbf8e3
parent 3966 cbec77b5f706
child 4141 2bd5ecf7b4fb
equal deleted inserted replaced
4101:c5967f360beb 4102:96efb3bbf8e3
    96     substr: shortstring; // TEMPORARY
    96     substr: shortstring; // TEMPORARY
    97 begin
    97 begin
    98 TryDo((byte(ammoLoadout[0]) = byte(ord(High(TAmmoType)))) and (byte(ammoProbability[0]) = byte(ord(High(TAmmoType)))) and (byte(ammoDelay[0]) = byte(ord(High(TAmmoType)))) and (byte(ammoReinforcement[0]) = byte(ord(High(TAmmoType)))), 'Incomplete or missing ammo scheme set (incompatible frontend or demo/save?)', true);
    98 TryDo((byte(ammoLoadout[0]) = byte(ord(High(TAmmoType)))) and (byte(ammoProbability[0]) = byte(ord(High(TAmmoType)))) and (byte(ammoDelay[0]) = byte(ord(High(TAmmoType)))) and (byte(ammoReinforcement[0]) = byte(ord(High(TAmmoType)))), 'Incomplete or missing ammo scheme set (incompatible frontend or demo/save?)', true);
    99 
    99 
   100 // FIXME - TEMPORARY hardcoded check on shoppa pending creation of crate *type* probability editor
   100 // FIXME - TEMPORARY hardcoded check on shoppa pending creation of crate *type* probability editor
   101 substr:= Copy(ammoLoadout,1,15);
   101 substr:= Copy(ammoLoadout,1,39);
   102 if (substr = '000000990000009') or
   102 if (substr = '000000990000009000000000000000000000000000') or  // ropes + parachute
   103    (substr = '000000990000000') then
   103    (substr = '000000900000000000000000000000000000009000') or  // saucer
   104     shoppa:= true;
   104    (substr = '000000900000000000000000000000000000000009') or  // portal
       
   105    (substr = '000000990000000000000000000000000000000000')     // ropes
       
   106    then shoppa:= true;
   105 
   107 
   106 inc(StoreCnt);
   108 inc(StoreCnt);
   107 TryDo(StoreCnt <= cMaxHHs, 'Ammo stores overflow', true);
   109 TryDo(StoreCnt <= cMaxHHs, 'Ammo stores overflow', true);
   108 
   110 
   109 new(StoresList[Pred(StoreCnt)]);
   111 new(StoresList[Pred(StoreCnt)]);