CatStation/Content.Shared/Chemistry/Reaction/ReactiveComponent.cs
deltanedas cf7fde3d62
Big prototype and datafield cleanup (#45202)
* giant protoid cleanup

* yml changes

* !

---------

Co-authored-by: deltanedas <@deltanedas:goida.zip>
2026-08-12 02:07:22 +00:00

38 lines
1.2 KiB
C#

using Content.Shared.Chemistry.Reagent;
using Content.Shared.EntityEffects;
using Robust.Shared.Prototypes;
namespace Content.Shared.Chemistry.Reaction;
[RegisterComponent]
public sealed partial class ReactiveComponent : Component
{
/// <summary>
/// A dictionary of reactive groups -> methods that work on them.
/// </summary>
[DataField("groups")]
public Dictionary<ProtoId<ReactiveGroupPrototype>, HashSet<ReactionMethod>>? ReactiveGroups;
/// <summary>
/// Special reactions that this prototype can specify, outside of any that reagents already apply.
/// Useful for things like monkey cubes, which have a really prototype-specific effect.
/// </summary>
[DataField]
public List<ReactiveReagentEffectEntry>? Reactions;
}
[DataDefinition]
public sealed partial class ReactiveReagentEffectEntry
{
[DataField]
public HashSet<ReactionMethod> Methods = default!;
[DataField]
public HashSet<ProtoId<ReagentPrototype>>? Reagents;
[DataField(required: true)]
public EntityEffect[] Effects = default!;
[DataField("groups")]
public Dictionary<ProtoId<ReactiveGroupPrototype>, HashSet<ReactionMethod>>? ReactiveGroups { get; private set; }
}