Stop the inevitability of death from misgendering you (#23949)

Fix rotting messages and make them use pronouns
This commit is contained in:
Nemanja
2024-01-11 18:12:32 -05:00
committed by GitHub
parent f9f5db9357
commit 0126b9820d
2 changed files with 13 additions and 11 deletions

View 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>