Salvage mob restrictions (#8080)

This commit is contained in:
20kdc
2022-05-13 20:01:30 +01:00
committed by GitHub
parent 2c927bb24e
commit 90cce82a47
8 changed files with 181 additions and 22 deletions

View File

@@ -189,8 +189,13 @@ namespace Content.Server.Salvage
{
if (player.AttachedEntity.HasValue)
{
var playerTransform = EntityManager.GetComponent<TransformComponent>(player.AttachedEntity.Value);
playerTransform.AttachParent(parentTransform);
var playerEntityUid = player.AttachedEntity.Value;
if (HasComp<SalvageMobRestrictionsComponent>(playerEntityUid))
{
// Salvage mobs are NEVER immune (even if they're from a different salvage, they shouldn't be here)
continue;
}
Transform(playerEntityUid).AttachParent(parentTransform);
}
}
EntityManager.QueueDeleteEntity(salvage);