Fix 3000 errors
This commit is contained in:
@@ -4,7 +4,6 @@ using Content.Server.Stack;
|
||||
using Robust.Shared.Containers;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Serialization.Manager.Attributes;
|
||||
|
||||
namespace Content.Server.Construction.Components
|
||||
@@ -90,7 +89,7 @@ namespace Content.Server.Construction.Components
|
||||
{
|
||||
var stack = EntitySystem.Get<StackSystem>().Spawn(amount, stackType, IoCManager.Resolve<IEntityManager>().GetComponent<TransformComponent>(Owner).Coordinates);
|
||||
|
||||
if (!partContainer.Insert(IoCManager.Resolve<IEntityManager>().GetEntity(stack)))
|
||||
if (!partContainer.Insert(stack))
|
||||
throw new Exception($"Couldn't insert machine material of type {stackType} to machine with prototype {IoCManager.Resolve<IEntityManager>().GetComponent<MetaDataComponent>(Owner).EntityPrototype?.ID ?? "N/A"}");
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Content.Server.Stack;
|
||||
using Content.Shared.Construction;
|
||||
@@ -319,7 +318,7 @@ namespace Content.Server.Construction.Components
|
||||
if (splitStack == null)
|
||||
return false;
|
||||
|
||||
if(!_partContainer.Insert(IoCManager.Resolve<IEntityManager>().GetEntity(splitStack.Value)))
|
||||
if(!_partContainer.Insert(splitStack.Value))
|
||||
return false;
|
||||
|
||||
_materialProgress[type] += needed;
|
||||
|
||||
@@ -4,14 +4,11 @@ using Content.Server.Stack;
|
||||
using Content.Server.Tools;
|
||||
using Content.Server.Tools.Components;
|
||||
using Content.Shared.Interaction;
|
||||
using Content.Shared.Stacks;
|
||||
using Content.Shared.Tools;
|
||||
using Content.Shared.Tools.Components;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Serialization.Manager.Attributes;
|
||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
||||
using Robust.Shared.ViewVariables;
|
||||
|
||||
namespace Content.Server.Construction.Components
|
||||
{
|
||||
@@ -61,7 +58,7 @@ namespace Content.Server.Construction.Components
|
||||
|
||||
// get last owner coordinates and delete it
|
||||
var resultPosition = IoCManager.Resolve<IEntityManager>().GetComponent<TransformComponent>(Owner).Coordinates;
|
||||
IoCManager.Resolve<IEntityManager>().DeleteEntity((EntityUid) Owner);
|
||||
IoCManager.Resolve<IEntityManager>().DeleteEntity(Owner);
|
||||
|
||||
// spawn each result after refine
|
||||
foreach (var result in _refineResult!)
|
||||
|
||||
Reference in New Issue
Block a user