Make printing from ore procecssors slightly more bearable (#31074)

* Make printing from ore procecssors slightly more bearable

* Update sheet.yml
This commit is contained in:
Nemanja
2024-08-17 01:12:55 -04:00
committed by GitHub
parent 7562b8fd47
commit ada6455b17
6 changed files with 118 additions and 42 deletions

View File

@@ -223,6 +223,9 @@ namespace Content.Shared.Stacks
foreach (var otherStack in intersecting)
{
var otherEnt = otherStack.Owner;
// if you merge a ton of stacks together, you will end up deleting a few by accident.
if (TerminatingOrDeleted(otherEnt) || EntityManager.IsQueuedForDeletion(otherEnt))
continue;
if (!TryMergeStacks(uid, otherEnt, out _, stack, otherStack))
continue;