Content PR for YAML hot reloading (#3319)
* Content PR for YAML hot reloading * Add CanAdminReloadPrototypes (host permission) * IndexedPrototype fixes
This commit is contained in:
@@ -9,20 +9,17 @@ namespace Content.Shared.Prototypes.Kitchen
|
||||
/// <summary>
|
||||
/// A recipe for space microwaves.
|
||||
/// </summary>
|
||||
|
||||
[Prototype("microwaveMealRecipe")]
|
||||
|
||||
public class FoodRecipePrototype : IPrototype, IIndexedPrototype
|
||||
public class FoodRecipePrototype : IPrototype
|
||||
{
|
||||
|
||||
private string _id;
|
||||
private string _name;
|
||||
private string _result;
|
||||
private int _cookTime;
|
||||
|
||||
|
||||
private Dictionary<string, int> _ingsReagents;
|
||||
private Dictionary<string, int> _ingsSolids;
|
||||
|
||||
|
||||
public string Name => Loc.GetString(_name);
|
||||
public string ID => _id;
|
||||
public string Result => _result;
|
||||
@@ -30,7 +27,6 @@ namespace Content.Shared.Prototypes.Kitchen
|
||||
public IReadOnlyDictionary<string, int> IngredientsReagents => _ingsReagents;
|
||||
public IReadOnlyDictionary<string, int> IngredientsSolids => _ingsSolids;
|
||||
|
||||
|
||||
public void LoadFrom(YamlMappingNode mapping)
|
||||
{
|
||||
var serializer = YamlObjectSerializer.NewReader(mapping);
|
||||
@@ -42,6 +38,5 @@ namespace Content.Shared.Prototypes.Kitchen
|
||||
serializer.DataField(ref _ingsSolids, "solids", new Dictionary<string, int>());
|
||||
serializer.DataField(ref _cookTime, "time", 5);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user