Refactor "output" to "result" for recipes/prototypes.
Remove a debug recipe from meal_recipes.yml Add food.yml for food related reagents: sugar, flour, etc.
This commit is contained in:
@@ -105,7 +105,7 @@ namespace Content.Server.GameObjects.Components.Kitchen
|
||||
{
|
||||
if (CanSatisfyRecipe(r))
|
||||
{
|
||||
var outputFromRecipe = r.OutPutPrototype;
|
||||
var outputFromRecipe = r.Result;
|
||||
_entityManager.SpawnEntity(outputFromRecipe, Owner.Transform.GridPosition);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -20,12 +20,12 @@ namespace Content.Shared.Kitchen
|
||||
|
||||
private string _id;
|
||||
private string _name;
|
||||
private string _output;
|
||||
private string _result;
|
||||
private Dictionary<string, int> _ingredients;
|
||||
|
||||
public string ID => _id;
|
||||
public string Name => Loc.GetString(_name);
|
||||
public string OutPutPrototype => _output;
|
||||
public string Result => _result;
|
||||
public IReadOnlyDictionary<string, int> Ingredients => _ingredients;
|
||||
|
||||
public void LoadFrom(YamlMappingNode mapping)
|
||||
@@ -34,7 +34,7 @@ namespace Content.Shared.Kitchen
|
||||
|
||||
serializer.DataField(ref _id, "id", string.Empty);
|
||||
serializer.DataField(ref _name, "name", string.Empty);
|
||||
serializer.DataField(ref _output, "output", string.Empty);
|
||||
serializer.DataField(ref _result, "result", string.Empty);
|
||||
serializer.DataField(ref _ingredients, "ingredients", new Dictionary<string, int>());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,17 +1,7 @@
|
||||
- type: microwaveMealRecipe
|
||||
id: RecipeCheeseburger
|
||||
name: "Cheeseburger Recipe"
|
||||
output: FoodCheeseburger
|
||||
result: FoodCheeseburger
|
||||
ingredients:
|
||||
chem.H2O: 15
|
||||
chem.Flour: 15
|
||||
chem.Nutriment: 5
|
||||
|
||||
- type: microwaveMealRecipe
|
||||
id: RecipeFlashlight
|
||||
name: "Flashlight Recipe"
|
||||
output: FlashlightLantern
|
||||
ingredients:
|
||||
chem.H2O: 15
|
||||
chem.Nutriment: 20
|
||||
chem.Glucose: 5
|
||||
|
||||
|
||||
8
Resources/Prototypes/Reagents/food.yml
Normal file
8
Resources/Prototypes/Reagents/food.yml
Normal file
@@ -0,0 +1,8 @@
|
||||
- type: reagent
|
||||
id: chem.Flour
|
||||
name: Flour
|
||||
desc: Used for baking.
|
||||
color: "#FFFFFF"
|
||||
metabolism:
|
||||
- !type:DefaultFood
|
||||
rate: 1
|
||||
Reference in New Issue
Block a user