fix burning to ash not working on all mobs (#27158)

This commit is contained in:
Whisper
2024-04-20 10:44:10 -04:00
committed by GitHub
parent b6781946df
commit c7bbaa48a4
2 changed files with 6 additions and 6 deletions

View File

@@ -17,12 +17,12 @@ public sealed partial class BurnBodyBehavior : IThresholdBehavior
var inventorySystem = system.EntityManager.System<InventorySystem>();
var sharedPopupSystem = system.EntityManager.System<SharedPopupSystem>();
if (!system.EntityManager.TryGetComponent<InventoryComponent>(bodyId, out var comp))
return;
foreach (var item in inventorySystem.GetHandOrInventoryEntities(bodyId))
if (system.EntityManager.TryGetComponent<InventoryComponent>(bodyId, out var comp))
{
transformSystem.DropNextTo(item, bodyId);
foreach (var item in inventorySystem.GetHandOrInventoryEntities(bodyId))
{
transformSystem.DropNextTo(item, bodyId);
}
}
sharedPopupSystem.PopupCoordinates(Loc.GetString("bodyburn-text-others", ("name", bodyId)), transformSystem.GetMoverCoordinates(bodyId), PopupType.LargeCaution);

View File

@@ -1 +1 @@
bodyburn-text-others = {$name}'s body burns to ash!
bodyburn-text-others = {$name} burns to ash!