2021-07-17 02:37:09 +02:00
|
|
|
|
using System.Collections.Generic;
|
2021-11-27 11:50:14 +13:00
|
|
|
|
using Content.Shared.Chemistry.Reagent;
|
2021-06-21 02:13:54 +02:00
|
|
|
|
using Robust.Shared.Localization;
|
2020-04-26 15:44:20 -05:00
|
|
|
|
using Robust.Shared.Prototypes;
|
2021-03-05 01:08:38 +01:00
|
|
|
|
using Robust.Shared.Serialization.Manager.Attributes;
|
2021-11-27 11:50:14 +13:00
|
|
|
|
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
|
|
|
|
|
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Dictionary;
|
2021-03-05 01:08:38 +01:00
|
|
|
|
using Robust.Shared.ViewVariables;
|
2020-04-26 15:44:20 -05:00
|
|
|
|
|
2021-06-09 22:19:39 +02:00
|
|
|
|
namespace Content.Shared.Kitchen
|
2020-04-26 15:44:20 -05:00
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// A recipe for space microwaves.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[Prototype("microwaveMealRecipe")]
|
2021-02-20 00:05:24 +01:00
|
|
|
|
public class FoodRecipePrototype : IPrototype
|
2020-04-26 15:44:20 -05:00
|
|
|
|
{
|
2021-03-05 01:08:38 +01:00
|
|
|
|
[ViewVariables]
|
2021-05-04 15:37:16 +02:00
|
|
|
|
[DataField("id", required: true)]
|
2021-03-05 01:08:38 +01:00
|
|
|
|
public string ID { get; } = default!;
|
|
|
|
|
|
|
|
|
|
|
|
[DataField("name")]
|
2021-02-27 04:12:09 +01:00
|
|
|
|
private string _name = string.Empty;
|
2021-02-20 00:05:24 +01:00
|
|
|
|
|
2021-11-27 11:50:14 +13:00
|
|
|
|
[DataField("reagents", customTypeSerializer:typeof(PrototypeIdDictionarySerializer<uint, ReagentPrototype>))]
|
|
|
|
|
|
private readonly Dictionary<string, uint> _ingsReagents = new();
|
2021-03-05 01:08:38 +01:00
|
|
|
|
|
2021-11-27 11:50:14 +13:00
|
|
|
|
[DataField("solids", customTypeSerializer: typeof(PrototypeIdDictionarySerializer<uint, EntityPrototype>))]
|
|
|
|
|
|
private readonly Dictionary<string, uint> _ingsSolids = new ();
|
2021-03-05 01:08:38 +01:00
|
|
|
|
|
2021-11-27 11:50:14 +13:00
|
|
|
|
[DataField("result", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]
|
2021-03-05 01:08:38 +01:00
|
|
|
|
public string Result { get; } = string.Empty;
|
|
|
|
|
|
|
2021-05-04 15:37:16 +02:00
|
|
|
|
[DataField("time")]
|
2021-11-27 11:50:14 +13:00
|
|
|
|
public uint CookTime { get; } = 5;
|
2021-02-20 00:05:24 +01:00
|
|
|
|
|
2021-06-21 02:13:54 +02:00
|
|
|
|
public string Name => Loc.GetString(_name);
|
2021-03-05 01:08:38 +01:00
|
|
|
|
|
2021-11-27 11:50:14 +13:00
|
|
|
|
public IReadOnlyDictionary<string, uint> IngredientsReagents => _ingsReagents;
|
|
|
|
|
|
public IReadOnlyDictionary<string, uint> IngredientsSolids => _ingsSolids;
|
2020-04-26 15:44:20 -05:00
|
|
|
|
}
|
|
|
|
|
|
}
|