move lathe recipes into packs (easier for forks and maintaining) (#33095)
* add LatheRecipePackPrototype * change Lathe and EmagLathe to use packs * add AddRecipesFromPacks helper to SharedLatheSystem * update lathe logic to work with packs and clean up some stuff * migrate individual recipes to recipe packs * update client * remove node/artifact scanner from techs * :trollface: * fix test and make it include emag recipes * add test that every dynamic recipe must be researched * pro * fix * fix * fix all tests, genuinely good test i wonder who made it * add unused uranium and incendiary drozd mags to tech and lathe * add recipes * add incendiary prototype * undo some changes * troll * :trollface: * true Co-authored-by: pathetic meowmeow <uhhadd@gmail.com> * shitmed real Co-authored-by: pathetic meowmeow <uhhadd@gmail.com> * update funny test * :trollface: * :trollface: --------- Co-authored-by: deltanedas <@deltanedas:kde.org> Co-authored-by: pathetic meowmeow <uhhadd@gmail.com>
This commit is contained in:
@@ -26,6 +26,7 @@ public sealed class LatheTest
|
||||
var compFactory = server.ResolveDependency<IComponentFactory>();
|
||||
var materialStorageSystem = server.System<SharedMaterialStorageSystem>();
|
||||
var whitelistSystem = server.System<EntityWhitelistSystem>();
|
||||
var latheSystem = server.System<SharedLatheSystem>();
|
||||
|
||||
await server.WaitAssertion(() =>
|
||||
{
|
||||
@@ -74,14 +75,14 @@ public sealed class LatheTest
|
||||
}
|
||||
}
|
||||
|
||||
// Collect all the recipes assigned to this lathe
|
||||
var recipes = new List<ProtoId<LatheRecipePrototype>>();
|
||||
recipes.AddRange(latheComp.StaticRecipes);
|
||||
recipes.AddRange(latheComp.DynamicRecipes);
|
||||
// Collect all possible recipes assigned to this lathe
|
||||
var recipes = new HashSet<ProtoId<LatheRecipePrototype>>();
|
||||
latheSystem.AddRecipesFromPacks(recipes, latheComp.StaticPacks);
|
||||
latheSystem.AddRecipesFromPacks(recipes, latheComp.DynamicPacks);
|
||||
if (latheProto.TryGetComponent<EmagLatheRecipesComponent>(out var emagRecipesComp, compFactory))
|
||||
{
|
||||
recipes.AddRange(emagRecipesComp.EmagStaticRecipes);
|
||||
recipes.AddRange(emagRecipesComp.EmagDynamicRecipes);
|
||||
latheSystem.AddRecipesFromPacks(recipes, emagRecipesComp.EmagStaticPacks);
|
||||
latheSystem.AddRecipesFromPacks(recipes, emagRecipesComp.EmagDynamicPacks);
|
||||
}
|
||||
|
||||
// Check each recipe assigned to this lathe
|
||||
|
||||
Reference in New Issue
Block a user