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:
DrSmugleaf
2021-02-25 06:18:29 +01:00
committed by GitHub
parent 7c32574547
commit fdcbece63d
33 changed files with 326 additions and 186 deletions

View File

@@ -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;
}