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

@@ -55,7 +55,7 @@ namespace Content.Shared.Chemistry
}
/// <summary>
/// Adds a given quantity of a reagent directly into the solution.
/// Adds a given quantity of a reagent directly into the solution.
/// </summary>
/// <param name="reagentId">The prototype ID of the reagent to add.</param>
/// <param name="quantity">The quantity in milli-units.</param>
@@ -193,7 +193,7 @@ namespace Content.Shared.Chemistry
return newSolution;
}
public void AddSolution(Solution otherSolution)
{
for (var i = 0; i < otherSolution._contents.Count; i++)
@@ -232,7 +232,7 @@ namespace Content.Shared.Chemistry
newSolution._contents.Add(reagent);
volume += reagent.Quantity;
}
newSolution.TotalVolume = volume;
return newSolution;
}
@@ -257,7 +257,7 @@ namespace Content.Shared.Chemistry
}
#region Enumeration
public IEnumerator<ReagentQuantity> GetEnumerator()
{
return _contents.GetEnumerator();

View File

@@ -14,6 +14,7 @@ namespace Content.Shared.GameObjects.Components.Materials
/// Component to store data such as "this object is made out of steel".
/// This is not a storage system for say smelteries.
/// </summary>
[RegisterComponent]
public class MaterialComponent : Component
{
public const string SerializationCache = "mat";

View File

@@ -7,6 +7,7 @@ namespace Content.Shared.GameObjects.Components.Mobs
/// <summary>
/// Component required for a player to be able to examine things.
/// </summary>
[RegisterComponent]
public sealed class ExaminerComponent : Component
{
public override string Name => "Examiner";