ak74.c 777 B

123456789101112131415161718192021222324252627282930313233
  1. class AK74_Base : AKM_Base
  2. {
  3. override RecoilBase SpawnRecoilObject()
  4. {
  5. return new Ak74Recoil(this);
  6. }
  7. //Debug menu Spawn Ground Special
  8. override void OnDebugSpawn()
  9. {
  10. GameInventory inventory = GetInventory();
  11. inventory.CreateInInventory( "AK74_WoodBttstck" );
  12. inventory.CreateInInventory( "AK74_Hndgrd" );
  13. inventory.CreateInInventory( "PSO1Optic" );
  14. inventory.CreateInInventory( "AK_Bayonet" );
  15. inventory.CreateInInventory( "Battery9V" );
  16. SpawnAttachedMagazine("Mag_AK74_30Rnd");
  17. }
  18. };
  19. class AK74 : AK74_Base
  20. {
  21. override bool CanEnterIronsights()
  22. {
  23. ItemOptics optic = GetAttachedOptics();
  24. if (optic && PSO1Optic.Cast(optic) || PSO11Optic.Cast(optic) || KazuarOptic.Cast(optic))
  25. return true;
  26. return super.CanEnterIronsights();
  27. }
  28. };