The Pyro Update (#5575)

This commit is contained in:
mirrorcult
2021-11-28 19:25:51 -07:00
committed by GitHub
parent fc4a950257
commit 9cce58a70b
10 changed files with 244 additions and 5 deletions

View File

@@ -6,6 +6,7 @@ using Content.Shared.FixedPoint;
using Content.Shared.Sound;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.Manager.Attributes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Dictionary;
using Robust.Shared.ViewVariables;
namespace Content.Shared.Chemistry.Reaction
@@ -26,12 +27,14 @@ namespace Content.Shared.Chemistry.Reaction
/// <summary>
/// Reactants required for the reaction to occur.
/// </summary>
[DataField("reactants")] public Dictionary<string, ReactantPrototype> Reactants = new();
[DataField("reactants", customTypeSerializer:typeof(PrototypeIdDictionarySerializer<ReactantPrototype, ReagentPrototype>))]
public Dictionary<string, ReactantPrototype> Reactants = new();
/// <summary>
/// Reagents created when the reaction occurs.
/// </summary>
[DataField("products")] public Dictionary<string, FixedPoint2> Products = new();
[DataField("products", customTypeSerializer:typeof(PrototypeIdDictionarySerializer<FixedPoint2, ReagentPrototype>))]
public Dictionary<string, FixedPoint2> Products = new();
/// <summary>
/// Effects to be triggered when the reaction occurs.