1
0
mirror of https://github.com/soarqin/DSP_Mods.git synced 2025-12-09 12:53:34 +08:00

UXAssist 1.0.26

This commit is contained in:
2024-06-05 21:00:29 +08:00
parent 57c5993692
commit 63e684ebf4
7 changed files with 162 additions and 11 deletions

View File

@@ -11,8 +11,7 @@ public static class TechPatch
{
public static ConfigEntry<bool> Enabled;
private static Harmony _patch;
public static void Init()
{
Enabled.SettingChanged += (_, _) => ValueChanged();
@@ -43,12 +42,11 @@ public static class TechPatch
var history = GameMain.history;
var techStates = history.techStates;
var techID = techProto.ID;
if (techStates == null || !techStates.ContainsKey(techID))
if (techStates == null || !techStates.TryGetValue(techID, out var value))
{
return;
}
var value = techStates[techID];
if (value.unlocked)
{
return;