fix-lathe-recipe-dupes (#17473)

This commit is contained in:
Nemanja 2023-06-19 13:43:20 -04:00 committed by GitHub
parent 8610249277
commit 910c2da9bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -101,7 +101,7 @@ namespace Content.Server.Lathe
{
var ev = new LatheGetRecipesEvent(uid)
{
Recipes = component.StaticRecipes
Recipes = new List<string>(component.StaticRecipes)
};
RaiseLocalEvent(uid, ev);
return ev.Recipes;
@ -195,7 +195,7 @@ namespace Content.Server.Lathe
foreach (var recipe in latheComponent.DynamicRecipes)
{
if (!component.UnlockedRecipes.Contains(recipe))
if (!component.UnlockedRecipes.Contains(recipe) || args.Recipes.Contains(recipe))
continue;
args.Recipes.Add(recipe);
}