fixes stacksystem exception

This commit is contained in:
Paul
2021-11-10 18:23:12 +01:00
parent 58fc8ee35f
commit 2f95d77060

View File

@@ -50,7 +50,10 @@ namespace Content.Server.Stack
// Get a prototype ID to spawn the new entity. Null is also valid, although it should rarely be picked... // Get a prototype ID to spawn the new entity. Null is also valid, although it should rarely be picked...
var prototype = _prototypeManager.TryIndex<StackPrototype>(stack.StackTypeId, out var stackType) var prototype = _prototypeManager.TryIndex<StackPrototype>(stack.StackTypeId, out var stackType)
? stackType.Spawn ? stackType.Spawn
: stack.Owner.Prototype?.ID ?? null; : stack.Owner.Prototype?.ID;
if (prototype == null)
return null;
// Try to remove the amount of things we want to split from the original stack... // Try to remove the amount of things we want to split from the original stack...
if (!Use(uid, amount, stack)) if (!Use(uid, amount, stack))