militarybelt.c 711 B

1234567891011121314151617181920212223242526272829303132333435
  1. class MilitaryBelt: Belt_Base
  2. {
  3. override bool CanPutInCargo( EntityAI parent )
  4. {
  5. if( !super.CanPutInCargo( parent ) )
  6. {
  7. return false;
  8. }
  9. return IsEmpty();
  10. }
  11. override bool CanReceiveAttachment( EntityAI attachment,int slotId )
  12. {
  13. if( !super.CanReceiveAttachment( attachment, slotId ) )
  14. {
  15. return false;
  16. }
  17. return !GetInventory().IsInCargo();
  18. }
  19. //Debug menu Spawn Ground Special
  20. override void OnDebugSpawn()
  21. {
  22. EntityAI entity;
  23. if ( Class.CastTo(entity, this) )
  24. {
  25. entity.GetInventory().CreateInInventory( "NylonKnifeSheath" );
  26. entity.GetInventory().CreateInInventory( "PlateCarrierHolster" );
  27. entity.GetInventory().CreateInInventory( "Canteen" );
  28. }
  29. }
  30. };