diff --git a/NHSE.Core/Structures/Misc/RecipeBook.cs b/NHSE.Core/Structures/Misc/RecipeBook.cs index 4072db3..956a3ad 100644 --- a/NHSE.Core/Structures/Misc/RecipeBook.cs +++ b/NHSE.Core/Structures/Misc/RecipeBook.cs @@ -26,18 +26,20 @@ public class RecipeBook public bool GetIsFavorite(int recipe) => FlagUtil.GetFlag(Data, 3 * BitFlagArraySize, recipe); public void SetIsFavorite(int recipe, bool value = true) => FlagUtil.SetFlag(Data, 3 * BitFlagArraySize, recipe, value); - public void GiveAll(IReadOnlyDictionary recipes) + public void GiveAll(IReadOnlyDictionary recipes, bool isNew = true) { foreach (var entry in recipes) { var index = entry.Key; + if (index is RecipeList.BridgeConstructionKit or RecipeList.CampsiteConstructionKit) + continue; bool alreadyHave = GetIsKnown(index); if (alreadyHave) continue; SetIsKnown(index); - SetIsNew(index); + SetIsNew(index, isNew); } } diff --git a/NHSE.Core/Structures/RecipeList.cs b/NHSE.Core/Structures/RecipeList.cs index db76538..a197d48 100644 --- a/NHSE.Core/Structures/RecipeList.cs +++ b/NHSE.Core/Structures/RecipeList.cs @@ -4,6 +4,9 @@ namespace NHSE.Core { public static class RecipeList { + public const int BridgeConstructionKit = 0x1CA; + public const int CampsiteConstructionKit = 0x1CD; + public static readonly IReadOnlyDictionary Recipes = new Dictionary { {0x006, 02596}, // juicy-apple TV diff --git a/NHSE.WinForms/Subforms/Map/BulkSpawn.cs b/NHSE.WinForms/Subforms/Map/BulkSpawn.cs index d352270..d44b4bb 100644 --- a/NHSE.WinForms/Subforms/Map/BulkSpawn.cs +++ b/NHSE.WinForms/Subforms/Map/BulkSpawn.cs @@ -44,7 +44,7 @@ private void B_Apply_Click(object sender, EventArgs e) var min = (ushort)NUD_DIYStart.Value; var max = (ushort)NUD_DIYStop.Value; var diy = RecipeList.Recipes - .Where(z => min <= z.Key && z.Key <= max) + .Where(z => z.Key is not RecipeList.BridgeConstructionKit or RecipeList.CampsiteConstructionKit && min <= z.Key && z.Key <= max) .Select(z => z.Key) .Select(z => new Item(Item.DIYRecipe) {FreeParam = z}); diff --git a/NHSE.WinForms/Subforms/Player/RecipeListEditor.cs b/NHSE.WinForms/Subforms/Player/RecipeListEditor.cs index 00205e4..c82e563 100644 --- a/NHSE.WinForms/Subforms/Player/RecipeListEditor.cs +++ b/NHSE.WinForms/Subforms/Player/RecipeListEditor.cs @@ -76,7 +76,7 @@ private static object GetEntryText(RecipeBook recipeBook, ushort index, string i return $"0x{index:X3} - {known} {item}"; } - private void B_All_Click(object sender, EventArgs e) => DoAll(() => Book.GiveAll(RecipeList.Recipes)); + private void B_All_Click(object sender, EventArgs e) => DoAll(() => Book.GiveAll(RecipeList.Recipes, ModifierKeys != Keys.Control)); private void B_ClearAll_Click(object sender, EventArgs e) => DoAll(Book.ClearAll); private void B_CraftAll_Click(object sender, EventArgs e) => DoAll(Book.CraftAll);