Restore crate probability restriction for "shoppa" weapon sets
authornemo
Thu, 15 Oct 2009 15:49:42 +0000
changeset 2453 fdb76012b688
parent 2452 a6edc408a376
child 2454 c8b1fb10003c
Restore crate probability restriction for "shoppa" weapon sets
hedgewars/uAmmos.pas
--- a/hedgewars/uAmmos.pas	Thu Oct 15 15:33:43 2009 +0000
+++ b/hedgewars/uAmmos.pas	Thu Oct 15 15:49:42 2009 +0000
@@ -62,9 +62,16 @@
 var cnt: Longword;
     a: TAmmoType;
     ammos: TAmmoCounts;
+    substr: shortstring; // TEMPORARY
 begin
 TryDo(byte(s[0]) = byte(ord(High(TAmmoType))) * 2, 'Invalid ammo scheme (incompatible frontend)', true);
 
+// FIXME - TEMPORARY hardcoded check on shoppa pending creation of crate *type* probability editor
+substr:= Copy(s,1,15);
+if (substr = '000000990000009') or 
+   (substr = '000000990000000') then
+    shoppa:= true;
+
 inc(StoreCnt);
 TryDo(StoreCnt <= cMaxHHs, 'Ammo stores overflow', true);