ropebelt.c 473 B

1234567891011121314151617181920212223242526272829
  1. class RopeBelt: Belt_Base
  2. {
  3. override void SetActions()
  4. {
  5. super.SetActions();
  6. AddAction(ActionDeCraftRopeBelt);
  7. }
  8. override bool CanPutInCargo( EntityAI parent )
  9. {
  10. if( !super.CanPutInCargo( parent ) )
  11. {
  12. return false;
  13. }
  14. return IsEmpty();
  15. }
  16. override bool CanReceiveAttachment( EntityAI attachment,int slotId )
  17. {
  18. if( !super.CanReceiveAttachment( attachment, slotId ) )
  19. {
  20. return false;
  21. }
  22. return !GetInventory().IsInCargo();
  23. }
  24. };