Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 26 additions & 1 deletion Content.Shared/Humanoid/Markings/MarkingPrototype.cs
Original file line number Diff line number Diff line change
@@ -1,20 +1,31 @@
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Array;
using Robust.Shared.Utility;

namespace Content.Shared.Humanoid.Markings
{
[Prototype]
public sealed partial class MarkingPrototype : IPrototype
public sealed partial class MarkingPrototype : IPrototype, IInheritingPrototype // DEN: Make inheriting
{
[IdDataField]
public string ID { get; private set; } = "uwu";

// DEN start: Make markings inheriting
[ParentDataField(typeof(AbstractPrototypeIdArraySerializer<MarkingPrototype>))]
public string[]? Parents { get; private set; }

[NeverPushInheritance]
[AbstractDataField]
public bool Abstract { get; private set; }
// End DEN

public string Name { get; private set; } = default!;

[DataField("bodyPart", required: true)]
public HumanoidVisualLayers BodyPart { get; private set; } = default!;

[DataField]
[AlwaysPushInheritance] // DEN
public List<ProtoId<MarkingsGroupPrototype>>? GroupWhitelist;

[DataField("sexRestriction")]
Expand All @@ -36,6 +47,20 @@ public sealed partial class MarkingPrototype : IPrototype
[DataField("sprites", required: true)]
public List<SpriteSpecifier> Sprites { get; private set; } = default!;

// DEN start: categorization of markings

/// <summary>
/// A list of "categories" that this marking belongs to.
/// </summary>
/// <remarks>
/// This will eventually be used for in-round marking customization - such as interactions that
/// can change your scars, tattoos, gauze wraps, or underwear in the middle of a round.
/// </remarks>
[DataField]
public HashSet<string> Categories = new();

// DEN end

public Marking AsMarking()
{
return new Marking(ID, Sprites.Count);
Expand Down
Loading