fixes stacksystem exception
This commit is contained in:
@@ -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))
|
||||||
|
|||||||
Reference in New Issue
Block a user