1
0

MindGetAllRoleInfoEvent.cs 1002 B

1234567891011121314151617181920
  1. using Content.Shared.Players.PlayTimeTracking;
  2. namespace Content.Shared.Roles;
  3. /// <summary>
  4. /// Event raised on a mind entity to get all roles that a player has.
  5. /// </summary>
  6. /// <param name="Roles">The list of roles on the player.</param>
  7. [ByRefEvent]
  8. public readonly record struct MindGetAllRoleInfoEvent(List<RoleInfo> Roles);
  9. /// <summary>
  10. /// Returned by <see cref="MindGetAllRolesEvent"/> to give some information about a player's role.
  11. /// </summary>
  12. /// <param name="Component">Role component associated with the mind entity id.</param>
  13. /// <param name="Name">Name of the role.</param>
  14. /// <param name="Antagonist">Whether or not this role makes this player an antagonist.</param>
  15. /// <param name="PlayTimeTrackerId">The <see cref="PlayTimeTrackerPrototype"/> id associated with the role.</param>
  16. /// <param name="Prototype">The prototype ID of the role</param>
  17. public readonly record struct RoleInfo(string Name, bool Antagonist, string? PlayTimeTrackerId, string Prototype);