From: ScarKy0 <106310278+ScarKy0@users.noreply.github.com> Date: Mon, 12 May 2025 16:22:25 +0000 (+0200) Subject: Yellowtexting (#37360) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=4ac4d3e0806e42a84f8234c0a1363cbaf8e32d36;p=space-station-14.git Yellowtexting (#37360) * init * else if tree * f * color * review --- diff --git a/Content.Server/Objectives/ObjectivesSystem.cs b/Content.Server/Objectives/ObjectivesSystem.cs index 7a995bd5cb..39effb9bdb 100644 --- a/Content.Server/Objectives/ObjectivesSystem.cs +++ b/Content.Server/Objectives/ObjectivesSystem.cs @@ -178,17 +178,32 @@ public sealed class ObjectivesSystem : SharedObjectivesSystem agentSummary.AppendLine(Loc.GetString( "objectives-objective-success", ("objective", objectiveTitle), - ("markupColor", "green") + ("progress", progress) )); completedObjectives++; } + else if (progress <= 0.99f && progress >= 0.5f) + { + agentSummary.AppendLine(Loc.GetString( + "objectives-objective-partial-success", + ("objective", objectiveTitle), + ("progress", progress) + )); + } + else if (progress < 0.5f && progress > 0f) + { + agentSummary.AppendLine(Loc.GetString( + "objectives-objective-partial-failure", + ("objective", objectiveTitle), + ("progress", progress) + )); + } else { agentSummary.AppendLine(Loc.GetString( "objectives-objective-fail", ("objective", objectiveTitle), - ("progress", (int) (progress * 100)), - ("markupColor", "red") + ("progress", progress) )); } } diff --git a/Resources/Locale/en-US/objectives/round-end.ftl b/Resources/Locale/en-US/objectives/round-end.ftl index 3da81fc964..002eb83a79 100644 --- a/Resources/Locale/en-US/objectives/round-end.ftl +++ b/Resources/Locale/en-US/objectives/round-end.ftl @@ -11,7 +11,9 @@ objectives-player-named = [color=White]{$name}[/color] objectives-no-objectives = {$custody}{$title} was a {$agent}. objectives-with-objectives = {$custody}{$title} was a {$agent} who had the following objectives: -objectives-objective-success = {$objective} | [color={$markupColor}]Success![/color] -objectives-objective-fail = {$objective} | [color={$markupColor}]Failure![/color] ({$progress}%) +objectives-objective-success = {$objective} | [color=green]Success![/color] ({TOSTRING($progress, "P0")}) +objectives-objective-partial-success = {$objective} | [color=yellow]Partial Success![/color] ({TOSTRING($progress, "P0")}) +objectives-objective-partial-failure = {$objective} | [color=orange]Partial Failure![/color] ({TOSTRING($progress, "P0")}) +objectives-objective-fail = {$objective} | [color=red]Failure![/color] ({TOSTRING($progress, "P0")}) objectives-in-custody = [bold][color=red]| IN CUSTODY | [/color][/bold]