Files
tbd-station-14/Content.Server/Health/BodySystem/BodyPreset/BodyPreset.cs
GlassEclipse 610ab8bf50 BodySystem stuff 2: overused boogaloo (#1174)
Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
2020-07-02 20:51:14 +02:00

35 lines
1.1 KiB
C#

using System.Collections.Generic;
using Content.Shared.BodySystem;
using Robust.Shared.ViewVariables;
namespace Content.Server.BodySystem {
/// <summary>
/// Stores data on what <see cref="BodyPartPrototype">BodyPartPrototypes</see> should fill a BodyTemplate. Used for loading complete body presets, like a "basic human" with all human limbs.
/// </summary>
public class BodyPreset {
private string _name;
private Dictionary<string,string> _partIDs;
[ViewVariables]
public string Name => _name;
/// <summary>
/// Maps a template slot to the ID of the <see cref="BodyPart"> that should fill it. E.g. "right arm" : "BodyPart.arm.basic_human".
/// </summary>
[ViewVariables]
public Dictionary<string, string> PartIDs => _partIDs;
public BodyPreset(BodyPresetPrototype data)
{
LoadFromPrototype(data);
}
public virtual void LoadFromPrototype(BodyPresetPrototype data)
{
_name = data.Name;
_partIDs = data.PartIDs;
}
}
}