Convert materials to use PhysicalComposition (#15414)
This commit is contained in:
@@ -1,16 +1,13 @@
|
||||
using Robust.Shared.GameStates;
|
||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Dictionary;
|
||||
|
||||
namespace Content.Shared.Materials
|
||||
namespace Content.Shared.Materials;
|
||||
/// <summary>
|
||||
/// Empty component that marks an entity as a "raw" material.
|
||||
/// The material amounts themselves are in <see cref="PhysicalCompositionComponent"/>
|
||||
/// </summary>
|
||||
[RegisterComponent, NetworkedComponent]
|
||||
public sealed class MaterialComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// Component to store data such as "this object is made out of steel".
|
||||
/// This is not a storage system for say smelteries.
|
||||
/// </summary>
|
||||
[RegisterComponent, NetworkedComponent]
|
||||
public sealed class MaterialComponent : Component
|
||||
{
|
||||
[DataField("materials", customTypeSerializer:typeof(PrototypeIdDictionarySerializer<int, MaterialPrototype>))]
|
||||
public readonly Dictionary<string, int> Materials = new();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user