Fix RoleTimeRequirement localization (#34735)
* fix job restriction localization * Update Content.Shared/Roles/JobRequirement/RoleTimeRequirement.cs * Update Content.Shared/Roles/JobRequirement/RoleTimeRequirement.cs --------- Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
This commit is contained in:
@@ -40,13 +40,16 @@ public sealed partial class RoleTimeRequirement : JobRequirement
|
||||
var formattedRoleDiff = ContentLocalizationManager.FormatPlaytime(roleDiffSpan);
|
||||
var departmentColor = Color.Yellow;
|
||||
|
||||
if (entManager.EntitySysManager.TryGetEntitySystem(out SharedJobSystem? jobSystem))
|
||||
{
|
||||
var jobProto = jobSystem.GetJobPrototype(proto);
|
||||
if (!entManager.EntitySysManager.TryGetEntitySystem(out SharedJobSystem? jobSystem))
|
||||
return false;
|
||||
|
||||
if (jobSystem.TryGetDepartment(jobProto, out var departmentProto))
|
||||
departmentColor = departmentProto.Color;
|
||||
}
|
||||
var jobProto = jobSystem.GetJobPrototype(proto);
|
||||
|
||||
if (jobSystem.TryGetDepartment(jobProto, out var departmentProto))
|
||||
departmentColor = departmentProto.Color;
|
||||
|
||||
if (!protoManager.TryIndex<JobPrototype>(jobProto, out var indexedJob))
|
||||
return false;
|
||||
|
||||
if (!Inverted)
|
||||
{
|
||||
@@ -56,7 +59,7 @@ public sealed partial class RoleTimeRequirement : JobRequirement
|
||||
reason = FormattedMessage.FromMarkupPermissive(Loc.GetString(
|
||||
"role-timer-role-insufficient",
|
||||
("time", formattedRoleDiff),
|
||||
("job", Loc.GetString(proto)),
|
||||
("job", indexedJob.LocalizedName),
|
||||
("departmentColor", departmentColor.ToHex())));
|
||||
return false;
|
||||
}
|
||||
@@ -66,7 +69,7 @@ public sealed partial class RoleTimeRequirement : JobRequirement
|
||||
reason = FormattedMessage.FromMarkupPermissive(Loc.GetString(
|
||||
"role-timer-role-too-high",
|
||||
("time", formattedRoleDiff),
|
||||
("job", Loc.GetString(proto)),
|
||||
("job", indexedJob.LocalizedName),
|
||||
("departmentColor", departmentColor.ToHex())));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
role-timer-department-insufficient = You require [color=yellow]{$time}[/color] more playtime in the [color={$departmentColor}]{$department}[/color] department to play this role.
|
||||
role-timer-department-too-high = You require [color=yellow]{$time}[/color] less playtime in the [color={$departmentColor}]{$department}[/color] department to play this role. (Are you trying to play a trainee role?)
|
||||
role-timer-overall-insufficient = You require [color=yellow]{$time}[/color] more overall playtime to play this role.
|
||||
role-timer-overall-too-high = You require [color=yellow]{$time}[/color] less overall playtime to play this role. (Are you trying to play a trainee role?)
|
||||
role-timer-role-insufficient = You require [color=yellow]{$time}[/color] more playtime with [color={$departmentColor}]{$job}[/color] to play this role.
|
||||
role-timer-role-too-high = You require[color=yellow] {$time}[/color] less playtime with [color={$departmentColor}]{$job}[/color] to play this role. (Are you trying to play a trainee role?)
|
||||
role-timer-age-too-old = Your character must be under the age of [color=yellow]{$age}[/color] to play this role.
|
||||
role-timer-age-too-young = Your character must be over the age of [color=yellow]{$age}[/color] to play this role.
|
||||
role-timer-whitelisted-species = Your character must be one of the following species to play this role:
|
||||
role-timer-blacklisted-species = Your character must not be one of the following species to play this role:
|
||||
role-timer-whitelisted-traits = Your character must have one of the following traits:
|
||||
role-timer-blacklisted-traits = Your character must not have any of the following traits:
|
||||
role-timer-department-insufficient = You require [color=yellow]{$time}[/color] more playtime in the [color={$departmentColor}]{$department}[/color] department to unlock this.
|
||||
role-timer-department-too-high = You require [color=yellow]{$time}[/color] less playtime in the [color={$departmentColor}]{$department}[/color] department to select this. (Are you trying to play a trainee role?)
|
||||
role-timer-overall-insufficient = You require [color=yellow]{$time}[/color] more overall playtime to unlock this.
|
||||
role-timer-overall-too-high = You require [color=yellow]{$time}[/color] less overall playtime to select this. (Are you trying to play a trainee role?)
|
||||
role-timer-role-insufficient = You require [color=yellow]{$time}[/color] more playtime with [color={$departmentColor}]{$job}[/color] to unlock this.
|
||||
role-timer-role-too-high = You require[color=yellow] {$time}[/color] less playtime with [color={$departmentColor}]{$job}[/color] to select this. (Are you trying to play a trainee role?)
|
||||
role-timer-age-too-old = Your character must be under the age of [color=yellow]{$age}[/color] for you to choose this.
|
||||
role-timer-age-too-young = Your character must be over the age of [color=yellow]{$age}[/color] for you to choose this.
|
||||
role-timer-whitelisted-species = Your character must be one of the following species for you to select this:
|
||||
role-timer-blacklisted-species = Your character must not be one of the following species for you to select this:
|
||||
role-timer-whitelisted-traits = Your character must have one of the following traits for you to select this:
|
||||
role-timer-blacklisted-traits = Your character must not have any of the following traits for you to select this:
|
||||
|
||||
role-timer-locked = Locked (hover for details)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user