mirror of
https://github.com/corvax-team/ss14-wl.git
synced 2026-06-09 10:06:46 +02:00
25 lines
675 B
C#
25 lines
675 B
C#
using Content.Client.Lobby;
|
|
using Content.Shared.Preferences;
|
|
using Content.Shared.Roles;
|
|
|
|
namespace Content.Client.Roles;
|
|
|
|
public sealed partial class RoleSystem : SharedRoleSystem
|
|
{
|
|
//WL-changes-start
|
|
[Dependency] private IClientPreferencesManager _prefMan = default!;
|
|
|
|
public string? GetChosenSubname(string jobId)
|
|
{
|
|
var notTrueProfile = _prefMan.Preferences?.SelectedCharacter;
|
|
if (notTrueProfile == null || notTrueProfile is not HumanoidCharacterProfile profile)
|
|
return null;
|
|
|
|
if (!profile.JobSubnames.TryGetValue(jobId, out var subname))
|
|
return null;
|
|
|
|
return subname;
|
|
}
|
|
//WL-changes-end
|
|
}
|