]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Yellowtexting (#37360)
authorScarKy0 <106310278+ScarKy0@users.noreply.github.com>
Mon, 12 May 2025 16:22:25 +0000 (18:22 +0200)
committerGitHub <noreply@github.com>
Mon, 12 May 2025 16:22:25 +0000 (12:22 -0400)
* init

* else if tree

* f

* color

* review

Content.Server/Objectives/ObjectivesSystem.cs
Resources/Locale/en-US/objectives/round-end.ftl

index 7a995bd5cb750bf89b88d2509220cb2ecade72da..39effb9bdb473a17ec11e93a6aa2cdc95616dbef 100644 (file)
@@ -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)
                         ));
                     }
                 }
index 3da81fc96404536cfa28dc0369fef2108a9fac73..002eb83a794e8f3b924e6a66894872f8fbfbbb57 100644 (file)
@@ -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]