|
1 | 1 | using LabExtended.API.CustomRoles; |
2 | 2 | using LabExtended.API.CustomTeams; |
| 3 | + |
3 | 4 | using LabExtended.Extensions; |
4 | 5 | using LabExtended.Utilities.Values; |
5 | 6 |
|
|
27 | 28 |
|
28 | 29 | namespace LabExtended.API.Containers; |
29 | 30 |
|
| 31 | +/// <summary> |
| 32 | +/// Provides properties and methods for easier role management. |
| 33 | +/// </summary> |
30 | 34 | public class RoleContainer |
31 | 35 | { |
32 | 36 | internal RoleContainer(PlayerRoleManager manager) |
@@ -78,7 +82,12 @@ internal RoleContainer(PlayerRoleManager manager) |
78 | 82 | public RoleSpawnFlags SpawnFlags => Role.ServerSpawnFlags; |
79 | 83 |
|
80 | 84 | /// <summary> |
81 | | - /// Gets the player's first spawned role (when the round started, will be None if the player joined afterwards). |
| 85 | + /// Gets the role assigned to the player by the late join function (will be <see cref="RoleTypeId.None"/> if the player joined after the function's timer). |
| 86 | + /// </summary> |
| 87 | + public RoleTypeId LateJoinRole { get; internal set; } = RoleTypeId.None; |
| 88 | + |
| 89 | + /// <summary> |
| 90 | + /// Gets the player's first spawned role (when the round started, will be <see cref="RoleTypeId.None"/> if the player joined afterwards). |
82 | 91 | /// </summary> |
83 | 92 | public RoleTypeId RoundStartRole { get; internal set; } = RoleTypeId.None; |
84 | 93 |
|
@@ -122,7 +131,9 @@ public WearableElements WearableElements |
122 | 131 | /// <summary> |
123 | 132 | /// Gets the name of the player's role. |
124 | 133 | /// </summary> |
125 | | - public string Name => string.IsNullOrWhiteSpace(Role.RoleName) ? Role.ToString() : Role.RoleName; |
| 134 | + public string Name => string.IsNullOrWhiteSpace(Role.RoleName) |
| 135 | + ? Role.ToString().SpaceByUpperCase() |
| 136 | + : Role.RoleName; |
126 | 137 |
|
127 | 138 | /// <summary> |
128 | 139 | /// Gets the name of the player's role, prefixed with a color tag with the role's color and postfixed with a color closing tag. |
|
0 commit comments