* Added the ReagentPrototype class. * Added the new Solution class. * Added new shared SolutionComponent to the ECS system. * Added some basic element and chemical reagent prototypes. * Added a new Beaker item utilizing the SolutionComponent. This is a testing/debug entity, and should be removed or changed soon. * Added filters for code coverage. * Nightly work. * Added the server SolutionComponent class. * Added a bucket. Verbs set up for solution interaction. * Adds water tank entity to the game. * Added a full water tank entity. Solutions are properly serialized. Solution can be poured between two containers. * Solution class can now be enumerated. SolutionComponent now calculates the color of the solution. * Minor Cleanup.
26 lines
855 B
C#
26 lines
855 B
C#
using Robust.Shared.Maths;
|
|
using Robust.Shared.Prototypes;
|
|
using Robust.Shared.Utility;
|
|
using YamlDotNet.RepresentationModel;
|
|
|
|
namespace Content.Shared.Chemistry
|
|
{
|
|
[Prototype("reagent")]
|
|
public class ReagentPrototype : IPrototype, IIndexedPrototype
|
|
{
|
|
public string ID { get; private set; }
|
|
public string Name { get; private set; }
|
|
public string Description { get; private set; }
|
|
public Color SubstanceColor { get; private set; }
|
|
|
|
public void LoadFrom(YamlMappingNode mapping)
|
|
{
|
|
ID = mapping.GetNode("id").AsString();
|
|
Name = mapping.GetNode("name").ToString();
|
|
Description = mapping.GetNode("desc").ToString();
|
|
|
|
SubstanceColor = mapping.TryGetNode("color", out var colorNode) ? colorNode.AsHexColor(Color.White) : Color.White;
|
|
}
|
|
}
|
|
}
|