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;
[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()
{
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;
}
var description = "perishable-" + stage;
- args.PushMarkup(Loc.GetString(description));
+ args.PushMarkup(Loc.GetString(description, ("target", Identity.Entity(perishable, EntityManager))));
}
/// <summary>
>= 1 => "rotting-bloated",
_ => "rotting-rotting"
};
- args.PushMarkup(Loc.GetString(description));
+ args.PushMarkup(Loc.GetString(description, ("target", Identity.Entity(uid, EntityManager))));
}
/// <summary>
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]