MechEquipmentComponent.cs 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. using Content.Shared.DoAfter;
  2. using Content.Shared.Mech.Components;
  3. using Robust.Shared.Serialization;
  4. namespace Content.Shared.Mech.Equipment.Components;
  5. /// <summary>
  6. /// A piece of equipment that can be installed into <see cref="MechComponent"/>
  7. /// </summary>
  8. [RegisterComponent]
  9. public sealed partial class MechEquipmentComponent : Component
  10. {
  11. /// <summary>
  12. /// How long does it take to install this piece of equipment
  13. /// </summary>
  14. [DataField("installDuration")] public float InstallDuration = 5;
  15. /// <summary>
  16. /// The mech that the equipment is inside of.
  17. /// </summary>
  18. [ViewVariables] public EntityUid? EquipmentOwner;
  19. }
  20. /// <summary>
  21. /// Raised on the equipment when the installation is finished successfully
  22. /// </summary>
  23. public sealed class MechEquipmentInstallFinished : EntityEventArgs
  24. {
  25. public EntityUid Mech;
  26. public MechEquipmentInstallFinished(EntityUid mech)
  27. {
  28. Mech = mech;
  29. }
  30. }
  31. /// <summary>
  32. /// Raised on the equipment when the installation fails.
  33. /// </summary>
  34. public sealed class MechEquipmentInstallCancelled : EntityEventArgs
  35. {
  36. }
  37. [Serializable, NetSerializable]
  38. public sealed partial class GrabberDoAfterEvent : SimpleDoAfterEvent
  39. {
  40. }
  41. [Serializable, NetSerializable]
  42. public sealed partial class InsertEquipmentEvent : SimpleDoAfterEvent
  43. {
  44. }