SurgeryOrganOnAddConditionComponent.cs 1.2 KB

12345678910111213141516171819202122232425262728293031
  1. // SPDX-FileCopyrightText: 2024 Piras314 <p1r4s@proton.me>
  2. // SPDX-FileCopyrightText: 2024 gluesniffler <159397573+gluesniffler@users.noreply.github.com>
  3. // SPDX-FileCopyrightText: 2025 Aiden <28298836+Aidenkrz@users.noreply.github.com>
  4. //
  5. // SPDX-License-Identifier: AGPL-3.0-or-later
  6. using Robust.Shared.GameStates;
  7. using Robust.Shared.Prototypes;
  8. namespace Content.Shared._Shitmed.Medical.Surgery.Conditions;
  9. // <summary>
  10. // What components are necessary in the part's organs' OnAdd fields for the surgery to be valid.
  11. //
  12. // Not all components need to be present (or missing for Inverse = true). At least one component matching (or missing) can make the surgery valid.
  13. // </summary>
  14. [RegisterComponent, NetworkedComponent]
  15. public sealed partial class SurgeryOrganOnAddConditionComponent : Component
  16. {
  17. // <summary>
  18. // The components to check for on each organ, with the key being the organ's SlotId.
  19. // </summary>
  20. [DataField(required: true)]
  21. public Dictionary<string, ComponentRegistry> Components;
  22. // <summary>
  23. // If true, the lack of these components will instead make the surgery valid.
  24. // </summary>
  25. [DataField]
  26. public bool Inverse = false;
  27. }