Customizable Weaponry for ZDoom.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

CWGetAttachment.ds 755B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. #include "CWThings.dh"
  2. script void CW_GETATTACHMENT(void)
  3. {
  4. if(Laz.inInventory&&LTrig.inInventory&&PumpMech.inInventory&&FMode.inInventory)
  5. return;
  6. switch(Random(1,4))
  7. {
  8. case 1:
  9. laz:
  10. if(!Laz.inInventory)
  11. {Laz.inInventory = 1;}
  12. else
  13. {goto ltrig;};
  14. break;
  15. case 2:
  16. ltrig:
  17. if(!LTrig.inInventory)
  18. {LTrig.inInventory = 1;}
  19. else
  20. {goto fmode;};
  21. break;
  22. case 3:
  23. fmode:
  24. if(!FMode.inInventory)
  25. {FMode.inInventory = 1;}
  26. else
  27. {goto pmech;};
  28. break;
  29. case 4:
  30. pmech:
  31. if(!PumpMech.inInventory)
  32. {PumpMech.inInventory = 1;}
  33. else
  34. {goto laz;};
  35. break;
  36. };
  37. return;
  38. };
  39. script int CW_CHECKATTACHMENT(void)
  40. {
  41. if(Laz.inInventory&&LTrig.inInventory&&PumpMech.inInventory&&FMode.inInventory)
  42. return 0;
  43. return 1;
  44. };