]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Stop the inevitability of death from misgendering you (#23949)
authorNemanja <98561806+EmoGarbage404@users.noreply.github.com>
Thu, 11 Jan 2024 23:12:32 +0000 (18:12 -0500)
committerGitHub <noreply@github.com>
Thu, 11 Jan 2024 23:12:32 +0000 (10:12 +1100)
Fix rotting messages and make them use pronouns

Content.Server/Atmos/Rotting/RottingSystem.cs
Resources/Locale/en-US/disease/miasma.ftl

index 246758532a6e3b29ebf439308c588bc43dc96388..8ddc1b0fb9054a526b7009d15d1357330fdc3c78 100644 (file)
@@ -5,12 +5,12 @@ using Content.Server.Body.Components;
 using Content.Server.Temperature.Components;
 using Content.Shared.Atmos.Rotting;
 using Content.Shared.Examine;
+using Content.Shared.IdentityManagement;
 using Content.Shared.Mobs;
 using Content.Shared.Mobs.Components;
 using Content.Shared.Mobs.Systems;
 using Content.Shared.Rejuvenate;
 using Robust.Server.Containers;
-using Robust.Server.GameObjects;
 using Robust.Shared.Physics.Components;
 using Robust.Shared.Timing;
 
@@ -23,7 +23,6 @@ public sealed class RottingSystem : EntitySystem
     [Dependency] private readonly ContainerSystem _container = default!;
     [Dependency] private readonly DamageableSystem _damageable = default!;
     [Dependency] private readonly MobStateSystem _mobState = default!;
-    [Dependency] private readonly TransformSystem _transform = default!;
 
     public override void Initialize()
     {
@@ -56,7 +55,10 @@ public sealed class RottingSystem : EntitySystem
 
     private void OnMobStateChanged(EntityUid uid, PerishableComponent component, MobStateChangedEvent args)
     {
-        if (!_mobState.IsDead(uid))
+        if (args.NewMobState != MobState.Dead && args.OldMobState != MobState.Dead)
+            return;
+
+        if (HasComp<RottingComponent>(uid))
             return;
 
         component.RotAccumulator = TimeSpan.Zero;
@@ -134,7 +136,7 @@ public sealed class RottingSystem : EntitySystem
         }
 
         var description = "perishable-" + stage;
-        args.PushMarkup(Loc.GetString(description));
+        args.PushMarkup(Loc.GetString(description, ("target", Identity.Entity(perishable, EntityManager))));
     }
 
     /// <summary>
@@ -157,7 +159,7 @@ public sealed class RottingSystem : EntitySystem
             >= 1 => "rotting-bloated",
                _ => "rotting-rotting"
         };
-        args.PushMarkup(Loc.GetString(description));
+        args.PushMarkup(Loc.GetString(description, ("target", Identity.Entity(uid, EntityManager))));
     }
 
     /// <summary>
index 06c96bc73d27d28796ea0dcf4300eaaf026e3255..5ee77d02041f136b44bcbeb306b400a912363d8d 100644 (file)
@@ -1,7 +1,7 @@
 ammonia-smell = Something smells pungent!
-perishable-1 = [color=green]It still looks fresh.[/color]
-perishable-2 = [color=orangered]It looks somewhat fresh.[/color]
-perishable-3 = [color=red]It doesn't look fresh anymore.[/color]
-rotting-rotting = [color=orange]It's rotting![/color]
-rotting-bloated = [color=orangered]It's bloated![/color]
-rotting-extremely-bloated = [color=red]It's extremely bloated![/color]
+perishable-1 = [color=green]{ CAPITALIZE(SUBJECT($target)) } still {CONJUGATE-BASIC($target, "look", "looks")} fresh.[/color]
+perishable-2 = [color=orangered]{ CAPITALIZE(SUBJECT($target)) } {CONJUGATE-BASIC($target, "look", "looks")} somewhat fresh.[/color]
+perishable-3 = [color=red]{ CAPITALIZE(SUBJECT($target)) } {CONJUGATE-BASIC($target, "do not", "doesn't")} {CONJUGATE-BASIC($target, "look", "looks")} fresh anymore.[/color]
+rotting-rotting = [color=orange]{ CAPITALIZE(SUBJECT($target)) } {CONJUGATE-BE($target)} rotting![/color]
+rotting-bloated = [color=orangered]{ CAPITALIZE(SUBJECT($target)) } {CONJUGATE-BE($target)} bloated![/color]
+rotting-extremely-bloated = [color=red]{ CAPITALIZE(SUBJECT($target)) } {CONJUGATE-BE($target)} extremely bloated![/color]