m79.c 549 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. class M79_Base extends RifleSingleShotManual_Base
  2. {
  3. void M79_Base ()
  4. {
  5. }
  6. override bool ShootsExplosiveAmmo()
  7. {
  8. return true;
  9. }
  10. override RecoilBase SpawnRecoilObject()
  11. {
  12. return new M79Recoil(this);
  13. }
  14. };
  15. class M79 extends M79_Base
  16. {
  17. override void AssembleGun()
  18. {
  19. super.AssembleGun();
  20. if ( !FindAttachmentBySlotName("weaponOpticsAug") )
  21. {
  22. GetInventory().CreateAttachment("M79DummyOptics");
  23. }
  24. }
  25. };
  26. class M79DummyOptics extends ItemOptics
  27. {
  28. override bool CanPutAsAttachment( EntityAI parent )
  29. {
  30. return true;
  31. }
  32. };