Fix entities burning to ash not using identity, and bad formatting (#36268)

* Make burning to ash use identity

* CAPITALIZE(THE())
This commit is contained in:
Tayrtahn 2025-04-02 22:02:09 -04:00 committed by deltanedas
parent 482c197630
commit b0a3bb60a0
2 changed files with 9 additions and 3 deletions

View File

@ -1,5 +1,6 @@
using Content.Shared.Body.Components;
using Content.Shared.Body.Part; // Shitmed Change
using Content.Shared.IdentityManagement;
using Content.Shared.Inventory;
using Content.Shared.Popups;
using JetBrains.Annotations;
@ -26,16 +27,21 @@ public sealed partial class BurnBodyBehavior : IThresholdBehavior
}
}
var bodyIdentity = Identity.Entity(bodyId, system.EntityManager);
// Begin Shitmed Changes
if (system.EntityManager.TryGetComponent<BodyPartComponent>(bodyId, out var bodyPart))
{
if (bodyPart.CanSever
&& system.BodySystem.BurnPart(bodyId, bodyPart))
sharedPopupSystem.PopupCoordinates(Loc.GetString("bodyburn-text-others", ("name", bodyId)), transformSystem.GetMoverCoordinates(bodyId), PopupType.LargeCaution);
sharedPopupSystem.PopupCoordinates(Loc.GetString("bodyburn-text-others", ("name", bodyIdentity)), transformSystem.GetMoverCoordinates(bodyId), PopupType.LargeCaution);
}
else
{
sharedPopupSystem.PopupCoordinates(Loc.GetString("bodyburn-text-others", ("name", bodyId)), transformSystem.GetMoverCoordinates(bodyId), PopupType.LargeCaution);
sharedPopupSystem.PopupCoordinates(Loc.GetString("bodyburn-text-others", ("name", bodyIdentity)), transformSystem.GetMoverCoordinates(bodyId), PopupType.LargeCaution);
system.EntityManager.QueueDeleteEntity(bodyId);
}
// End Shitmed Changes
system.EntityManager.QueueDeleteEntity(bodyId);
}
}

View File

@ -1 +1 @@
bodyburn-text-others = {$name} burns to ash!
bodyburn-text-others = {CAPITALIZE(THE($name))} burns to ash!