Fix lathe arbitrage test (#34449)

* Fix lathe arbitrage test

* Add refinables

* nullable

* nullable2

* Fix merge

* Ignore failures
This commit is contained in:
Leon Friedrich
2025-04-17 21:07:51 +10:00
committed by GitHub
parent 9b3f37f5af
commit f46bb301fb
4 changed files with 156 additions and 38 deletions

View File

@@ -34,6 +34,25 @@ public abstract class SharedLatheSystem : EntitySystem
BuildInverseRecipeDictionary();
}
/// <summary>
/// Get the set of all recipes that a lathe could possibly ever create (e.g., if all techs were unlocked).
/// </summary>
public HashSet<ProtoId<LatheRecipePrototype>> GetAllPossibleRecipes(LatheComponent component)
{
var recipes = new HashSet<ProtoId<LatheRecipePrototype>>();
foreach (var pack in component.StaticPacks)
{
recipes.UnionWith(_proto.Index(pack).Recipes);
}
foreach (var pack in component.DynamicPacks)
{
recipes.UnionWith(_proto.Index(pack).Recipes);
}
return recipes;
}
/// <summary>
/// Add every recipe in the list of recipe packs to a single hashset.
/// </summary>