Skip to content

Commit

Permalink
Use localized item name for recipe ingredients
Browse files Browse the repository at this point in the history
Uses template name as fallback.
  • Loading branch information
Interkarma committed Oct 11, 2023
1 parent 96e06f3 commit fedc92a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Assets/Scripts/Game/Items/DaggerfallUnityItemMCP.cs
Expand Up @@ -251,7 +251,8 @@ public override TextFile.Token[] PotionRecipeIngredients(TextFile.Formatting for
foreach (PotionRecipe.Ingredient ingredient in potionRecipe.Ingredients)
{
ItemTemplate ingredientTemplate = DaggerfallUnity.Instance.ItemHelper.GetItemTemplate(ingredient.id);
ingredientsTokens.Add(TextFile.CreateTextToken(ingredientTemplate.name));
string ingredientName = TextManager.Instance.GetLocalizedItemName(ingredientTemplate.index, ingredientTemplate.name);
ingredientsTokens.Add(TextFile.CreateTextToken(ingredientName));
ingredientsTokens.Add(TextFile.CreateFormatToken(format));
}
}
Expand Down

0 comments on commit fedc92a

Please sign in to comment.