Inline Prototype

This commit is contained in:
Vera Aguilera Puerto
2021-12-03 11:13:58 +01:00
parent cd43196ea8
commit 70bbd8c502
18 changed files with 54 additions and 38 deletions

View File

@@ -50,7 +50,7 @@ namespace Content.Server.Stack
// 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)
? stackType.Spawn
: stack.Owner.Prototype?.ID;
: IoCManager.Resolve<IEntityManager>().GetComponent<MetaDataComponent>(stack.Owner.Uid).EntityPrototype?.ID;
// Try to remove the amount of things we want to split from the original stack...
if (!Use(uid, amount, stack))