Fix dupe bug caused by StackSystem (#43738)

* Fix dupe bug  caused by StackSystem

* Removed TryComp
This commit is contained in:
Sidzaru 2026-04-26 04:17:43 +00:00 • committed by GitHub
parent ab96ec8b20
commit be86aa2b5f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -26,7 +26,10 @@ public abstract partial class SharedStackSystem
ReduceCount(stackEnt, 1);
var stackId = _prototype.Index(stackEnt.Comp.StackTypeId);
return PredictedSpawnNextToOrDrop(stackId.Spawn, stackEnt.Owner);
var entityUid = PredictedSpawnNextToOrDrop(stackId.Spawn, stackEnt.Owner);
SetCount(entityUid, 1);
return entityUid;
}
#endregion