IGraphNodeEntity.cs 1.1 KB

1234567891011121314151617181920212223242526272829
  1. using Robust.Shared.Prototypes;
  2. namespace Content.Shared.Construction;
  3. public interface IGraphNodeEntity
  4. {
  5. /// <summary>
  6. /// Gets the <see cref="EntityPrototype"/> ID for a node, given the <see cref="EntityUid"/> of both the
  7. /// construction entity and the user entity.
  8. /// If the construction entity is null, then we are dealing with a "start construction" for an entity that
  9. /// does not exist yet.
  10. /// If the user entity is null, this node was reached through means other some sort of "user interaction".
  11. /// </summary>
  12. /// <param name="uid">Uid of the construction entity.</param>
  13. /// <param name="userUid">Uid of the user that caused the transition to the node.</param>
  14. /// <param name="args">Arguments with useful instances, etc.</param>
  15. /// <returns></returns>
  16. public string? GetId(EntityUid? uid, EntityUid? userUid, GraphNodeEntityArgs args);
  17. }
  18. public readonly struct GraphNodeEntityArgs
  19. {
  20. public readonly IEntityManager EntityManager;
  21. public GraphNodeEntityArgs(IEntityManager entityManager)
  22. {
  23. EntityManager = entityManager;
  24. }
  25. }