diff --git a/Nautilus/Assets/Gadgets/ScanningGadget.cs b/Nautilus/Assets/Gadgets/ScanningGadget.cs index 9e37e500..aa7c553b 100644 --- a/Nautilus/Assets/Gadgets/ScanningGadget.cs +++ b/Nautilus/Assets/Gadgets/ScanningGadget.cs @@ -284,9 +284,7 @@ public ScanningGadget WithAnalysisTech( ) { AnalysisTech ??= new KnownTech.AnalysisTech(); - AnalysisTech.techType = RequiredForUnlock != TechType.None - ? RequiredForUnlock - : prefab.Info.TechType; + AnalysisTech.techType = prefab.Info.TechType; AnalysisTech.unlockTechTypes = RequiredForUnlock != TechType.None ? new() { prefab.Info.TechType } : new(); @@ -347,13 +345,13 @@ protected internal override void Build() PDAHandler.AddCustomScannerEntry(ScannerEntryData); } - if (CompoundTechsForUnlock is { Count: > 0 } || RequiredForUnlock != TechType.None) + if (RequiredForUnlock != TechType.None) { - if (AnalysisTech is null && RequiredForUnlock != TechType.None) - { - KnownTechHandler.SetAnalysisTechEntry(RequiredForUnlock, new[] { prefab.Info.TechType }, KnownTechHandler.DefaultUnlockData.BlueprintUnlockMessage, KnownTechHandler.DefaultUnlockData.BlueprintUnlockSound); - } + KnownTechHandler.AddRequirementForUnlock(prefab.Info.TechType, RequiredForUnlock); + } + if (CompoundTechsForUnlock is { Count: > 0 } || RequiredForUnlock != TechType.None) + { KnownTechPatcher.UnlockedAtStart.Remove(prefab.Info.TechType); }