Fix cargo gifts (#18449)
Some of the IDs were invalid and no typeserializer.
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
using Content.Server.StationEvents.Events;
|
||||
using Content.Shared.Cargo.Prototypes;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Dictionary;
|
||||
|
||||
namespace Content.Server.StationEvents.Components;
|
||||
|
||||
@@ -38,8 +40,8 @@ public sealed class CargoGiftsRuleComponent : Component
|
||||
/// Cargo that you would like gifted to the station, with the quantity for each
|
||||
/// Use Ids from cargoProduct Prototypes
|
||||
/// </summary>
|
||||
[DataField("gifts"), ViewVariables(VVAccess.ReadWrite)]
|
||||
public Dictionary<string, int> Gifts = new Dictionary<string, int>();
|
||||
[DataField("gifts", required: true, customTypeSerializer:typeof(PrototypeIdDictionarySerializer<int, CargoProductPrototype>)), ViewVariables(VVAccess.ReadWrite)]
|
||||
public Dictionary<string, int> Gifts = new();
|
||||
|
||||
/// <summary>
|
||||
/// How much space (minimum) you want to leave in the order database for supply to actually do their work
|
||||
|
||||
Reference in New Issue
Block a user