fix burning to ash not working on all mobs (#27158)
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -1 +1 @@
|
||||
bodyburn-text-others = {$name}'s body burns to ash!
|
||||
bodyburn-text-others = {$name} burns to ash!
|
||||
|
||||
Reference in New Issue
Block a user