Refactor stacks to use prototypes (#3387)
* Refactor stacks to use prototypes * Fix not assigned warning * Add names to stacks * Make machine baords and material constructions use the name as well * Remove defaulting stacks to prototype id * Fix tests Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
This commit is contained in:
@@ -14,7 +14,6 @@ using Robust.Shared.ViewVariables;
|
||||
|
||||
namespace Content.Server.GameObjects.Components.Stack
|
||||
{
|
||||
|
||||
// TODO: Naming and presentation and such could use some improvement.
|
||||
[RegisterComponent]
|
||||
[ComponentReference(typeof(SharedStackComponent))]
|
||||
@@ -85,7 +84,7 @@ namespace Content.Server.GameObjects.Components.Stack
|
||||
if (!eventArgs.Using.TryGetComponent<StackComponent>(out var stack))
|
||||
return false;
|
||||
|
||||
if (!stack.StackType.Equals(StackType))
|
||||
if (!stack.StackTypeId.Equals(StackTypeId))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user