Add test for adding each component individually to an entity (#1870)

* Add test for adding each component individually to entities

* Put one-to-one test before all-at-once test
This commit is contained in:
DrSmugleaf
2020-08-24 13:39:00 +02:00
committed by GitHub
parent 9e6459ac79
commit a4f527351e
13 changed files with 297 additions and 114 deletions

View File

@@ -4,6 +4,7 @@ using Content.Shared.Chemistry;
using Robust.Server.GameObjects;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
using Robust.Shared.Log;
using Robust.Shared.Prototypes;
using Robust.Shared.Utility;
@@ -40,7 +41,14 @@ namespace Content.Server.GameObjects.Components.Chemistry
protected override void Startup()
{
base.Startup();
Owner.GetComponent<SolutionComponent>().Capabilities |= SolutionCaps.FitsInDispenser;
if (!Owner.EnsureComponent(out SolutionComponent solution))
{
Logger.Warning(
$"Entity {Owner.Name} at {Owner.Transform.MapPosition} didn't have a {nameof(SolutionComponent)}");
}
solution.Capabilities |= SolutionCaps.FitsInDispenser;
}
public void CancelTransformation()