Remove unncessary class dictionary and list. Fix meal prototype properties.
This commit is contained in:
@@ -19,29 +19,31 @@ namespace Content.Shared.Prototypes.Kitchen
|
||||
{
|
||||
|
||||
private string _id;
|
||||
public string Name => Loc.GetString(Name);
|
||||
private string _name;
|
||||
public string Result;
|
||||
public int CookTime;
|
||||
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;
|
||||
public int CookTime => _cookTime;
|
||||
public IReadOnlyDictionary<string, int> IngredientsReagents => _ingsReagents;
|
||||
public IReadOnlyDictionary<string, int> IngredientsSolids => _ingsSolids;
|
||||
|
||||
private Dictionary<string, int> _ingsReagents;
|
||||
private Dictionary<string, int> _ingsSolids;
|
||||
|
||||
|
||||
public string ID => _id;
|
||||
|
||||
|
||||
public void LoadFrom(YamlMappingNode mapping)
|
||||
{
|
||||
var serializer = YamlObjectSerializer.NewReader(mapping);
|
||||
|
||||
serializer.DataField(ref _id, "id", string.Empty);
|
||||
serializer.DataField(ref _name, "name", string.Empty);
|
||||
serializer.DataField(ref Result, "result", string.Empty);
|
||||
serializer.DataField(ref _result, "result", string.Empty);
|
||||
serializer.DataField(ref _ingsReagents, "reagents", new Dictionary<string, int>());
|
||||
serializer.DataField(ref _ingsSolids, "solids", new Dictionary<string, int>());
|
||||
serializer.DataField(ref CookTime, "time", 5);
|
||||
serializer.DataField(ref _cookTime, "time", 5);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user