Use automatic component registration.

This commit is contained in:
Pieter-Jan Briers
2019-07-31 15:02:36 +02:00
parent a90d7a645c
commit ceb8cc8421
94 changed files with 353 additions and 540 deletions

View File

@@ -1,6 +1,7 @@
using System;
using Content.Shared.Chemistry;
using Content.Shared.GameObjects;
using Robust.Shared.GameObjects;
using Robust.Shared.Interfaces.GameObjects;
namespace Content.Server.GameObjects.Components.Chemistry
@@ -8,6 +9,7 @@ namespace Content.Server.GameObjects.Components.Chemistry
/// <summary>
/// Shared ECS component that manages a liquid solution of reagents.
/// </summary>
[RegisterComponent]
internal class SolutionComponent : Shared.GameObjects.Components.Chemistry.SolutionComponent
{
/// <summary>
@@ -131,7 +133,7 @@ namespace Content.Server.GameObjects.Components.Chemistry
// pulling from an empty container, pointless to continue
if (transferQuantity <= 0)
return;
var transferSolution = component.SplitSolution(transferQuantity);
handSolutionComp.TryAddSolution(transferSolution);
}