Makes machine parts stackable, removes unused field in stack prototypes (#28434)
* Makes machine parts stacks, removes unused field in stack prototypes * forgor * Fix tests * Fixes lathe construction. Yes. This sucks but there's no better way that doesnt involve refactoring machine parts completely * detail * a
This commit is contained in:
@@ -87,9 +87,9 @@ namespace Content.Shared.Construction
|
||||
foreach (var (stackId, amount) in comp.MaterialIdRequirements)
|
||||
{
|
||||
var stackProto = _prototype.Index<StackPrototype>(stackId);
|
||||
var defaultProto = _prototype.Index(stackProto.Spawn);
|
||||
|
||||
if (_prototype.TryIndex(stackProto.Spawn, out var defaultProto) &&
|
||||
defaultProto.TryGetComponent<PhysicalCompositionComponent>(out var physComp))
|
||||
if (defaultProto.TryGetComponent<PhysicalCompositionComponent>(out var physComp))
|
||||
{
|
||||
foreach (var (mat, matAmount) in physComp.MaterialComposition)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user